Kgapi

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

KDE's Doxygen guidelines are available online.