Mercurial > hg > svcore
comparison rdf/PluginRDFIndexer.h @ 477:e0784311a103
* Start thread to populate uninstalled transforms only on request
(so runner doesn't have to have it)
author | Chris Cannam |
---|---|
date | Tue, 11 Nov 2008 09:41:45 +0000 |
parents | c9b055f84326 |
children | 82ab61fa9223 |
comparison
equal
deleted
inserted
replaced
476:acddcc3cca36 | 477:e0784311a103 |
---|---|
20 #include <QStringList> | 20 #include <QStringList> |
21 #include <QMutex> | 21 #include <QMutex> |
22 #include <map> | 22 #include <map> |
23 #include <set> | 23 #include <set> |
24 | 24 |
25 //!!!class FileSource; | |
26 | |
27 class PluginRDFIndexer | 25 class PluginRDFIndexer |
28 { | 26 { |
29 public: | 27 public: |
30 static PluginRDFIndexer *getInstance(); | 28 static PluginRDFIndexer *getInstance(); |
31 | 29 |
32 /** | 30 /** |
33 * Index all URLs obtained from index files defined in the current | 31 * Index all URLs obtained from index files defined in the current |
34 * settings. This is not done automatically because it may incur | 32 * settings. In contrast to indexing URLs that are installed |
35 * significant processing and networking effort. It could be | 33 * locally alongside plugins, this is not done automatically |
36 * called from a background thread at startup, for example. | 34 * because it may incur significant processing and networking |
35 * effort. It could be called from a background thread at | |
36 * startup, for example. | |
37 * | 37 * |
38 * Note that this class has a single mutex, so other functions | 38 * Note that this class has a single mutex, so other functions |
39 * will block if called from a different thread while this one is | 39 * will block if called from a different thread while this one is |
40 * running. | 40 * running. |
41 */ | 41 */ |
53 ~PluginRDFIndexer(); | 53 ~PluginRDFIndexer(); |
54 | 54 |
55 protected: | 55 protected: |
56 PluginRDFIndexer(); | 56 PluginRDFIndexer(); |
57 QMutex m_mutex; | 57 QMutex m_mutex; |
58 /*!!! | 58 |
59 std::set<FileSource *> m_sources; | |
60 */ | |
61 typedef std::map<QString, QString> StringMap; | 59 typedef std::map<QString, QString> StringMap; |
62 StringMap m_uriToIdMap; | 60 StringMap m_uriToIdMap; |
63 StringMap m_idToUriMap; | 61 StringMap m_idToUriMap; |
64 StringMap m_idToDescriptionMap; | 62 StringMap m_idToDescriptionMap; |
63 | |
64 void indexInstalledURLs(); | |
65 bool indexFile(QString path); | 65 bool indexFile(QString path); |
66 static PluginRDFIndexer *m_instance; | 66 static PluginRDFIndexer *m_instance; |
67 //!!! void expireCacheMaybe(QString); | |
68 }; | 67 }; |
69 | 68 |
70 #endif | 69 #endif |
71 | 70 |