Akonadi

collectionattributessynchronizationjob.h
1/*
2 * SPDX-FileCopyrightText: 2009 Volker Krause <vkrause@kde.org>
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
15namespace Akonadi
16{
17class Collection;
18class 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 * auto job = new CollectionAttributesSynchronizationJob(collection);
35 * connect(job, &KJob::result, this, &MyClass::synchronizationFinished);
36 * @endcode
37 *
38 * @note This is a KJob not an Akonadi::Job, so it won't auto-start!
39 *
40 * @author Volker Krause <vkrause@kde.org>
41 * @since 4.6
42 */
43class AKONADICORE_EXPORT CollectionAttributesSynchronizationJob : public KJob
44{
45 Q_OBJECT
46
47public:
48 /**
49 * Creates a new synchronization job for the given collection.
50 *
51 * @param collection The collection to synchronize.
52 */
53 explicit CollectionAttributesSynchronizationJob(const Collection &collection, QObject *parent = nullptr);
54
55 /**
56 * Destroys the synchronization job.
57 */
59
60 /* reimpl */
61 void start() override;
62
63private:
64 /// @cond PRIVATE
65 friend class CollectionAttributesSynchronizationJobPrivate;
66 std::unique_ptr<CollectionAttributesSynchronizationJobPrivate> const d;
67 /// @endcond
68};
69
70}
Job that synchronizes the attributes of a collection.
~CollectionAttributesSynchronizationJob() override
Destroys the synchronization job.
Represents a collection of PIM items.
Definition collection.h:62
Q_SCRIPTABLE Q_NOREPLY void start()
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.