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{
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}
void doStart() override
This method must be reimplemented in the concrete jobs.
bool doHandleResponse(qint64 tag, const Protocol::CommandPtr &response) override
This method should be reimplemented in the concrete jobs in case you want to handle incoming data.
CollectionMoveJob(const Collection &collection, const Collection &destination, QObject *parent=nullptr)
Creates a new collection move job for the given collection and destination.
Represents a collection of PIM items.
Definition collection.h:62
Job(QObject *parent=nullptr)
Creates a new job.
Definition job.cpp:290
Helper integration between Akonadi and Qt.
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:57 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.