Akonadi

linkjob.cpp
1 /*
2  SPDX-FileCopyrightText: 2008 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "linkjob.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::LinkJobPrivate : public LinkJobImpl<LinkJob>
16 {
17 public:
18  explicit LinkJobPrivate(LinkJob *parent)
19  : LinkJobImpl<LinkJob>(parent)
20  {
21  }
22 };
23 
24 LinkJob::LinkJob(const Collection &collection, const Item::List &items, QObject *parent)
25  : Job(new LinkJobPrivate(this), parent)
26 {
27  Q_D(LinkJob);
28  d->destination = collection;
29  d->objectsToLink = items;
30 }
31 
33 {
34 }
35 
37 {
38  Q_D(LinkJob);
39  d->sendCommand(Protocol::LinkItemsCommand::Link);
40 }
41 
42 bool LinkJob::doHandleResponse(qint64 tag, const Protocol::CommandPtr &response)
43 {
44  return d_func()->handleResponse(tag, response);
45 }
46 
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: linkjob.cpp:42
~LinkJob() override
Destroys the link job.
Definition: linkjob.cpp:32
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 links items inside the Akonadi storage.
Definition: linkjob.h:53
void doStart() override
This method must be reimplemented in the concrete jobs.
Definition: linkjob.cpp:36
Helper integration between Akonadi and Qt.
LinkJob(const Collection &collection, const Item::List &items, QObject *parent=nullptr)
Creates the link job.
Definition: linkjob.cpp:24
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 07:17:48 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.