File indexing completed on 2024-04-28 15:17:40

0001 /*
0002     SPDX-FileCopyrightText: 2013 Vishesh Handa <me@vhanda.in>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006 
0007 #ifndef BALOO_FILEMONITOR_H
0008 #define BALOO_FILEMONITOR_H
0009 
0010 #include <QObject>
0011 #include <QUrl>
0012 
0013 #include "core_export.h"
0014 
0015 namespace Baloo {
0016 
0017 /**
0018  * @class FileMonitor filemonitor.h <Baloo/FileMonitor>
0019  */
0020 class BALOO_CORE_EXPORT FileMonitor : public QObject
0021 {
0022     Q_OBJECT
0023 public:
0024     explicit FileMonitor(QObject* parent = nullptr);
0025     ~FileMonitor() override;
0026 
0027     void addFile(const QString& fileUrl);
0028     void addFile(const QUrl& url);
0029 
0030     void setFiles(const QStringList& fileList);
0031 
0032     QStringList files() const;
0033 
0034     void clear();
0035 
0036 Q_SIGNALS:
0037     void fileMetaDataChanged(const QString& fileUrl);
0038 
0039 private Q_SLOTS:
0040     BALOO_CORE_NO_EXPORT void slotFileMetaDataChanged(const QStringList& fileUrl);
0041 
0042 private:
0043     class Private;
0044     Private* d;
0045 };
0046 
0047 }
0048 #endif // BALOO_FILEMONITOR_H