• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • sources
  • kde-4.12
  • kdepimlibs
  • akonadi
itemfetchscope.h
1 /*
2  Copyright (c) 2008 Kevin Krammer <kevin.krammer@gmx.at>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef ITEMFETCHSCOPE_H
21 #define ITEMFETCHSCOPE_H
22 
23 #include "akonadi_export.h"
24 
25 #include <QtCore/QSharedDataPointer>
26 #include <KDE/KDateTime>
27 
28 class QStringList;
29 template <typename T> class QSet;
30 
31 namespace Akonadi {
32 
33 class ItemFetchScopePrivate;
34 
68 class AKONADI_EXPORT ItemFetchScope
69 {
70  public:
75  enum AncestorRetrieval {
76  None,
77  Parent,
78  All
79  };
80 
87  ItemFetchScope();
88 
92  ItemFetchScope( const ItemFetchScope &other );
93 
97  ~ItemFetchScope();
98 
102  ItemFetchScope &operator=( const ItemFetchScope &other );
103 
109  QSet<QByteArray> payloadParts() const;
110 
118  void fetchPayloadPart( const QByteArray &part, bool fetch = true );
119 
125  bool fullPayload() const;
126 
133  void fetchFullPayload( bool fetch = true );
134 
142  QSet<QByteArray> attributes() const;
143 
150  void fetchAttribute( const QByteArray &type, bool fetch = true );
151 
157  template <typename T> inline void fetchAttribute( bool fetch = true )
158  {
159  T dummy;
160  fetchAttribute( dummy.type(), fetch );
161  }
162 
168  bool allAttributes() const;
169 
176  void fetchAllAttributes( bool fetch = true );
177 
184  bool cacheOnly() const;
185 
193  void setCacheOnly( bool cacheOnly );
194 
202  void setCheckForCachedPayloadPartsOnly( bool check = true );
203 
211  bool checkForCachedPayloadPartsOnly() const;
212 
220  void setAncestorRetrieval( AncestorRetrieval ancestorDepth );
221 
228  AncestorRetrieval ancestorRetrieval() const;
229 
237  void setFetchModificationTime( bool retrieveMtime );
238 
245  bool fetchModificationTime() const;
246 
254  void setFetchGid( bool retrieveGID );
255 
262  bool fetchGid() const;
263 
275  void setIgnoreRetrievalErrors( bool enabled );
276 
283  bool ignoreRetrievalErrors() const;
284 
288  bool isEmpty() const;
289 
300  void setFetchChangedSince( const KDateTime &changedSince );
301 
305  KDateTime fetchChangedSince() const;
306 
318  void setFetchRemoteIdentification( bool retrieveRid );
319 
326  bool fetchRemoteIdentification() const;
327 
328  private:
329  //@cond PRIVATE
330  QSharedDataPointer<ItemFetchScopePrivate> d;
331  //@endcond
332 };
333 
334 }
335 
336 Q_DECLARE_METATYPE(Akonadi::ItemFetchScope)
337 
338 #endif
Akonadi::ItemFetchScope::None
No ancestor retrieval at all (the default)
Definition: itemfetchscope.h:76
Akonadi::ItemFetchScope::AncestorRetrieval
AncestorRetrieval
Describes the ancestor retrieval depth.
Definition: itemfetchscope.h:75
Akonadi::ItemFetchScope::Parent
Only retrieve the immediate parent collection.
Definition: itemfetchscope.h:77
Akonadi::ItemFetchScope::fetchAttribute
void fetchAttribute(bool fetch=true)
Sets whether the attribute of the requested type should be fetched.
Definition: itemfetchscope.h:157
Akonadi::ItemFetchScope
Specifies which parts of an item should be fetched from the Akonadi storage.
Definition: itemfetchscope.h:68
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal