diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-07-08 09:19:43 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-07-08 09:19:43 +0200 |
commit | 228a3380328535f30fcb187cae7db2415ec2d314 (patch) | |
tree | c5aff9f889ac41aa5f79bd5d144f2c94a8298edc /common/resourcefacade.h | |
parent | 12a87e1d6d5c0e4b5a5aacbfa880678629321c1d (diff) | |
download | sink-228a3380328535f30fcb187cae7db2415ec2d314.tar.gz sink-228a3380328535f30fcb187cae7db2415ec2d314.zip |
We can add resources.
Diffstat (limited to 'common/resourcefacade.h')
-rw-r--r-- | common/resourcefacade.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/common/resourcefacade.h b/common/resourcefacade.h new file mode 100644 index 0000000..2b36f21 --- /dev/null +++ b/common/resourcefacade.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2014 Christian Mollekopf <chrigi_1@fastmail.fm> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | */ | ||
19 | |||
20 | #pragma once | ||
21 | |||
22 | #include "common/clientapi.h" | ||
23 | #include "common/resultprovider.h" | ||
24 | |||
25 | class ResourceFacade : public Akonadi2::StoreFacade<Akonadi2::ApplicationDomain::AkonadiResource> | ||
26 | { | ||
27 | public: | ||
28 | ResourceFacade(const QByteArray &instanceIdentifier); | ||
29 | virtual ~ResourceFacade(); | ||
30 | KAsync::Job<void> create(const Akonadi2::ApplicationDomain::AkonadiResource &resource) Q_DECL_OVERRIDE; | ||
31 | KAsync::Job<void> modify(const Akonadi2::ApplicationDomain::AkonadiResource &resource) Q_DECL_OVERRIDE; | ||
32 | KAsync::Job<void> remove(const Akonadi2::ApplicationDomain::AkonadiResource &resource) Q_DECL_OVERRIDE; | ||
33 | KAsync::Job<void> load(const Akonadi2::Query &query, const QSharedPointer<Akonadi2::ResultProvider<typename Akonadi2::ApplicationDomain::AkonadiResource::Ptr> > &resultProvider) Q_DECL_OVERRIDE; | ||
34 | }; | ||