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 | |
17 | namespace Baloo { |
18 | |
19 | /*! |
20 | * \class Baloo::FileMonitor |
21 | * \inheaderfile Baloo/FileMonitor |
22 | * \inmodule Baloo |
23 | */ |
24 | class BALOO_CORE_EXPORT FileMonitor : public QObject |
25 | { |
26 | Q_OBJECT |
27 | public: |
28 | /*! |
29 | * |
30 | */ |
31 | explicit FileMonitor(QObject* parent = nullptr); |
32 | ~FileMonitor() override; |
33 | |
34 | /*! |
35 | * |
36 | */ |
37 | void addFile(const QString& fileUrl); |
38 | |
39 | /*! |
40 | * |
41 | */ |
42 | void addFile(const QUrl& url); |
43 | |
44 | /*! |
45 | * |
46 | */ |
47 | void setFiles(const QStringList& fileList); |
48 | |
49 | /*! |
50 | * |
51 | */ |
52 | QStringList files() const; |
53 | |
54 | /*! |
55 | * |
56 | */ |
57 | void clear(); |
58 | |
59 | Q_SIGNALS: |
60 | /*! |
61 | * |
62 | */ |
63 | void fileMetaDataChanged(const QString& fileUrl); |
64 | |
65 | private Q_SLOTS: |
66 | BALOO_CORE_NO_EXPORT void slotFileMetaDataChanged(const QStringList& fileUrl); |
67 | |
68 | private: |
69 | class Private; |
70 | std::unique_ptr<Private> const d; |
71 | }; |
72 | |
73 | } |
74 | #endif // BALOO_FILEMONITOR_H |
75 | |