Akonadi

collectionfetchjob.h
1 /*
2  Copyright (c) 2006 - 2007 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef AKONADI_COLLECTIONFETCHJOB_H
8 #define AKONADI_COLLECTIONFETCHJOB_H
9 
10 #include "akonadicore_export.h"
11 #include "collection.h"
12 #include "job.h"
13 
14 namespace Akonadi
15 {
16 
17 class CollectionFetchScope;
18 class CollectionFetchJobPrivate;
19 
41 class AKONADICORE_EXPORT CollectionFetchJob : public Job
42 {
43  Q_OBJECT
44 
45 public:
49  enum Type {
50  Base,
53  NonOverlappingRoots
54  };
55 
72  explicit CollectionFetchJob(const Collection &collection, Type type = FirstLevel, QObject *parent = nullptr);
73 
89  explicit CollectionFetchJob(const Collection::List &collections, QObject *parent = nullptr);
90 
109  CollectionFetchJob(const Collection::List &collections, Type type, QObject *parent = nullptr);
110 
118  explicit CollectionFetchJob(const QList<Collection::Id> &collections, Type type = Base, QObject *parent = nullptr);
119 
123  ~CollectionFetchJob() override;
124 
128  Q_REQUIRED_RESULT Collection::List collections() const;
129 
142  void setFetchScope(const CollectionFetchScope &fetchScope);
143 
157  Q_REQUIRED_RESULT CollectionFetchScope &fetchScope();
158 
159 Q_SIGNALS:
165  void collectionsReceived(const Akonadi::Collection::List &collections);
166 
167 protected:
168  void doStart() override;
169  bool doHandleResponse(qint64 tag, const Protocol::CommandPtr &response) override;
170 
171 protected Q_SLOTS:
172  //@cond PRIVATE
173  void slotResult(KJob *job) override;
174  //@endcond
175 
176 private:
177  Q_DECLARE_PRIVATE(CollectionFetchJob)
178 };
179 
180 }
181 
182 #endif
Specifies which parts of a collection should be fetched from the Akonadi storage. ...
Type
Describes the type of fetch depth.
Only list direct sub-collections of the base collection.
Represents a collection of PIM items.
Definition: collection.h:63
Job that fetches collections from the Akonadi storage.
Base class for all actions in the Akonadi storage.
Definition: job.h:80
Only fetch the base collection.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jul 8 2020 23:15:02 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.