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

akonadi

collectionfetchscope.cpp
00001 /*
00002     Copyright (c) 2008 Kevin Krammer <kevin.krammer@gmx.at>
00003     Copyright (c) 2009 Volker Krause <vkrause@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or modify it
00006     under the terms of the GNU Library General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or (at your
00008     option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful, but WITHOUT
00011     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013     License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to the
00017     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00018     02110-1301, USA.
00019 */
00020 
00021 #include "collectionfetchscope.h"
00022 
00023 #include <QString>
00024 #include <QStringList>
00025 
00026 namespace Akonadi {
00027 
00028 class CollectionFetchScopePrivate : public QSharedData
00029 {
00030   public:
00031     CollectionFetchScopePrivate() :
00032       ancestorDepth( CollectionFetchScope::None ),
00033       unsubscribed( false ),
00034       statistics( false )
00035     {
00036     }
00037 
00038     CollectionFetchScopePrivate( const CollectionFetchScopePrivate &other )
00039       : QSharedData( other )
00040     {
00041       resource = other.resource;
00042       contentMimeTypes = other.contentMimeTypes;
00043       ancestorDepth = other.ancestorDepth;
00044       unsubscribed = other.unsubscribed;
00045       statistics = other.statistics;
00046     }
00047 
00048   public:
00049     QString resource;
00050     QStringList contentMimeTypes;
00051     CollectionFetchScope::AncestorRetrieval ancestorDepth;
00052     bool unsubscribed;
00053     bool statistics;
00054 };
00055 
00056 CollectionFetchScope::CollectionFetchScope()
00057 {
00058   d = new CollectionFetchScopePrivate();
00059 }
00060 
00061 CollectionFetchScope::CollectionFetchScope( const CollectionFetchScope &other )
00062   : d( other.d )
00063 {
00064 }
00065 
00066 CollectionFetchScope::~CollectionFetchScope()
00067 {
00068 }
00069 
00070 CollectionFetchScope &CollectionFetchScope::operator=( const CollectionFetchScope &other )
00071 {
00072   if ( &other != this )
00073     d = other.d;
00074 
00075   return *this;
00076 }
00077 
00078 bool CollectionFetchScope::isEmpty () const
00079 {
00080   return d->resource.isEmpty() && d->contentMimeTypes.isEmpty() && !d->statistics && !d->unsubscribed && d->ancestorDepth == None;
00081 }
00082 
00083 bool CollectionFetchScope::includeUnubscribed () const
00084 {
00085   return includeUnsubscribed();
00086 }
00087 
00088 bool CollectionFetchScope::includeUnsubscribed () const
00089 {
00090   return d->unsubscribed;
00091 }
00092 
00093 void CollectionFetchScope::setIncludeUnsubscribed (bool include)
00094 {
00095   d->unsubscribed = include;
00096 }
00097 
00098 bool CollectionFetchScope::includeStatistics () const
00099 {
00100   return d->statistics;
00101 }
00102 
00103 void CollectionFetchScope::setIncludeStatistics (bool include)
00104 {
00105   d->statistics = include;
00106 }
00107 
00108 QString CollectionFetchScope::resource () const
00109 {
00110   return d->resource;
00111 }
00112 
00113 void CollectionFetchScope::setResource (const QString & resource)
00114 {
00115   d->resource = resource;
00116 }
00117 
00118 QStringList CollectionFetchScope::contentMimeTypes () const
00119 {
00120   return d->contentMimeTypes;
00121 }
00122 
00123 void CollectionFetchScope::setContentMimeTypes (const QStringList & mimeTypes)
00124 {
00125   d->contentMimeTypes = mimeTypes;
00126 }
00127 
00128 CollectionFetchScope::AncestorRetrieval CollectionFetchScope::ancestorRetrieval() const
00129 {
00130   return d->ancestorDepth;
00131 }
00132 
00133 void CollectionFetchScope::setAncestorRetrieval( AncestorRetrieval ancestorDepth )
00134 {
00135   d->ancestorDepth = ancestorDepth;
00136 }
00137 
00138 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:14 by doxygen 1.8.0 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.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 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