Kgapi
eventfetchjob.cpp
29 QList<Event::EventType> eventTypes = { Event::EventType::Default, Event::EventType::FocusTime, Event::EventType::OutOfOffice };
162 query.addQueryItem(QStringLiteral("eventTypes"), CalendarService::eventTypeToString(eventType));
185ObjectsList 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:36
void setSyncToken(const QString &syncToken)
Sets token for incremental updates.
Definition eventfetchjob.cpp:98
void setFetchOnlyUpdated(quint64 timestamp)
Sets the job to fetch only events modified since timestamp.
Definition eventfetchjob.cpp:68
void setFetchDeleted(bool fetchDeleted=true)
Sets whether to fetch deleted events.
Definition eventfetchjob.cpp:53
void setTimeMax(quint64 timestamp)
Sets timestamp of newest event that can be fetched.
Definition eventfetchjob.cpp:83
bool handleError(int errorCode, const QByteArray &rawData) override
KGAPI2::Job::handleError implementation.
Definition eventfetchjob.cpp:172
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:108
ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override
KGAPI2::FetchJob::handleReplyWithItems implementation.
Definition eventfetchjob.cpp:185
QString syncToken
Sync token that can be used for incremental updates by some of the services.
Definition types.h:42
FetchJob(QObject *parent=nullptr)
Constructor for jobs that don't require authentication.
Definition fetchjob.cpp:24
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:792
QNetworkRequest prepareRequest(const QUrl &url)
Preparse a QNetworkRequest for given URL.
Definition calendarservice.cpp:66
QString eventTypeToString(Event::EventType eventType)
Converts event type enum value to string.
Definition calendarservice.cpp:830
EventPtr JSONToEvent(const QByteArray &jsonData)
Parses event JSON into Event object.
Definition calendarservice.cpp:389
QUrl fetchEventsUrl(const QString &calendarID)
Returns URL for fetching all events from a specific calendar.
Definition calendarservice.cpp:111
QUrl fetchEventUrl(const QString &calendarID, const QString &eventID)
Returns URL for fetching a single event from a specific calendar.
Definition calendarservice.cpp:118
QVariant header(QNetworkRequest::KnownHeaders header) const const
QUrl url() const const
ContentTypeHeader
QObject(QObject *parent)
QObject * parent() const const
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-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:57:30 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:57:30 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.