Kgapi

calendarfetchjob.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 "fetchjob.h"
12#include "kgapicalendar_export.h"
13
14#include <QScopedPointer>
15
16namespace KGAPI2
17{
18
19/**
20 * @brief A job to fetch calendars from user's Google Calendar account.
21 *
22 * @author Daniel Vrátil <dvratil@redhat.com>
23 * @since 2.0
24 */
25class KGAPICALENDAR_EXPORT CalendarFetchJob : public KGAPI2::FetchJob
26{
27 Q_OBJECT
28
29public:
30 /**
31 * @brief Constructs a job that will fetch all calendars from user's
32 * Google Calendar account
33 *
34 * @param account Account to authenticate the request
35 * @param parent
36 */
37 explicit CalendarFetchJob(const AccountPtr &account, QObject *parent = nullptr);
38
39 /**
40 * @brief Constructs a job that will fetch a single calendar with given
41 * @p calendarId from user's Google Calendar account
42 *
43 * @param calendarId ID of calendar to fetch
44 * @param account Account to authenticate the request
45 * @param parent
46 */
47 explicit CalendarFetchJob(const QString &calendarId, const AccountPtr &account, QObject *parent = nullptr);
48
49 /**
50 * @brief Destructor
51 */
53
54protected:
55 /**
56 * @brief KGAPI2::Job::start implementation
57 */
58 void start() override;
59
60 /**
61 * @brief KGAPI2::FetchJob::handleReplyWithItems implementation
62 *
63 * @param reply
64 * @param rawData
65 */
66 ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override;
67
68private:
69 class Private;
71 friend class Private;
72};
73
74} // namespace KGAPI2
A job to fetch calendars from user's Google Calendar account.
~CalendarFetchJob() override
Destructor.
Abstract superclass for all jobs that fetch resources from Google.
Definition fetchjob.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 Sat Dec 21 2024 17:00:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.