Akonadi

collectionmovejob.h
1/*
2 SPDX-FileCopyrightText: 2009 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "akonadicore_export.h"
10#include "job.h"
11
12namespace Akonadi
13{
14class Collection;
15class CollectionMoveJobPrivate;
16
17/**
18 * @short Job that moves a collection in the Akonadi storage to a new parent collection.
19 *
20 * This job moves an existing collection to a new parent collection.
21 *
22 * @code
23 *
24 * const Akonadi::Collection collection = ...
25 * const Akonadi::Collection newParent = ...
26 *
27 * Akonadi::CollectionMoveJob *job = new Akonadi::CollectionMoveJob( collection, newParent );
28 * connect( job, SIGNAL(result(KJob*)), this, SLOT(moveResult(KJob*)) );
29 *
30 * @endcode
31 *
32 * @since 4.4
33 * @author Volker Krause <vkrause@kde.org>
34 */
35class AKONADICORE_EXPORT CollectionMoveJob : public Job
36{
37 Q_OBJECT
38
39public:
40 /**
41 * Creates a new collection move job for the given collection and destination
42 *
43 * @param collection The collection to move.
44 * @param destination The destination collection where @p collection should be moved to.
45 * @param parent The parent object.
46 */
47 CollectionMoveJob(const Collection &collection, const Collection &destination, QObject *parent = nullptr);
48
49protected:
50 void doStart() override;
51 bool doHandleResponse(qint64 tag, const Protocol::CommandPtr &response) override;
52
53private:
54 Q_DECLARE_PRIVATE(CollectionMoveJob)
55};
56
57}
Job that moves a collection in the Akonadi storage to a new parent collection.
Represents a collection of PIM items.
Definition collection.h:62
Base class for all actions in the Akonadi storage.
Definition job.h:81
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 1 2024 18:51:22 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.