Changeset View
Changeset View
Standalone View
Standalone View
src/calendar/calendarservice.h
| Show All 23 Lines | |||||
| 24 | #define LIBKGAPI2_CALENDARSERVICE_H | 24 | #define LIBKGAPI2_CALENDARSERVICE_H | ||
| 25 | 25 | | |||
| 26 | #include "types.h" | 26 | #include "types.h" | ||
| 27 | #include "enums.h" | 27 | #include "enums.h" | ||
| 28 | #include "kgapicalendar_export.h" | 28 | #include "kgapicalendar_export.h" | ||
| 29 | 29 | | |||
| 30 | #include <QFlags> | 30 | #include <QFlags> | ||
| 31 | 31 | | |||
| 32 | class QNetworkRequest; | ||||
| 33 | | ||||
| 32 | namespace KGAPI2 | 34 | namespace KGAPI2 | ||
| 33 | { | 35 | { | ||
| 34 | 36 | | |||
| 35 | /** | 37 | /** | ||
| 36 | * @brief Additional methods for implementing support for Google Calendar service | 38 | * @brief Additional methods for implementing support for Google Calendar service | ||
| 37 | * | 39 | * | ||
| 38 | * You should never need to use these methods, unless implementing your own Job | 40 | * You should never need to use these methods, unless implementing your own Job | ||
| 39 | */ | 41 | */ | ||
| 40 | namespace CalendarService | 42 | namespace CalendarService | ||
| 41 | { | 43 | { | ||
| 42 | enum class EventSerializeFlag { | 44 | enum class EventSerializeFlag { | ||
| 43 | Default = 0, | 45 | Default = 0, | ||
| 44 | NoID = 1 << 0 | 46 | NoID = 1 << 0 | ||
| 45 | }; | 47 | }; | ||
| 46 | using EventSerializeFlags = QFlags<EventSerializeFlag>; | 48 | using EventSerializeFlags = QFlags<EventSerializeFlag>; | ||
| 47 | 49 | | |||
| 48 | /** | 50 | /** | ||
| 51 | * @vrief Preparse a QNetworkRequest for given URL | ||||
| 52 | * | ||||
| 53 | * @param url | ||||
| 54 | */ | ||||
| 55 | KGAPICALENDAR_EXPORT QNetworkRequest prepareRequest(const QUrl &url); | ||||
| 56 | | ||||
| 57 | /** | ||||
| 49 | * @brief Parses calendar JSON data into Calendar object | 58 | * @brief Parses calendar JSON data into Calendar object | ||
| 50 | * | 59 | * | ||
| 51 | * @param jsonData | 60 | * @param jsonData | ||
| 52 | */ | 61 | */ | ||
| 53 | KGAPICALENDAR_EXPORT CalendarPtr JSONToCalendar(const QByteArray& jsonData); | 62 | KGAPICALENDAR_EXPORT CalendarPtr JSONToCalendar(const QByteArray& jsonData); | ||
| 54 | 63 | | |||
| 55 | /** | 64 | /** | ||
| 56 | * @brief Serializes calendar into JSON | 65 | * @brief Serializes calendar into JSON | ||
| ▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines | |||||