Kgapi
eventcreatejob.cpp
29EventCreateJob::EventCreateJob(const EventPtr &event, const QString &calendarId, const AccountPtr &account, QObject *parent)
37EventCreateJob::EventCreateJob(const EventsList &events, const QString &calendarId, const AccountPtr &account, QObject *parent)
70 // If the organizer is different from the account name, import a private copy of the event in the user's calendar,
71 // or normally create it otherwise. This prevents that Google Calendar creates a copy event when accepting invitations
73 if (!event->attendees().isEmpty() && !event->organizer().isEmpty() && event->organizer().email() != this->account()->accountName()) {
80 const QByteArray rawData = CalendarService::eventToJSON(event, CalendarService::EventSerializeFlag::NoID);
85ObjectsList EventCreateJob::handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData)
Abstract superclass for all jobs that create new objects on the server.
Definition createjob.h:26
A job to create one or more new events in given calendar.
Definition eventcreatejob.h:27
ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override
KGAPI2::CreateJob::handleReplyWithItems implementation.
Definition eventcreatejob.cpp:85
EventCreateJob(const EventPtr &event, const QString &calendarId, const AccountPtr &account, QObject *parent=nullptr)
Constructs a job that will create given event in a calendar with given calendarID.
Definition eventcreatejob.cpp:29
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
QByteArray eventToJSON(const EventPtr &event, EventSerializeFlags flags)
Serializes Event into JSON.
Definition calendarservice.cpp:639
QUrl createEventUrl(const QString &calendarID, SendUpdatesPolicy updatePolicy)
Returns URL creating new events.
Definition calendarservice.cpp:156
QUrl importEventUrl(const QString &calendarID, SendUpdatesPolicy updatePolicy)
Returns URL importing private copies of existing events.
Definition calendarservice.cpp:166
QNetworkRequest prepareRequest(const QUrl &url)
Preparse a QNetworkRequest for given URL.
Definition calendarservice.cpp:67
EventPtr JSONToEvent(const QByteArray &jsonData)
Parses event JSON into Event object.
Definition calendarservice.cpp:390
SendUpdatesPolicy
Determines whether Google Calendar should send updates to participants.
Definition enums.h:22
QVariant header(QNetworkRequest::KnownHeaders header) const const
ContentTypeHeader
Q_EMITQ_EMIT
virtual bool event(QEvent *e)
QString tr(const char *sourceText, const char *disambiguation, int n)
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.