6 #include "tmdatabase.h"
27 class Service : public QObject
31 Service(Settings *settings, QObject *parent = 0);
35 void setup_crc_table();
36 quint32 crc32(QString const &string);
37 quint32 crc32(int code, QString const &string);
40 void load_languages(QString const &path);
42 Text::pointer divide_into_sentences(int code, QString string);
43 Text::pointer divide_into_words(int code, Text::pointer sentence);
46 quint32 find_site_id(QString host_name);
48 void insert_sentence(quint32 site_id, int scode, int tcode,
49 TextSentence::pointer sentence, quint32 previous_crc, quint32 next_crc);
51 void find_sentence(quint32 site_id, int scode, int tcode,
52 Text::pointer ssentence, Database::sentence_callback callback);
54 sentence_data_type::pointer stuff_sentence_data(int code, Text::pointer text);
58 * \brief 言語プラグインが読み込まれたときに発火するシグナルです。
59 * \param code 言語コードです。
61 * \param icon 言語を表現するアイコンです。
63 void languageLoaded(int code, QString name, QIcon icon);
72 quint32 m_crc_table[256];
74 QMap<int, Language*> m_languages;
76 QThread *m_database_thread;