Kgapi

taskmodifyjob.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 "kgapitasks_export.h"
12#include "modifyjob.h"
13
14#include <QScopedPointer>
15
16namespace KGAPI2
17{
18
19/**
20 * @brief A job to modify tasks in a tasklist in user's Google Tasks account.
21 *
22 * @author Daniel Vrátil <dvratil@redhat.com>
23 * @since 2.0
24 */
25class KGAPITASKS_EXPORT TaskModifyJob : public KGAPI2::ModifyJob
26{
27 Q_OBJECT
28
29public:
30 /**
31 * @brief Constructs a job that will write changes in given @p task to
32 * corresponding task in a tasklist with given @p taskListId
33 *
34 * @param task Task to modify
35 * @param taskListId ID of tasklist where the event is stored
36 * @param account Account to authenticate the request
37 * @param parent
38 */
39 explicit TaskModifyJob(const TaskPtr &task, const QString &taskListId, const AccountPtr &account, QObject *parent = nullptr);
40
41 /**
42 * @brief Constructs a job that will write changes in given @p tasks to
43 * corresponding tasks in tasklist with given @p taskListId
44 *
45 * @param tasks Tasks to modify
46 * @param taskListId ID of tasklist where the event is stored
47 * @param account Account to authenticate the request
48 * @param parent
49 */
50 explicit TaskModifyJob(const TasksList &tasks, const QString &taskListId, const AccountPtr &account, QObject *parent = nullptr);
51
52 /**
53 * @brief Destructor
54 */
55 ~TaskModifyJob() override;
56
57protected:
58 /**
59 * @brief KGAPI2::Job::start implementation
60 */
61 void start() override;
62
63 /**
64 * @brief KGAPI2::ModifyJob::handleReplyWithItems implementation
65 *
66 * @param reply
67 * @param rawData
68 */
69 ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override;
70
71private:
72 class Private;
74 friend class Private;
75};
76
77} // namespace KGAPI2
Abstract superclass for all jobs that somehow modify resources on Google.
Definition modifyjob.h:25
A job to modify tasks in a tasklist in user's Google Tasks account.
~TaskModifyJob() 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 Nov 22 2024 12:08:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.