ukui-search/libsearch/index/file-index-manager.h

30 lines
794 B
C
Raw Normal View History

#ifndef SEARCHMETHODMANAGER_H
#define SEARCHMETHODMANAGER_H
2022-04-11 10:22:38 +08:00
#include <QObject>
#include <QSystemSemaphore>
2022-04-14 11:16:26 +08:00
#include <QGSettings/QGSettings>
#include "first-index.h"
//#include "inotify-index.h"
#include "inotify-watch.h"
2021-12-14 14:43:35 +08:00
namespace UkuiSearch {
2022-04-11 10:22:38 +08:00
class FileIndexManager : public QObject {
Q_OBJECT
public:
2022-04-11 10:22:38 +08:00
static FileIndexManager *getInstance();
void searchMethod(FileUtils::SearchMethod sm);
2022-04-14 11:16:26 +08:00
void initIndexPathSetFunction();
private Q_SLOTS:
void handleIndexPathAppend(const QString path, const QStringList blockList);
private:
2022-04-11 10:22:38 +08:00
FileIndexManager(QObject *parent = nullptr);
FirstIndex *m_fi;
// InotifyIndex* m_ii;
InotifyWatch *m_iw = nullptr;
QSystemSemaphore m_semaphore;
2022-04-14 11:16:26 +08:00
QGSettings *m_searchSettings = nullptr;
};
}
#endif // SEARCHMETHODMANAGER_H