Akonadi

collectionfetchscope.h
1 /*
2  SPDX-FileCopyrightText: 2008 Kevin Krammer <[email protected]>
3  SPDX-FileCopyrightText: 2009 Volker Krause <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef AKONADI_COLLECTIONFETCHSCOPE_H
9 #define AKONADI_COLLECTIONFETCHSCOPE_H
10 
11 #include "akonadicore_export.h"
12 
13 #include <QSharedDataPointer>
14 #include <QSet>
15 
16 class QStringList;
17 
18 namespace Akonadi
19 {
20 
21 class CollectionFetchScopePrivate;
22 
57 class AKONADICORE_EXPORT CollectionFetchScope
58 {
59 public:
64  None,
66  All
67  };
68 
76 
81 
86 
90  CollectionFetchScope &operator=(const CollectionFetchScope &other);
91 
97  enum ListFilter {
102  Enabled
103  };
104 
112  void setListFilter(ListFilter);
113 
120  Q_REQUIRED_RESULT ListFilter listFilter() const;
121 
127  Q_REQUIRED_RESULT bool includeStatistics() const;
128 
134  void setIncludeStatistics(bool include);
135 
141  Q_REQUIRED_RESULT QString resource() const;
142 
149  void setResource(const QString &resource);
150 
157  void setContentMimeTypes(const QStringList &mimeTypes);
158 
164  Q_REQUIRED_RESULT QStringList contentMimeTypes() const;
165 
175  void setAncestorRetrieval(AncestorRetrieval ancestorDepth);
176 
182  Q_REQUIRED_RESULT AncestorRetrieval ancestorRetrieval() const;
183 
189  void setAncestorFetchScope(const CollectionFetchScope &scope);
190 
194  Q_REQUIRED_RESULT CollectionFetchScope ancestorFetchScope() const;
195 
199  CollectionFetchScope &ancestorFetchScope();
200 
206  Q_REQUIRED_RESULT QSet<QByteArray> attributes() const;
207 
214  void fetchAttribute(const QByteArray &type, bool fetch = true);
215 
221  template <typename T> inline void fetchAttribute(bool fetch = true)
222  {
223  T dummy;
224  fetchAttribute(dummy.type(), fetch);
225  }
226 
234  void setFetchIdOnly(bool fetchIdOnly);
235 
242  Q_REQUIRED_RESULT bool fetchIdOnly() const;
243 
251  void setIgnoreRetrievalErrors(bool enabled);
252 
259  Q_REQUIRED_RESULT bool ignoreRetrievalErrors() const;
260 
264  Q_REQUIRED_RESULT bool isEmpty() const;
265 
266 private:
267  //@cond PRIVATE
269  //@endcond
270 };
271 
272 }
273 
274 #endif
Specifies which parts of a collection should be fetched from the Akonadi storage. ...
void fetchAttribute(bool fetch=true)
Sets whether the attribute of the requested type should be fetched.
Only retrieve collections for display, taking the local preference and enabled into account...
Only retrieve the immediate parent collection.
ListFilter
Describes the list filter.
Only retrieve collections for indexing, taking the local preference and enabled into account...
No filtering, retrieve all collections.
AncestorRetrieval
Describes the ancestor retrieval depth.
Helper integration between Akonadi and Qt.
No ancestor retrieval at all (the default)
Only retrieve collections for synchronization, taking the local preference and enabled into account...
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jul 2 2020 23:14:26 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.