Kgapi

tasklistcreatejob.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 "createjob.h"
12#include "kgapitasks_export.h"
13
14#include <QScopedPointer>
15
16namespace KGAPI2
17{
18
19/**
20 * @brief A job to create one or more new tasklists in user's Google Tasks account
21 *
22 * @author Daniel Vrátil <dvratil@redhat.com>
23 * @since 2.0
24 */
25class KGAPITASKS_EXPORT TaskListCreateJob : public KGAPI2::CreateJob
26{
27 Q_OBJECT
28
29public:
30 /**
31 * @brief Constructs a job that will create given @p taskList in user's
32 * Google Tasks account
33 *
34 * @param taskList Tasklist to create
35 * @param account Account to authenticate the request
36 * @param parent
37 */
38 explicit TaskListCreateJob(const TaskListPtr &taskList, const AccountPtr &account, QObject *parent = nullptr);
39
40 /**
41 * @brief Constructs a job that will create given @p taskLists in user's
42 * Google Tasks account
43 *
44 * @param taskLists Tasklists to create
45 * @param account Account to authenticate the request
46 * @param parent
47 */
48 explicit TaskListCreateJob(const TaskListsList &taskLists, const AccountPtr &account, QObject *parent = nullptr);
49
50 /**
51 * @brief Destructor
52 */
54
55protected:
56 /**
57 * @brief KGAPI2::Job::start implementation
58 */
59 void start() override;
60
61 /**
62 * @brief KGAPI2::CreateJob::handleReplyWithItems implementation
63 *
64 * @param reply
65 * @param rawData
66 */
67 ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override;
68
69private:
70 class Private;
72 friend class Private;
73};
74
75} // namespace KGAPI2
Abstract superclass for all jobs that create new objects on the server.
Definition createjob.h:26
A job to create one or more new tasklists in user's Google Tasks account.
~TaskListCreateJob() 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 Sat Dec 21 2024 17:00:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.