Kgapi
eventfetchjob.cpp
31 QList<Event::EventType> eventTypes = { Event::EventType::Default, Event::EventType::FocusTime, Event::EventType::OutOfOffice };
38EventFetchJob::EventFetchJob(const QString &calendarId, const AccountPtr &account, QObject *parent)
45EventFetchJob::EventFetchJob(const QString &eventId, const QString &calendarId, const AccountPtr &account, QObject *parent)
164 query.addQueryItem(QStringLiteral("eventTypes"), CalendarService::eventTypeToString(eventType));
187ObjectsList EventFetchJob::handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData)
A job to fetch all events from given calendar in user's Google Calendar account.
Definition eventfetchjob.h:28
EventFetchJob(const QString &calendarId, const AccountPtr &account, QObject *parent=nullptr)
Constructs a job that will fetch all events from a calendar with given calendarId.
Definition eventfetchjob.cpp:38
void setSyncToken(const QString &syncToken)
Sets token for incremental updates.
Definition eventfetchjob.cpp:100
void setFetchOnlyUpdated(quint64 timestamp)
Sets the job to fetch only events modified since timestamp.
Definition eventfetchjob.cpp:70
void setFetchDeleted(bool fetchDeleted=true)
Sets whether to fetch deleted events.
Definition eventfetchjob.cpp:55
void setTimeMax(quint64 timestamp)
Sets timestamp of newest event that can be fetched.
Definition eventfetchjob.cpp:85
bool handleError(int errorCode, const QByteArray &rawData) override
KGAPI2::Job::handleError implementation.
Definition eventfetchjob.cpp:174
quint64 fetchOnlyUpdated
Timestamp to fetch only events modified since then.
Definition eventfetchjob.h:60
void setTimeMin(quint64 timestamp)
Sets timestamp of older events that can be fetched.
Definition eventfetchjob.cpp:110
ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override
KGAPI2::FetchJob::handleReplyWithItems implementation.
Definition eventfetchjob.cpp:187
QString syncToken
Sync token that can be used for incremental updates by some of the services.
Definition types.h:42
Abstract superclass for all jobs that fetch resources from Google.
Definition fetchjob.h:25
virtual bool handleError(int statusCode, const QByteArray &rawData)
Called when an error occurs.
Definition job.cpp:549
void setErrorString(const QString &errorString)
Set job error description to errorString.
Definition job.cpp:401
virtual void enqueueRequest(const QNetworkRequest &request, const QByteArray &data=QByteArray(), const QString &contentType=QString())
Enqueues request in dispatcher queue.
Definition job.cpp:513
ObjectsList parseEventJSONFeed(const QByteArray &jsonFeed, FeedData &feedData)
Parses JSON feed into list of Events.
Definition calendarservice.cpp:793
QNetworkRequest prepareRequest(const QUrl &url)
Preparse a QNetworkRequest for given URL.
Definition calendarservice.cpp:67
QString eventTypeToString(Event::EventType eventType)
Converts event type enum value to string.
Definition calendarservice.cpp:831
EventPtr JSONToEvent(const QByteArray &jsonData)
Parses event JSON into Event object.
Definition calendarservice.cpp:390
QUrl fetchEventsUrl(const QString &calendarID)
Returns URL for fetching all events from a specific calendar.
Definition calendarservice.cpp:112
QUrl fetchEventUrl(const QString &calendarID, const QString &eventID)
Returns URL for fetching a single event from a specific calendar.
Definition calendarservice.cpp:119
QVariant header(QNetworkRequest::KnownHeaders header) const const
QUrl url() const const
ContentTypeHeader
QString tr(const char *sourceText, const char *disambiguation, int n)
QFuture< void > filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)
bool isValid() const const
void setQuery(const QString &query, ParsingMode mode)
QString toString() const const
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
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.