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 * 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 <vkrause@kde.org>
42 * @since 4.6
43 */
44class AKONADICORE_EXPORT CollectionAttributesSynchronizationJob : public KJob
45{
46 Q_OBJECT
47
48public:
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
64private:
65 /// @cond PRIVATE
66 friend class CollectionAttributesSynchronizationJobPrivate;
67 std::unique_ptr<CollectionAttributesSynchronizationJobPrivate> const d;
68 /// @endcond
69};
70
71}
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 Tue Mar 26 2024 11:13:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.