Akonadi Mime

specialmailcollections.h
1 /*
2  SPDX-FileCopyrightText: 2009 Constantin Berzan <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef AKONADI_SPECIALMAILCOLLECTIONS_H
8 #define AKONADI_SPECIALMAILCOLLECTIONS_H
9 
10 #include "akonadi-mime_export.h"
11 
12 #include <specialcollections.h>
13 
14 namespace Akonadi {
15 class SpecialMailCollectionsPrivate;
16 
53 class AKONADI_MIME_EXPORT SpecialMailCollections : public SpecialCollections
54 {
55  Q_OBJECT
56 
57 public:
64  enum Type {
65  Invalid = -1,
66  Root = 0,
73  LastType
74  };
75 
79  static SpecialMailCollections *self();
80 
85  Q_REQUIRED_RESULT bool hasCollection(Type type, const AgentInstance &instance) const;
86 
91  Q_REQUIRED_RESULT Akonadi::Collection collection(Type type, const AgentInstance &instance) const;
92 
98  Q_REQUIRED_RESULT static Type specialCollectionType(const Akonadi::Collection &collection);
99 
109  bool registerCollection(Type type, const Akonadi::Collection &collection);
110 
117  bool unregisterCollection(const Collection &collection);
118 
123  Q_REQUIRED_RESULT bool hasDefaultCollection(Type type) const;
124 
129  Q_REQUIRED_RESULT Akonadi::Collection defaultCollection(Type type) const;
130 
131  void verifyI18nDefaultCollection(Type type);
132 private Q_SLOTS:
133  void slotCollectionModified(KJob *job);
134 private:
135  //@cond PRIVATE
136  friend class SpecialMailCollectionsPrivate;
137 
138 #if 1 // TODO do this only if building tests:
139  friend class SpecialMailCollectionsTesting;
140  friend class LocalFoldersTest;
141 #endif
142 
143  SpecialMailCollections(SpecialMailCollectionsPrivate *dd);
144 
145  SpecialMailCollectionsPrivate *const d;
146  //@endcond
147 };
148 } // namespace Akonadi
149 
150 #endif // AKONADI_SPECIALMAILCOLLECTIONS_H
Interface to special mail collections such as inbox, outbox etc.
Type
Describes the possible types of special mail collections.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 5 2020 23:08:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.