Kgapi

taskdeletejob.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 tasks from tasklist in
21 * user's Google Tasks account
22 *
23 * Note that operation is irreversible.
24 *
25 * @author Daniel Vrátil <dvratil@redhat.com>
26 * @since 2.0
27 */
28class KGAPITASKS_EXPORT TaskDeleteJob : public KGAPI2::DeleteJob
29{
30 Q_OBJECT
31
32public:
33 /**
34 * @brief Constructs a new job that will delete given @p task from a
35 * tasklist with given @p taskListId
36 *
37 * @param task Task to delete
38 * @param taskListId ID of tasklist in which the task is stored
39 * @param account Account to authenticate the request
40 * @param parent
41 */
42 explicit TaskDeleteJob(const TaskPtr &task, const QString &taskListId, const AccountPtr &account, QObject *parent = nullptr);
43
44 /**
45 * @brief Constructs a new job that will delete given @p tasks from a
46 * tasklist with given @p taskListId
47 *
48 * @param tasks Tasks to delete
49 * @param tasklistId ID of tasklist in which the task is stored
50 * @param account Account to authenticate the request
51 * @param parent
52 */
53 explicit TaskDeleteJob(const TasksList &tasks, const QString &tasklistId, const AccountPtr &account, QObject *parent = nullptr);
54
55 /**
56 * @brief Constructs a new job that will delete task with given @p taskId
57 * from a tasklist with given @p taskListId
58 *
59 * @param taskId ID of task to delete
60 * @param taskListId ID of tasklist in which the task is stored
61 * @param account Account to authenticate the request
62 * @param parent
63 */
64 explicit TaskDeleteJob(const QString &taskId, const QString &taskListId, const AccountPtr &account, QObject *parent = nullptr);
65
66 /**
67 * @brief Constructs a new job that will delete tasks with given @p tasksIds
68 * from a tasklist with given @p taskListId
69 *
70 * @param tasksIds IDs of tasks to delete
71 * @param taskListId ID of tasklist in which the task is stored
72 * @param account Account to authenticate the request
73 * @param parent
74 */
75 explicit TaskDeleteJob(const QStringList &tasksIds, const QString &taskListId, const AccountPtr &account, QObject *parent = nullptr);
76
77 /**
78 * @brief Destructor
79 */
80 ~TaskDeleteJob() override;
81
82protected:
83 /**
84 * @brief KGAPI2::Job::start implementation
85 */
86 void start() override;
87
88 /**
89 * @brief KGAPI2::Job::handleReply implementation
90 *
91 * @param reply
92 * @param rawData
93 */
94 void handleReply(const QNetworkReply *reply, const QByteArray &rawData) override;
95
96private:
97 class Private;
99 friend class Private;
100};
101
102} // namespace KGAPI2
Abstract superclass for all jobs that delete resources from Google.
Definition deletejob.h:25
A job to delete one or more tasks from tasklist in user's Google Tasks account.
~TaskDeleteJob() 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 Dec 20 2024 11:59:24 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.