1/*
2 SPDX-FileCopyrightText: 2013 Vishesh Handa <me@vhanda.in>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#ifndef BALOO_FILEMONITOR_H
8#define BALOO_FILEMONITOR_H
9
10#include <QObject>
11#include <QUrl>
12
13#include "core_export.h"
14
15#include <memory>
16
17namespace Baloo {
18
19/**
20 * @class FileMonitor filemonitor.h <Baloo/FileMonitor>
21 */
22class BALOO_CORE_EXPORT FileMonitor : public QObject
23{
24 Q_OBJECT
25public:
26 explicit FileMonitor(QObject* parent = nullptr);
27 ~FileMonitor() override;
28
29 void addFile(const QString& fileUrl);
30 void addFile(const QUrl& url);
31
32 void setFiles(const QStringList& fileList);
33
34 QStringList files() const;
35
36 void clear();
37
38Q_SIGNALS:
39 void fileMetaDataChanged(const QString& fileUrl);
40
41private Q_SLOTS:
42 BALOO_CORE_NO_EXPORT void slotFileMetaDataChanged(const QStringList& fileUrl);
43
44private:
45 class Private;
46 std::unique_ptr<Private> const d;
47};
48
49}
50#endif // BALOO_FILEMONITOR_H
51

source code of baloo/src/lib/filemonitor.h