Kgapi

tasklistdeletejob.h
1/*
2 * This file is part of LibKGAPI library
3 *
4 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8
9#pragma once
10
11#include "deletejob.h"
12#include "kgapitasks_export.h"
13
14#include <QScopedPointer>
15
16namespace KGAPI2
17{
18
19/**
20 * @brief A job to delete one or more tasklists from user's Google Calendar
21 * account.
22 *
23 * Note that all tasks in these taskslists will be removed too. All operations
24 * are irreversible.
25 *
26 * @author Daniel Vrátil <dvratil@redhat.com>
27 * @since 2.0
28 */
29class KGAPITASKS_EXPORT TaskListDeleteJob : public KGAPI2::DeleteJob
30{
31 Q_OBJECT
32
33public:
34 /**
35 * @brief Constructs a new job that will delete given @p taskList from user's
36 * Google Tasks account
37 *
38 * @param taskList Tasklist to delete
39 * @param account Account to authenticate the request
40 * @param parent
41 */
42 explicit TaskListDeleteJob(const TaskListPtr &taskList, const AccountPtr &account, QObject *parent);
43
44 /**
45 * @brief Constructs a new job that will delete given @p taskLists from user's
46 * Google Tasks account
47 *
48 * @param taskLists Tasklists to delete
49 * @param account Account to authenticate the request
50 * @param parent
51 */
52 explicit TaskListDeleteJob(const TaskListsList &taskLists, const AccountPtr &account, QObject *parent);
53
54 /**
55 * @brief Constructs a new job that will delete tasklist with given
56 * @p taskListId from user's Google Tasks account
57 *
58 * @param taskListId ID of tasklist to delete
59 * @param account Account to authenticate the request
60 * @param parent
61 */
62 explicit TaskListDeleteJob(const QString &taskListId, const AccountPtr &account, QObject *parent);
63
64 /**
65 * @brief Constructs a new job that will delete tasklists with given
66 * @p taskListsIds from user's Google Tasks account
67 *
68 * @param taskListsIds IDs of tasklists to delete
69 * @param account Account to authenticate the request
70 * @param parent
71 */
72 explicit TaskListDeleteJob(const QStringList &taskListsIds, const AccountPtr &account, QObject *parent);
73
74 /**
75 * @brief Destructor
76 */
78
79protected:
80 /**
81 * @brief KGAPI2::Job::start
82 */
83 void start() override;
84
85 /**
86 * @brief KGAPI2::Job::handleReply
87 *
88 * @param reply
89 * @param rawData
90 */
91 void handleReply(const QNetworkReply *reply, const QByteArray &rawData) override;
92
93private:
94 class Private;
96 friend class Private;
97};
98
99} // namespace KGAPI2
Abstract superclass for all jobs that delete resources from Google.
Definition deletejob.h:25
A job to delete one or more tasklists from user's Google Calendar account.
~TaskListDeleteJob() override
Destructor.
Q_SCRIPTABLE Q_NOREPLY void start()
A job to fetch a single map tile described by a StaticMapUrl.
Definition blog.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:58:18 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.