Akonadi

unlinkjob.cpp
1/*
2 SPDX-FileCopyrightText: 2008 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "unlinkjob.h"
8
9#include "collection.h"
10#include "job_p.h"
11#include "linkjobimpl_p.h"
12
13using namespace Akonadi;
14
15class Akonadi::UnlinkJobPrivate : public LinkJobImpl<UnlinkJob>
16{
17public:
18 explicit UnlinkJobPrivate(UnlinkJob *parent)
19 : LinkJobImpl<UnlinkJob>(parent)
20 {
21 }
22};
23
24UnlinkJob::UnlinkJob(const Collection &collection, const Item::List &items, QObject *parent)
25 : Job(new UnlinkJobPrivate(this), parent)
26{
28 d->destination = collection;
29 d->objectsToLink = items;
30}
31
35
37{
39 d->sendCommand(Protocol::LinkItemsCommand::Unlink);
40}
41
42bool UnlinkJob::doHandleResponse(qint64 tag, const Protocol::CommandPtr &response)
43{
45 return d->handleResponse(tag, response);
46}
47
48#include "moc_unlinkjob.cpp"
Represents a collection of PIM items.
Definition collection.h:62
Base class for all actions in the Akonadi storage.
Definition job.h:81
Job that unlinks items inside the Akonadi storage.
Definition unlinkjob.h:52
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.
Definition unlinkjob.cpp:42
void doStart() override
This method must be reimplemented in the concrete jobs.
Definition unlinkjob.cpp:36
~UnlinkJob() override
Destroys the unlink job.
Definition unlinkjob.cpp:32
UnlinkJob(const Collection &collection, const Item::List &items, QObject *parent=nullptr)
Creates a new unlink job.
Definition unlinkjob.cpp:24
Helper integration between Akonadi and Qt.
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:31:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.