Akonadi

unlinkjob.cpp
1 /*
2  SPDX-FileCopyrightText: 2008 Volker Krause <[email protected]>
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 
13 using namespace Akonadi;
14 
15 class Akonadi::UnlinkJobPrivate : public LinkJobImpl<UnlinkJob>
16 {
17 public:
18  explicit UnlinkJobPrivate(UnlinkJob *parent)
19  : LinkJobImpl<UnlinkJob>(parent)
20  {
21  }
22 };
23 
24 UnlinkJob::UnlinkJob(const Collection &collection, const Item::List &items, QObject *parent)
25  : Job(new UnlinkJobPrivate(this), parent)
26 {
27  Q_D(UnlinkJob);
28  d->destination = collection;
29  d->objectsToLink = items;
30 }
31 
33 {
34 }
35 
37 {
38  Q_D(UnlinkJob);
39  d->sendCommand(Protocol::LinkItemsCommand::Unlink);
40 }
41 
42 bool UnlinkJob::doHandleResponse(qint64 tag, const Protocol::CommandPtr &response)
43 {
44  Q_D(UnlinkJob);
45  return d->handleResponse(tag, response);
46 }
Represents a collection of PIM items.
Definition: collection.h:63
Base class for all actions in the Akonadi storage.
Definition: job.h:80
Job that unlinks items inside the Akonadi storage.
Definition: unlinkjob.h:53
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
~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.
void doStart() override
This method must be reimplemented in the concrete jobs.
Definition: unlinkjob.cpp:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 12 2020 23:16:11 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.