diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-10 11:02:39 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-10 11:02:39 +0100 |
commit | 668cead7d8f98615d90dbc933f194105b3cf0bc3 (patch) | |
tree | 596ef6d2cf0f90ccbeb399f60d7904e8821a7e9a /common/notifier.h | |
parent | 0991561c9630fcb89b9666b8d57c2b7ea592fec6 (diff) | |
download | sink-668cead7d8f98615d90dbc933f194105b3cf0bc3.tar.gz sink-668cead7d8f98615d90dbc933f194105b3cf0bc3.zip |
Moved Notifier and ResourceAccess to separate files.
Diffstat (limited to 'common/notifier.h')
-rw-r--r-- | common/notifier.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/common/notifier.h b/common/notifier.h new file mode 100644 index 0000000..d16a311 --- /dev/null +++ b/common/notifier.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 Christian Mollekopf <chrigi_1@fastmail.fm> | ||
3 | * | ||
4 | * This library is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU Lesser General Public | ||
6 | * License as published by the Free Software Foundation; either | ||
7 | * version 2.1 of the License, or (at your option) version 3, or any | ||
8 | * later version accepted by the membership of KDE e.V. (or its | ||
9 | * successor approved by the membership of KDE e.V.), which shall | ||
10 | * act as a proxy defined in Section 6 of version 3 of the license. | ||
11 | * | ||
12 | * This library is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * Lesser General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU Lesser General Public | ||
18 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | ||
20 | |||
21 | #pragma once | ||
22 | |||
23 | #include "sink_export.h" | ||
24 | #include <QByteArray> | ||
25 | #include <QSharedPointer> | ||
26 | |||
27 | #include <Async/Async> | ||
28 | |||
29 | class QAbstractItemModel; | ||
30 | |||
31 | namespace Sink { | ||
32 | class ResourceAccess; | ||
33 | class Notification; | ||
34 | |||
35 | class SINK_EXPORT Notifier { | ||
36 | public: | ||
37 | Notifier(const QSharedPointer<ResourceAccess> &resourceAccess); | ||
38 | Notifier(const QByteArray &resourceInstanceIdentifier); | ||
39 | void registerHandler(std::function<void(const Notification &)>); | ||
40 | |||
41 | private: | ||
42 | class Private; | ||
43 | QSharedPointer<Private> d; | ||
44 | }; | ||
45 | |||
46 | } | ||