00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AKONADI_SPECIALMAILCOLLECTIONS_H
00021 #define AKONADI_SPECIALMAILCOLLECTIONS_H
00022
00023 #include "akonadi-kmime_export.h"
00024
00025 #include "akonadi/specialcollections.h"
00026
00027 namespace Akonadi {
00028
00029 class SpecialMailCollectionsPrivate;
00030
00067 class AKONADI_KMIME_EXPORT SpecialMailCollections : public SpecialCollections
00068 {
00069 Q_OBJECT
00070
00071 public:
00078 enum Type
00079 {
00080 Invalid = -1,
00081 Root = 0,
00082 Inbox,
00083 Outbox,
00084 SentMail,
00085 Trash,
00086 Drafts,
00087 Templates,
00088 LastType
00089 };
00090
00094 static SpecialMailCollections *self();
00095
00100 bool hasCollection( Type type, const AgentInstance &instance ) const;
00101
00106 Akonadi::Collection collection( Type type, const AgentInstance &instance ) const;
00107
00116 bool registerCollection( Type type, const Akonadi::Collection &collection );
00117
00122 bool hasDefaultCollection( Type type ) const;
00123
00128 Akonadi::Collection defaultCollection( Type type ) const;
00129
00130 private:
00131
00132 friend class SpecialMailCollectionsPrivate;
00133
00134 #if 1 // TODO do this only if building tests:
00135 friend class SpecialMailCollectionsTesting;
00136 friend class LocalFoldersTest;
00137 #endif
00138
00139 SpecialMailCollections( SpecialMailCollectionsPrivate *dd );
00140
00141 SpecialMailCollectionsPrivate *const d;
00142
00143 };
00144
00145 }
00146
00147 #endif // AKONADI_SPECIALMAILCOLLECTIONS_H