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

41 lines
1016 B
C
Raw Normal View History

2022-03-01 10:37:03 +08:00
#ifndef MOUNTDISKLISTENER_H
#define MOUNTDISKLISTENER_H
#include <QObject>
#include <QDBusInterface>
#include <QDBusReply>
2022-03-01 10:37:03 +08:00
class DirWatcher : public QObject
{
Q_OBJECT
public:
static DirWatcher *getDirWatcher();
public Q_SLOTS:
2022-04-14 11:16:26 +08:00
void initDbusService();
QStringList currentIndexableDir();
2022-03-01 10:37:03 +08:00
QStringList currentBlackListOfIndex();
QStringList currentSearchableDir();
QStringList searchableDirForSearchApplication();
2022-03-01 10:37:03 +08:00
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&);
2022-03-01 10:37:03 +08:00
private:
DirWatcher(QObject *parent = nullptr);
~DirWatcher() = default;
2022-03-01 10:37:03 +08:00
QDBusInterface *m_dbusInterface = nullptr;
2022-03-01 10:37:03 +08:00
};
#endif // MOUNTDISKLISTENER_H