Akonadi

specialcollectionsdiscoveryjob.h
1 /*
2  SPDX-FileCopyrightText: 2013 David Faure <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "akonadicore_export.h"
10 #include "collection.h"
11 #include "specialcollections.h"
12 #include <KCompositeJob>
13 
14 #include <memory>
15 
16 namespace Akonadi
17 {
18 class SpecialCollectionsDiscoveryJobPrivate;
19 
20 /**
21  * @short A job to discover all SpecialCollections.
22  *
23  * The collections get registered into SpecialCollections.
24  *
25  * This class is not meant to be used directly but as a base class for type
26  * specific special collection request jobs.
27  *
28  * @author David Faure <[email protected]>
29  * @since 4.11
30  */
31 class AKONADICORE_EXPORT SpecialCollectionsDiscoveryJob : public KCompositeJob
32 {
33  Q_OBJECT
34 
35 public:
36  /**
37  * Destroys the special collections request job.
38  */
40 
41  void start() override;
42 
43 protected:
44  /**
45  * Creates a new special collections request job.
46  *
47  * @param collections The SpecialCollections object that shall be used.
48  * @param parent The parent object.
49  */
50  explicit SpecialCollectionsDiscoveryJob(SpecialCollections *collections, const QStringList &mimeTypes, QObject *parent = nullptr);
51 
52  /* reimpl */
53  void slotResult(KJob *job) override;
54 
55 private:
56  /// @cond PRIVATE
57  std::unique_ptr<SpecialCollectionsDiscoveryJobPrivate> const d;
58  /// @endcond
59 };
60 
61 } // namespace Akonadi
62 
A job to discover all SpecialCollections.
Q_SCRIPTABLE Q_NOREPLY void start()
An interface to special collections.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jun 30 2022 03:51:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.