Kgapi

eventdeletejob.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 "kgapicalendar_export.h"
13
14#include <QScopedPointer>
15
16namespace KGAPI2
17{
18
19/**
20 * @brief A job to delete one or more events from calendar in user's Google
21 * Calendar account.
22 *
23 * Note that operation is irreversible.
24 *
25 * @author Daniel Vrátil <dvratil@redhat.com>
26 * @since 2.0
27 */
28class KGAPICALENDAR_EXPORT EventDeleteJob : public KGAPI2::DeleteJob
29{
30 Q_OBJECT
31
32public:
33 /**
34 * @brief Constructs a new job that will delete given @p event from a
35 * calendar with given @p calendarId
36 *
37 * @param event Event to delete
38 * @param calendarId ID of calendar in which the event is stored
39 * @param account Account to authenticate the request
40 * @param parent
41 */
42 explicit EventDeleteJob(const EventPtr &event, const QString &calendarId, const AccountPtr &account, QObject *parent);
43
44 /**
45 * @brief Constructs a new job that will delete given @p events from a
46 * calendar with given @p calendarId
47 *
48 * @param events Events to delete
49 * @param calendarId ID of calendar in which the event is stored
50 * @param account Account to authenticate the request
51 * @param parent
52 */
53 explicit EventDeleteJob(const EventsList &events, const QString &calendarId, const AccountPtr &account, QObject *parent);
54
55 /**
56 * @brief Constructs a new job that will delete an event with given
57 * @p eventId from a calendar with given @p calendarId
58 *
59 * @param eventId ID of event to delete
60 * @param calendarId ID of calendar in which the events is stored
61 * @param account Account to authenticate the request
62 * @param parent
63 */
64 explicit EventDeleteJob(const QString &eventId, const QString &calendarId, const AccountPtr &account, QObject *parent);
65
66 /**
67 * @brief Constructs a new job that will delete all events with given
68 * @p eventsIds from a calendar with given @p calendarId
69 *
70 * @param eventIds IDs of events to delete
71 * @param calendarId ID of calendar in which the events is stored
72 * @param account Account to authenticate the request
73 * @param parent
74 */
75 explicit EventDeleteJob(const QStringList &eventIds, const QString &calendarId, const AccountPtr &account, QObject *parent);
76
77 /**
78 * @brief Destructor
79 */
80 ~EventDeleteJob() 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 events from calendar in user's Google Calendar account.
~EventDeleteJob() 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 May 3 2024 11:50:41 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.