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#include "protocol_p.h"
13
14using namespace Akonadi;
15
16class Akonadi::UnlinkJobPrivate : public LinkJobImpl<UnlinkJob, Protocol::LinkItemsCommand::Unlink>
17{
18public:
19 explicit UnlinkJobPrivate(UnlinkJob *parent)
20 : LinkJobImpl(parent)
21 {
22 }
23};
24
25UnlinkJob::UnlinkJob(const Collection &collection, const Item::List &items, QObject *parent)
26 : Job(new UnlinkJobPrivate(this), parent)
27{
29 d->destination = collection;
30 d->objectsToLink = items;
31}
32
33UnlinkJob::~UnlinkJob() = default;
34
36{
38 d->doStart();
39}
40
41bool UnlinkJob::doHandleResponse(qint64 tag, const Protocol::CommandPtr &response)
42{
44 return d->handleResponse(tag, response);
45}
46
47#include "moc_unlinkjob.cpp"
Represents a collection of PIM items.
Definition collection.h:62
QList< Item > List
Describes a list of items.
Definition item.h:110
Job(QObject *parent=nullptr)
Creates a new job.
Definition job.cpp:290
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:41
void doStart() override
This method must be reimplemented in the concrete jobs.
Definition unlinkjob.cpp:35
~UnlinkJob() override
Destroys the unlink job.
UnlinkJob(const Collection &collection, const Item::List &items, QObject *parent=nullptr)
Creates a new unlink job.
Definition unlinkjob.cpp:25
Helper integration between Akonadi and Qt.
QObject * parent() const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Mar 28 2025 11:53:21 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.