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

akonadi

  • akonadi
itemfetchscope.cpp
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 #include "itemfetchscope.h"
21 
22 #include "itemfetchscope_p.h"
23 
24 #include <QtCore/QStringList>
25 
26 using namespace Akonadi;
27 
28 ItemFetchScope::ItemFetchScope()
29 {
30  d = new ItemFetchScopePrivate();
31 }
32 
33 ItemFetchScope::ItemFetchScope( const ItemFetchScope &other )
34  : d( other.d )
35 {
36 }
37 
38 ItemFetchScope::~ItemFetchScope()
39 {
40 }
41 
42 ItemFetchScope &ItemFetchScope::operator=( const ItemFetchScope &other )
43 {
44  if ( &other != this )
45  d = other.d;
46 
47  return *this;
48 }
49 
50 QSet< QByteArray > ItemFetchScope::payloadParts() const
51 {
52  return d->mPayloadParts;
53 }
54 
55 void ItemFetchScope::fetchPayloadPart(const QByteArray & part, bool fetch)
56 {
57  if ( fetch )
58  d->mPayloadParts.insert( part );
59  else
60  d->mPayloadParts.remove( part );
61 }
62 
63 bool ItemFetchScope::fullPayload() const
64 {
65  return d->mFullPayload;
66 }
67 
68 void ItemFetchScope::fetchFullPayload(bool fetch)
69 {
70  d->mFullPayload = fetch;
71 }
72 
73 QSet< QByteArray > ItemFetchScope::attributes() const
74 {
75  return d->mAttributes;
76 }
77 
78 void ItemFetchScope::fetchAttribute(const QByteArray & type, bool fetch)
79 {
80  if ( fetch )
81  d->mAttributes.insert( type );
82  else
83  d->mAttributes.remove( type );
84 }
85 
86 bool ItemFetchScope::allAttributes() const
87 {
88  return d->mAllAttributes;
89 }
90 
91 void ItemFetchScope::fetchAllAttributes(bool fetch)
92 {
93  d->mAllAttributes = fetch;
94 }
95 
96 bool ItemFetchScope::isEmpty() const
97 {
98  return d->mPayloadParts.isEmpty() && d->mAttributes.isEmpty() && !d->mFullPayload && !d->mAllAttributes;
99 }
100 
101 bool ItemFetchScope::cacheOnly() const
102 {
103  return d->mCacheOnly;
104 }
105 
106 void ItemFetchScope::setCacheOnly(bool cacheOnly)
107 {
108  d->mCacheOnly = cacheOnly;
109 }
110 
111 ItemFetchScope::AncestorRetrieval ItemFetchScope::ancestorRetrieval() const
112 {
113  return d->mAncestorDepth;
114 }
115 
116 void ItemFetchScope::setAncestorRetrieval( AncestorRetrieval depth )
117 {
118  d->mAncestorDepth = depth;
119 }
120 
121 void ItemFetchScope::setFetchModificationTime( bool retrieveMtime )
122 {
123  d->mFetchMtime = retrieveMtime;
124 }
125 
126 bool ItemFetchScope::fetchModificationTime() const
127 {
128  return d->mFetchMtime;
129 }
130 
131 void ItemFetchScope::setIgnoreRetrievalErrors( bool ignore )
132 {
133  d->mIgnoreRetrievalErrors = ignore;
134 }
135 
136 bool ItemFetchScope::ignoreRetrievalErrors() const
137 {
138  return d->mIgnoreRetrievalErrors;
139 }
140 
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:38 by doxygen 1.8.3.1 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-4.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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