Akonadi

collectionattributessynchronizationjob.h
1 /*
2  * SPDX-FileCopyrightText: 2009 Volker Krause <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.1-or-later
5  */
6 
7 #pragma once
8 
9 #include "akonadicore_export.h"
10 
11 #include <KJob>
12 
13 #include <memory>
14 
15 namespace Akonadi
16 {
17 class Collection;
18 class CollectionAttributesSynchronizationJobPrivate;
19 
20 /**
21  * @short Job that synchronizes the attributes of a collection.
22  *
23  * This job will trigger a resource to synchronize the attributes of
24  * a collection based on what the backend is reporting to store them in the
25  * Akonadi storage.
26  *
27  * Example:
28  *
29  * @code
30  * using namespace Akonadi;
31  *
32  * const Collection collection = ...;
33  *
34  * CollectionAttributesSynchronizationJob *job = new CollectionAttributesSynchronizationJob( collection );
35  * connect( job, SIGNAL(result(KJob*)), SLOT(synchronizationFinished(KJob*)) );
36  *
37  * @endcode
38  *
39  * @note This is a KJob not an Akonadi::Job, so it won't auto-start!
40  *
41  * @author Volker Krause <[email protected]>
42  * @since 4.6
43  */
44 class AKONADICORE_EXPORT CollectionAttributesSynchronizationJob : public KJob
45 {
46  Q_OBJECT
47 
48 public:
49  /**
50  * Creates a new synchronization job for the given collection.
51  *
52  * @param collection The collection to synchronize.
53  */
54  explicit CollectionAttributesSynchronizationJob(const Collection &collection, QObject *parent = nullptr);
55 
56  /**
57  * Destroys the synchronization job.
58  */
60 
61  /* reimpl */
62  void start() override;
63 
64 private:
65  /// @cond PRIVATE
66  friend class CollectionAttributesSynchronizationJobPrivate;
67  std::unique_ptr<CollectionAttributesSynchronizationJobPrivate> const d;
68  /// @endcond
69 };
70 
71 }
72 
Q_SCRIPTABLE Q_NOREPLY void start()
Represents a collection of PIM items.
Definition: collection.h:61
Job that synchronizes the attributes of a collection.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jul 2 2022 06:41:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.