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

akonadi

  • akonadi
collectionfetchscope.cpp
1 /*
2  Copyright (c) 2008 Kevin Krammer <kevin.krammer@gmx.at>
3  Copyright (c) 2009 Volker Krause <vkrause@kde.org>
4 
5  This library is free software; you can redistribute it and/or modify it
6  under the terms of the GNU Library General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or (at your
8  option) any later version.
9 
10  This library is distributed in the hope that it will be useful, but WITHOUT
11  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13  License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to the
17  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  02110-1301, USA.
19 */
20 
21 #include "collectionfetchscope.h"
22 
23 #include <QString>
24 #include <QStringList>
25 
26 namespace Akonadi {
27 
28 class CollectionFetchScopePrivate : public QSharedData
29 {
30  public:
31  CollectionFetchScopePrivate() :
32  ancestorDepth( CollectionFetchScope::None ),
33  unsubscribed( false ),
34  statistics( false )
35  {
36  }
37 
38  CollectionFetchScopePrivate( const CollectionFetchScopePrivate &other )
39  : QSharedData( other )
40  {
41  resource = other.resource;
42  contentMimeTypes = other.contentMimeTypes;
43  ancestorDepth = other.ancestorDepth;
44  unsubscribed = other.unsubscribed;
45  statistics = other.statistics;
46  }
47 
48  public:
49  QString resource;
50  QStringList contentMimeTypes;
51  CollectionFetchScope::AncestorRetrieval ancestorDepth;
52  bool unsubscribed;
53  bool statistics;
54 };
55 
56 CollectionFetchScope::CollectionFetchScope()
57 {
58  d = new CollectionFetchScopePrivate();
59 }
60 
61 CollectionFetchScope::CollectionFetchScope( const CollectionFetchScope &other )
62  : d( other.d )
63 {
64 }
65 
66 CollectionFetchScope::~CollectionFetchScope()
67 {
68 }
69 
70 CollectionFetchScope &CollectionFetchScope::operator=( const CollectionFetchScope &other )
71 {
72  if ( &other != this ) {
73  d = other.d;
74  }
75 
76  return *this;
77 }
78 
79 bool CollectionFetchScope::isEmpty () const
80 {
81  return d->resource.isEmpty() && d->contentMimeTypes.isEmpty() && !d->statistics && !d->unsubscribed && d->ancestorDepth == None;
82 }
83 
84 bool CollectionFetchScope::includeUnubscribed () const
85 {
86  return includeUnsubscribed();
87 }
88 
89 bool CollectionFetchScope::includeUnsubscribed () const
90 {
91  return d->unsubscribed;
92 }
93 
94 void CollectionFetchScope::setIncludeUnsubscribed (bool include)
95 {
96  d->unsubscribed = include;
97 }
98 
99 bool CollectionFetchScope::includeStatistics () const
100 {
101  return d->statistics;
102 }
103 
104 void CollectionFetchScope::setIncludeStatistics (bool include)
105 {
106  d->statistics = include;
107 }
108 
109 QString CollectionFetchScope::resource () const
110 {
111  return d->resource;
112 }
113 
114 void CollectionFetchScope::setResource (const QString & resource)
115 {
116  d->resource = resource;
117 }
118 
119 QStringList CollectionFetchScope::contentMimeTypes () const
120 {
121  return d->contentMimeTypes;
122 }
123 
124 void CollectionFetchScope::setContentMimeTypes (const QStringList & mimeTypes)
125 {
126  d->contentMimeTypes = mimeTypes;
127 }
128 
129 CollectionFetchScope::AncestorRetrieval CollectionFetchScope::ancestorRetrieval() const
130 {
131  return d->ancestorDepth;
132 }
133 
134 void CollectionFetchScope::setAncestorRetrieval( AncestorRetrieval ancestorDepth )
135 {
136  d->ancestorDepth = ancestorDepth;
137 }
138 
139 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:33 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