Kgapi

eventdeletejob.h
1 /*
2  * This file is part of LibKGAPI library
3  *
4  * SPDX-FileCopyrightText: 2013 Daniel Vrátil <[email protected]>
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 
16 namespace KGAPI2 {
17 
18 /**
19  * @brief A job to delete one or more events from calendar in user's Google
20  * Calendar account.
21  *
22  * Note that operation is irreversible.
23  *
24  * @author Daniel Vrátil <[email protected]>
25  * @since 2.0
26  */
27 class KGAPICALENDAR_EXPORT EventDeleteJob : public KGAPI2::DeleteJob
28 {
29  Q_OBJECT
30 
31  public:
32 
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,
43  const AccountPtr &account, QObject* parent);
44 
45  /**
46  * @brief Constructs a new job that will delete given @p events from a
47  * calendar with given @p calendarId
48  *
49  * @param events Events to delete
50  * @param calendarId ID of calendar in which the event is stored
51  * @param account Account to authenticate the request
52  * @param parent
53  */
54  explicit EventDeleteJob(const EventsList &events, const QString &calendarId,
55  const AccountPtr &account, QObject* parent);
56 
57  /**
58  * @brief Constructs a new job that will delete an event with given
59  * @p eventId from a calendar with given @p calendarId
60  *
61  * @param eventId ID of event to delete
62  * @param calendarId ID of calendar in which the events is stored
63  * @param account Account to authenticate the request
64  * @param parent
65  */
66  explicit EventDeleteJob(const QString &eventId, const QString &calendarId,
67  const AccountPtr &account, QObject* parent);
68 
69  /**
70  * @brief Constructs a new job that will delete all events with given
71  * @p eventsIds from a calendar with given @p calendarId
72  *
73  * @param eventIds IDs of events to delete
74  * @param calendarId ID of calendar in which the events is stored
75  * @param account Account to authenticate the request
76  * @param parent
77  */
78  explicit EventDeleteJob(const QStringList &eventIds, const QString &calendarId,
79  const AccountPtr &account, QObject *parent);
80 
81  /**
82  * @brief Destructor
83  */
84  ~EventDeleteJob() override;
85 
86  protected:
87 
88  /**
89  * @brief KGAPI2::Job::start implementation
90  */
91  void start() override;
92 
93  /**
94  * @brief KGAPI2::Job::handleReply implementation
95  *
96  * @param reply
97  * @param rawData
98  */
99  void handleReply(const QNetworkReply* reply, const QByteArray& rawData) override;
100 
101  private:
102  class Private;
103  QScopedPointer<Private> const d;
104  friend class Private;
105 
106 };
107 
108 } // namespace KGAPI2
109 
A job to fetch a single map tile described by a StaticMapUrl.
Definition: blog.h:15
Abstract superclass for all jobs that delete resources from Google.
Definition: deletejob.h:23
A job to delete one or more events from calendar in user&#39;s Google Calendar account.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Jun 17 2021 23:10:52 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.