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

akonadi

  • akonadi
specialcollections.h
1/*
2 Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com>
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_SPECIALCOLLECTIONS_H
21#define AKONADI_SPECIALCOLLECTIONS_H
22
23#include "akonadi_export.h"
24
25#include <QtCore/QObject>
26
27#include "akonadi/collection.h"
28#include <akonadi/item.h>
29
30class KCoreConfigSkeleton;
31class KJob;
32
33namespace Akonadi {
34
35class AgentInstance;
36class SpecialCollectionsPrivate;
37
65class AKONADI_EXPORT SpecialCollections : public QObject
66{
67 Q_OBJECT
68
69public:
73 ~SpecialCollections();
74
79 bool hasCollection(const QByteArray &type, const AgentInstance &instance) const;
80
85 Akonadi::Collection collection(const QByteArray &type, const AgentInstance &instance) const;
86
96 bool registerCollection(const QByteArray &type, const Akonadi::Collection &collection);
97
103 bool unregisterCollection(const Collection &collection);
104
110 static void unsetSpecialCollection(const Akonadi::Collection &collection);
111
120 static void setSpecialCollectionType(const QByteArray &type, const Akonadi::Collection &collection);
121
126 bool hasDefaultCollection(const QByteArray &type) const;
127
132 Akonadi::Collection defaultCollection(const QByteArray &type) const;
133
134Q_SIGNALS:
141 void collectionsChanged(const Akonadi::AgentInstance &instance);
142
147 void defaultCollectionsChanged();
148
149protected:
156 explicit SpecialCollections(KCoreConfigSkeleton *config, QObject *parent = 0);
157
158private:
159 //@cond PRIVATE
160 friend class SpecialCollectionsRequestJob;
161 friend class SpecialCollectionsRequestJobPrivate;
162 friend class SpecialCollectionsPrivate;
163
164#if 1 // TODO do this only if building tests:
165 friend class SpecialMailCollectionsTesting;
166 friend class LocalFoldersTest;
167#endif
168
169 SpecialCollectionsPrivate *const d;
170
171 Q_PRIVATE_SLOT(d, void collectionRemoved(const Akonadi::Collection &))
172 Q_PRIVATE_SLOT(d, void collectionStatisticsChanged(Akonadi::Collection::Id, const Akonadi::CollectionStatistics &))
173 Q_PRIVATE_SLOT(d, void collectionFetchJobFinished(KJob *))
174 //@endcond
175};
176
177} // namespace Akonadi
178
179#endif // AKONADI_SPECIALCOLLECTIONS_H
Akonadi::AgentInstance
A representation of an agent instance.
Definition: agentinstance.h:63
Akonadi::CollectionStatistics
Provides statistics information of a Collection.
Definition: collectionstatistics.h:70
Akonadi::Collection
Represents a collection of PIM items.
Definition: collection.h:76
Akonadi::Entity::Id
qint64 Id
Describes the unique id type.
Definition: entity.h:65
Akonadi::SpecialCollectionsPrivate
Definition: specialcollections_p.h:45
Akonadi::SpecialCollectionsRequestJob
A job to request SpecialCollections.
Definition: specialcollectionsrequestjob.h:55
Akonadi::SpecialCollections
An interface to special collections.
Definition: specialcollections.h:66
Akonadi::SpecialCollections::defaultCollectionsChanged
void defaultCollectionsChanged()
Emitted when the special collections for the default resource have been changed (for example,...
Akonadi::SpecialCollections::collectionsChanged
void collectionsChanged(const Akonadi::AgentInstance &instance)
Emitted when the special collections for a resource have been changed (for example,...
Akonadi::SpecialMailCollectionsTesting
Definition: specialmailcollectionstesting_p.h:34
Akonadi
FreeBusyManager::Singleton.
Definition: actionstatemanager_p.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 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-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 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
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