#ifndef MOUNTDISKLISTENER_H #define MOUNTDISKLISTENER_H #include #include #include #include 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