--- a/src/index/fsindexer.h
+++ b/src/index/fsindexer.h
@@ -24,10 +24,26 @@
#include "indexer.h"
#include "fstreewalk.h"
+#ifdef IDX_THREADS
+#include "workqueue.h"
+#endif // IDX_THREADS
class DbIxStatusUpdater;
class FIMissingStore;
struct stat;
+
+#ifdef IDX_THREADS
+class IndexingTask {
+public:
+ IndexingTask(const string& u, const string& p, const Rcl::Doc& d)
+ :udi(u), parent_udi(p), doc(d)
+ {}
+ string udi;
+ string parent_udi;
+ Rcl::Doc doc;
+};
+extern void *FsIndexerIndexWorker(void*);
+#endif // IDX_THREADS
/** Index selected parts of the file system
@@ -89,6 +105,11 @@
bool m_havelocalfields;
map<string, string> m_localfields;
+#ifdef IDX_THREADS
+ friend void *FsIndexerIndexWorker(void*);
+ WorkQueue<IndexingTask*> m_wqueue;
+#endif // IDX_THREADS
+
bool init();
void localfieldsfromconf();
void setlocalfields(Rcl::Doc& doc);