ukui-search/libsearch/dirwatcher/dir-watcher.h

41 lines
1016 B
C++

#ifndef MOUNTDISKLISTENER_H
#define MOUNTDISKLISTENER_H
#include <QObject>
#include <QDBusInterface>
#include <QDBusReply>
class DirWatcher : public QObject
{
Q_OBJECT
public:
static DirWatcher *getDirWatcher();
public Q_SLOTS:
void initDbusService();
QStringList currentIndexableDir();
QStringList currentBlackListOfIndex();
QStringList currentSearchableDir();
QStringList searchableDirForSearchApplication();
QStringList blackListOfDir(const QString &dirPath);
void appendIndexableListItem(const QString &path);
void removeIndexableListItem(const QString &path);
void sendAppendSignal(const QString &path, const QStringList &blockList);
void sendRemoveSignal(const QString&path);
Q_SIGNALS:
void appendIndexItem(const QString&, const QStringList&);
void removeIndexItem(const QString&);
private:
DirWatcher(QObject *parent = nullptr);
~DirWatcher() = default;
QDBusInterface *m_dbusInterface = nullptr;
};
#endif // MOUNTDISKLISTENER_H