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

akonadi

  • sources
  • kde-4.14
  • kdepimlibs
  • akonadi
collection_p.h
1 /*
2  Copyright (c) 2006 - 2008 Volker Krause <vkrause@kde.org>
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 AKONADI_COLLECTION_P_H
21 #define AKONADI_COLLECTION_P_H
22 
23 #include "collection.h"
24 #include "cachepolicy.h"
25 #include "collectionstatistics.h"
26 #include "entity_p.h"
27 
28 #include "qstringlist.h"
29 
30 using namespace Akonadi;
31 
35 class Akonadi::CollectionPrivate : public EntityPrivate
36 {
37 public:
38  CollectionPrivate(Collection::Id id = -1)
39  : EntityPrivate(id)
40  , contentTypesChanged(false)
41  , cachePolicyChanged(false)
42  , isVirtual(false)
43  , enabled(true)
44  , enabledChanged(false)
45  , displayPreference(Collection::ListDefault)
46  , syncPreference(Collection::ListDefault)
47  , indexPreference(Collection::ListDefault)
48  , listPreferenceChanged(false)
49  , referenced(false)
50  , referencedChanged(false)
51  {}
52 
53  CollectionPrivate(const CollectionPrivate &other)
54  : EntityPrivate(other)
55  {
56  name = other.name;
57  resource = other.resource;
58  statistics = other.statistics;
59  contentTypes = other.contentTypes;
60  cachePolicy = other.cachePolicy;
61  contentTypesChanged = other.contentTypesChanged;
62  cachePolicyChanged = other.cachePolicyChanged;
63  isVirtual = other.isVirtual;
64  enabled = other.enabled;
65  enabledChanged = other.enabledChanged;
66  displayPreference = other.displayPreference;
67  syncPreference = other.syncPreference;
68  indexPreference = other.indexPreference;
69  listPreferenceChanged = other.listPreferenceChanged;
70  referenced = other.referenced;
71  referencedChanged = other.referencedChanged;
72  }
73 
74  ~CollectionPrivate()
75  {
76  }
77 
78  CollectionPrivate *clone() const
79  {
80  return new CollectionPrivate(*this);
81  }
82 
83  void resetChangeLog()
84  {
85  contentTypesChanged = false;
86  cachePolicyChanged = false;
87  enabledChanged = false;
88  listPreferenceChanged = false;
89  referencedChanged = false;
90  EntityPrivate::resetChangeLog();
91  }
92 
93  static Collection newRoot()
94  {
95  Collection rootCollection(0);
96  QStringList types;
97  types << Collection::mimeType();
98  rootCollection.setContentMimeTypes(types);
99  return rootCollection;
100  }
101 
102  QString name;
103  QString resource;
104  CollectionStatistics statistics;
105  QStringList contentTypes;
106  static const Collection root;
107  CachePolicy cachePolicy;
108  bool contentTypesChanged: 1;
109  bool cachePolicyChanged: 1;
110  bool isVirtual: 1;
111  bool enabled;
112  bool enabledChanged;
113  Collection::ListPreference displayPreference;
114  Collection::ListPreference syncPreference;
115  Collection::ListPreference indexPreference;
116  bool listPreferenceChanged;
117  bool referenced;
118  bool referencedChanged;
119 };
120 
121 #endif
Akonadi::Collection::ListPreference
ListPreference
Describes the list preference value.
Definition: collection.h:324
Akonadi::CollectionStatistics
Provides statistics information of a Collection.
Definition: collectionstatistics.h:69
Akonadi::Collection
Represents a collection of PIM items.
Definition: collection.h:75
Akonadi::Entity::Id
qint64 Id
Describes the unique id type.
Definition: entity.h:65
Akonadi::Collection::mimeType
static QString mimeType()
Returns the mimetype used for collections.
Definition: collection.cpp:197
QString
Akonadi::CachePolicy
Represents the caching policy for a collection.
Definition: cachepolicy.h:71
QStringList
Akonadi::Collection::ListDefault
Fallback to enabled state.
Definition: collection.h:327
Akonadi::EntityPrivate
Definition: entity_p.h:39
Akonadi::Collection::setContentMimeTypes
void setContentMimeTypes(const QStringList &types)
Sets the list of possible content mime types.
Definition: collection.cpp:120
Akonadi::CollectionPrivate
Definition: collection_p.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:02 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
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

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