Akonadi

linkjob.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 "linkjob.h"
8
9#include "collection.h"
10#include "job_p.h"
11#include "linkjobimpl_p.h"
12
13using namespace Akonadi;
14
15class Akonadi::LinkJobPrivate : public LinkJobImpl<LinkJob>
16{
17public:
18 explicit LinkJobPrivate(LinkJob *parent)
19 : LinkJobImpl<LinkJob>(parent)
20 {
21 }
22};
23
24LinkJob::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
35
37{
38 Q_D(LinkJob);
39 d->sendCommand(Protocol::LinkItemsCommand::Link);
40}
41
42bool LinkJob::doHandleResponse(qint64 tag, const Protocol::CommandPtr &response)
43{
44 return d_func()->handleResponse(tag, response);
45}
46
47#include "moc_linkjob.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 links items inside the Akonadi storage.
Definition linkjob.h:52
~LinkJob() override
Destroys the link job.
Definition linkjob.cpp:32
LinkJob(const Collection &collection, const Item::List &items, QObject *parent=nullptr)
Creates the link job.
Definition linkjob.cpp:24
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
void doStart() override
This method must be reimplemented in the concrete jobs.
Definition linkjob.cpp:36
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 Sat Dec 21 2024 17:01:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.