• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.9.1 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  return *this;
76 }
77 
78 bool CollectionFetchScope::isEmpty () const
79 {
80  return d->resource.isEmpty() && d->contentMimeTypes.isEmpty() && !d->statistics && !d->unsubscribed && d->ancestorDepth == None;
81 }
82 
83 bool CollectionFetchScope::includeUnubscribed () const
84 {
85  return includeUnsubscribed();
86 }
87 
88 bool CollectionFetchScope::includeUnsubscribed () const
89 {
90  return d->unsubscribed;
91 }
92 
93 void CollectionFetchScope::setIncludeUnsubscribed (bool include)
94 {
95  d->unsubscribed = include;
96 }
97 
98 bool CollectionFetchScope::includeStatistics () const
99 {
100  return d->statistics;
101 }
102 
103 void CollectionFetchScope::setIncludeStatistics (bool include)
104 {
105  d->statistics = include;
106 }
107 
108 QString CollectionFetchScope::resource () const
109 {
110  return d->resource;
111 }
112 
113 void CollectionFetchScope::setResource (const QString & resource)
114 {
115  d->resource = resource;
116 }
117 
118 QStringList CollectionFetchScope::contentMimeTypes () const
119 {
120  return d->contentMimeTypes;
121 }
122 
123 void CollectionFetchScope::setContentMimeTypes (const QStringList & mimeTypes)
124 {
125  d->contentMimeTypes = mimeTypes;
126 }
127 
128 CollectionFetchScope::AncestorRetrieval CollectionFetchScope::ancestorRetrieval() const
129 {
130  return d->ancestorDepth;
131 }
132 
133 void CollectionFetchScope::setAncestorRetrieval( AncestorRetrieval ancestorDepth )
134 {
135  d->ancestorDepth = ancestorDepth;
136 }
137 
138 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Sep 24 2012 09:06:25 by doxygen 1.8.1.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.9.1 API Reference

Skip menu "kdepimlibs-4.9.1 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • 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