akonadi
collection_p.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AKONADI_COLLECTION_P_H
00021 #define AKONADI_COLLECTION_P_H
00022
00023 #include "collection.h"
00024 #include "cachepolicy.h"
00025 #include "collectionstatistics.h"
00026 #include "entity_p.h"
00027
00028 #include "qstringlist.h"
00029
00030 using namespace Akonadi;
00031
00035 class Akonadi::CollectionPrivate : public EntityPrivate
00036 {
00037 public:
00038 CollectionPrivate( Collection::Id id = -1 ) :
00039 EntityPrivate( id ),
00040 contentTypesChanged( false ),
00041 cachePolicyChanged( false )
00042 {}
00043
00044 CollectionPrivate( const CollectionPrivate &other ) :
00045 EntityPrivate( other )
00046 {
00047 name = other.name;
00048 resource = other.resource;
00049 statistics = other.statistics;
00050 contentTypes = other.contentTypes;
00051 cachePolicy = other.cachePolicy;
00052 contentTypesChanged = other.contentTypesChanged;
00053 cachePolicyChanged = other.cachePolicyChanged;
00054 }
00055
00056 ~CollectionPrivate()
00057 {
00058 }
00059
00060 CollectionPrivate* clone() const
00061 {
00062 return new CollectionPrivate( *this );
00063 }
00064
00065 void resetChangeLog()
00066 {
00067 contentTypesChanged = false;
00068 cachePolicyChanged = false;
00069 EntityPrivate::resetChangeLog();
00070 }
00071
00072 static Collection newRoot()
00073 {
00074 Collection root( 0 );
00075 QStringList types;
00076 types << Collection::mimeType();
00077 root.setContentMimeTypes( types );
00078 return root;
00079 }
00080
00081 QString name;
00082 QString resource;
00083 CollectionStatistics statistics;
00084 QStringList contentTypes;
00085 static const Collection root;
00086 CachePolicy cachePolicy;
00087 bool contentTypesChanged;
00088 bool cachePolicyChanged;
00089 };
00090
00091 #endif