Kgapi

calendardeletejob.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#pragma once
9
10#include "deletejob.h"
11#include "kgapicalendar_export.h"
12
13#include <QScopedPointer>
14
15namespace KGAPI2
16{
17
18/**
19 * @brief A job to delete one or more calendars from user's Google Calendar
20 * account.
21 *
22 * Note that all events in these calendars will be removed too. All operations
23 * are irreversible.
24 *
25 * @author Daniel Vrátil <dvratil@redhat.com>
26 * @since 2.0
27 */
28class KGAPICALENDAR_EXPORT CalendarDeleteJob : public KGAPI2::DeleteJob
29{
30 Q_OBJECT
31
32public:
33 /**
34 * @brief Constructs a new job that will delete given @p calendar from user's
35 * Google Calendar account
36 *
37 * @param calendar Calendar to delete
38 * @param account Account to authenticate the request
39 * @param parent
40 */
41 explicit CalendarDeleteJob(const CalendarPtr &calendar, const AccountPtr &account, QObject *parent);
42
43 /**
44 * @brief Constructs a new job that will delete given @p calendars from user's
45 * Google Calendar account
46 *
47 * @param calendars Calendars to delete
48 * @param account Account to authenticate the request
49 * @param parent
50 */
51 explicit CalendarDeleteJob(const CalendarsList &calendars, const AccountPtr &account, QObject *parent);
52
53 /**
54 * @brief Constructs a new job that will delete calendar with given
55 * @p calendarId from user's Google Calendar account
56 *
57 * @param calendarId ID of calendar to delete
58 * @param account Account to authenticate the request
59 * @param parent
60 */
61 explicit CalendarDeleteJob(const QString &calendarId, const AccountPtr &account, QObject *parent);
62
63 /**
64 * @brief Constructs a new job that will delete calendars with given
65 * @p calendarsIds from user's Google Calendar account
66 *
67 * @param calendarsIds IDs of calendar to delete
68 * @param account Account to authenticate the request
69 * @param parent
70 */
71 explicit CalendarDeleteJob(const QStringList &calendarsIds, const AccountPtr &account, QObject *parent);
72
73 /**
74 * @brief Destructor
75 */
77
78protected:
79 /**
80 * @brief KGAPI2::Job::start implementation
81 */
82 void start() override;
83
84 /**
85 * @brief KGAPI2::Job::handleReply implementation
86 *
87 * @param reply
88 * @param rawData
89 */
90 void handleReply(const QNetworkReply *reply, const QByteArray &rawData) override;
91
92private:
93 class Private;
95 friend class Private;
96};
97
98} // namespace KGAPI2
A job to delete one or more calendars from user's Google Calendar account.
~CalendarDeleteJob() override
Destructor.
Abstract superclass for all jobs that delete resources from Google.
Definition deletejob.h:25
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 Tue Mar 26 2024 11:19:51 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.