Warning: That file was not part of the compilation database. It may have many parsing errors.

1/*
2 Copyright (c) 2008 Volker Krause <vkrause@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef AKONADI_UNLINKJOB_H
21#define AKONADI_UNLINKJOB_H
22
23#include <akonadi/job.h>
24#include <akonadi/item.h>
25
26namespace Akonadi {
27
28class Collection;
29class UnlinkJobPrivate;
30
31/**
32 * @short Job that unlinks items inside the Akonadi storage.
33 *
34 * This job allows you to remove references to a set of items in a virtual
35 * collection.
36 *
37 * Example:
38 *
39 * @code
40 *
41 * // Unlink the given items from the given collection
42 * const Akonadi::Collection virtualCollection = ...
43 * const Akonadi::Item::List items = ...
44 *
45 * Akonadi::UnlinkJob *job = new Akonadi::UnlinkJob( virtualCollection, items );
46 * connect( job, SIGNAL(result(KJob*)), SLOT(jobFinished(KJob*)) );
47 *
48 * ...
49 *
50 * MyClass::jobFinished( KJob *job )
51 * {
52 * if ( job->error() )
53 * qDebug() << "Error occurred";
54 * else
55 * qDebug() << "Unlinked items successfully";
56 * }
57 *
58 * @endcode
59 *
60 * @author Volker Krause <vkrause@kde.org>
61 * @since 4.2
62 * @see LinkJob
63 */
64class AKONADI_EXPORT UnlinkJob : public Job
65{
66 Q_OBJECT
67public:
68 /**
69 * Creates a new unlink job.
70 *
71 * The job will remove references to the given items from the given collection.
72 *
73 * @param collection The collection from which the references should be removed.
74 * @param items The items of which the references should be removed.
75 * @param parent The parent object.
76 */
77 UnlinkJob(const Collection &collection, const Item::List &items, QObject *parent = 0);
78
79 /**
80 * Destroys the unlink job.
81 */
82 ~UnlinkJob();
83
84protected:
85 void doStart();
86
87private:
88 Q_DECLARE_PRIVATE(UnlinkJob)
89 template <typename T> friend class LinkJobImpl;
90};
91
92}
93
94#endif
95

Warning: That file was not part of the compilation database. It may have many parsing errors.