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

akonadi

  • sources
  • kde-4.12
  • 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  {}
44 
45  CollectionPrivate( const CollectionPrivate &other ) :
46  EntityPrivate( other )
47  {
48  name = other.name;
49  resource = other.resource;
50  statistics = other.statistics;
51  contentTypes = other.contentTypes;
52  cachePolicy = other.cachePolicy;
53  contentTypesChanged = other.contentTypesChanged;
54  cachePolicyChanged = other.cachePolicyChanged;
55  isVirtual = other.isVirtual;
56  }
57 
58  ~CollectionPrivate()
59  {
60  }
61 
62  CollectionPrivate* clone() const
63  {
64  return new CollectionPrivate( *this );
65  }
66 
67  void resetChangeLog()
68  {
69  contentTypesChanged = false;
70  cachePolicyChanged = false;
71  EntityPrivate::resetChangeLog();
72  }
73 
74  static Collection newRoot()
75  {
76  Collection rootCollection( 0 );
77  QStringList types;
78  types << Collection::mimeType();
79  rootCollection.setContentMimeTypes( types );
80  return rootCollection;
81  }
82 
83  QString name;
84  QString resource;
85  CollectionStatistics statistics;
86  QStringList contentTypes;
87  static const Collection root;
88  CachePolicy cachePolicy;
89  bool contentTypesChanged: 1;
90  bool cachePolicyChanged: 1;
91  bool isVirtual: 1;
92 };
93 
94 #endif
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
Akonadi::CachePolicy
Represents the caching policy for a collection.
Definition: cachepolicy.h:71
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-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:26 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
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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