43 lines
1.0 KiB
C++
43 lines
1.0 KiB
C++
#ifndef MOUNTDISKLISTENER_H
|
|
#define MOUNTDISKLISTENER_H
|
|
|
|
#include <QObject>
|
|
#include <QDBusInterface>
|
|
#include <QDBusReply>
|
|
#include <QSystemSemaphore>
|
|
|
|
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();
|
|
|
|
QDBusInterface *m_dbusInterface = nullptr;
|
|
|
|
QSystemSemaphore m_semaphore;
|
|
};
|
|
|
|
#endif // MOUNTDISKLISTENER_H
|
|
|