Changeset View
Changeset View
Standalone View
Standalone View
src/akonadi/akonadicachingstorage.cpp
- This file was added.
1 | /* This file is part of Zanshin | ||||
---|---|---|---|---|---|
2 | | ||||
3 | Copyright 2015 Mario Bensi <mbensi@ipsquad.net> | ||||
4 | Copyright 2017 Kevin Ottens <ervin@kde.org> | ||||
5 | | ||||
6 | This program is free software; you can redistribute it and/or | ||||
7 | modify it under the terms of the GNU General Public License as | ||||
8 | published by the Free Software Foundation; either version 2 of | ||||
9 | the License or (at your option) version 3 or any later version | ||||
10 | accepted by the membership of KDE e.V. (or its successor approved | ||||
11 | by the membership of KDE e.V.), which shall act as a proxy | ||||
12 | defined in Section 14 of version 3 of the license. | ||||
13 | | ||||
14 | This program is distributed in the hope that it will be useful, | ||||
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
17 | GNU General Public License for more details. | ||||
18 | | ||||
19 | You should have received a copy of the GNU General Public License | ||||
20 | along with this program; if not, write to the Free Software | ||||
21 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||||
22 | USA. | ||||
23 | */ | ||||
24 | | ||||
25 | | ||||
26 | #include "akonadicachingstorage.h" | ||||
27 | #include "akonadistorage.h" | ||||
28 | | ||||
29 | using namespace Akonadi; | ||||
30 | | ||||
31 | CachingStorage::CachingStorage(const Cache::Ptr &cache, const StorageInterface::Ptr &storage) | ||||
32 | : m_cache(cache), | ||||
33 | m_storage(storage) | ||||
34 | { | ||||
35 | } | ||||
36 | | ||||
37 | CachingStorage::~CachingStorage() | ||||
38 | { | ||||
39 | } | ||||
40 | | ||||
41 | Collection CachingStorage::defaultTaskCollection() | ||||
42 | { | ||||
43 | return m_storage->defaultTaskCollection(); | ||||
44 | } | ||||
45 | | ||||
46 | Collection CachingStorage::defaultNoteCollection() | ||||
47 | { | ||||
48 | return m_storage->defaultNoteCollection(); | ||||
49 | } | ||||
50 | | ||||
51 | KJob *CachingStorage::createItem(Item item, Collection collection) | ||||
52 | { | ||||
53 | return m_storage->createItem(item, collection); | ||||
54 | } | ||||
55 | | ||||
56 | KJob *CachingStorage::updateItem(Item item, QObject *parent) | ||||
57 | { | ||||
58 | return m_storage->updateItem(item, parent); | ||||
59 | } | ||||
60 | | ||||
61 | KJob *CachingStorage::removeItem(Item item) | ||||
62 | { | ||||
63 | return m_storage->removeItem(item); | ||||
64 | } | ||||
65 | | ||||
66 | KJob *CachingStorage::removeItems(Item::List items, QObject *parent) | ||||
67 | { | ||||
68 | return m_storage->removeItems(items, parent); | ||||
69 | } | ||||
70 | | ||||
71 | KJob *CachingStorage::moveItem(Item item, Collection collection, QObject *parent) | ||||
72 | { | ||||
73 | return m_storage->moveItem(item, collection, parent); | ||||
74 | } | ||||
75 | | ||||
76 | KJob *CachingStorage::moveItems(Item::List items, Collection collection, QObject *parent) | ||||
77 | { | ||||
78 | return m_storage->moveItems(items, collection, parent); | ||||
79 | } | ||||
80 | | ||||
81 | KJob *CachingStorage::createCollection(Collection collection, QObject *parent) | ||||
82 | { | ||||
83 | return m_storage->createCollection(collection, parent); | ||||
84 | } | ||||
85 | | ||||
86 | KJob *CachingStorage::updateCollection(Collection collection, QObject *parent) | ||||
87 | { | ||||
88 | return m_storage->updateCollection(collection, parent); | ||||
89 | } | ||||
90 | | ||||
91 | KJob *CachingStorage::removeCollection(Collection collection, QObject *parent) | ||||
92 | { | ||||
93 | return m_storage->removeCollection(collection, parent); | ||||
94 | } | ||||
95 | | ||||
96 | KJob *CachingStorage::createTransaction() | ||||
97 | { | ||||
98 | return m_storage->createTransaction(); | ||||
99 | } | ||||
100 | | ||||
101 | KJob *CachingStorage::createTag(Tag tag) | ||||
102 | { | ||||
103 | return m_storage->createTag(tag); | ||||
104 | } | ||||
105 | | ||||
106 | KJob *CachingStorage::updateTag(Tag tag) | ||||
107 | { | ||||
108 | return m_storage->updateTag(tag); | ||||
109 | } | ||||
110 | | ||||
111 | KJob *CachingStorage::removeTag(Tag tag) | ||||
112 | { | ||||
113 | return m_storage->removeTag(tag); | ||||
114 | } | ||||
115 | | ||||
116 | CollectionFetchJobInterface *CachingStorage::fetchCollections(Collection collection, StorageInterface::FetchDepth depth, FetchContentTypes types) | ||||
117 | { | ||||
118 | return m_storage->fetchCollections(collection, depth, types); | ||||
119 | } | ||||
120 | | ||||
121 | ItemFetchJobInterface *CachingStorage::fetchItems(Collection collection) | ||||
122 | { | ||||
123 | return m_storage->fetchItems(collection); | ||||
124 | } | ||||
125 | | ||||
126 | ItemFetchJobInterface *CachingStorage::fetchItem(Akonadi::Item item) | ||||
127 | { | ||||
128 | return m_storage->fetchItem(item); | ||||
129 | } | ||||
130 | | ||||
131 | ItemFetchJobInterface *CachingStorage::fetchTagItems(Tag tag) | ||||
132 | { | ||||
133 | return m_storage->fetchTagItems(tag); | ||||
134 | } | ||||
135 | | ||||
136 | TagFetchJobInterface *CachingStorage::fetchTags() | ||||
137 | { | ||||
138 | return m_storage->fetchTags(); | ||||
139 | } |