Akonadi

collectionmovejob.h
1 /*
2  SPDX-FileCopyrightText: 2009 Volker Krause <[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 "job.h"
11 
12 namespace Akonadi
13 {
14 class Collection;
15 class 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 <[email protected]>
34  */
35 class AKONADICORE_EXPORT CollectionMoveJob : public Job
36 {
37  Q_OBJECT
38 
39 public:
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 
49 protected:
50  void doStart() override;
51  bool doHandleResponse(qint64 tag, const Protocol::CommandPtr &response) override;
52 
53 private:
54  Q_DECLARE_PRIVATE(CollectionMoveJob)
55 };
56 
57 }
58 
Represents a collection of PIM items.
Definition: collection.h:61
Base class for all actions in the Akonadi storage.
Definition: job.h:80
Job that moves a collection in the Akonadi storage to a new parent 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 Jun 25 2022 06:00:31 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.