Kgapi
eventcreatejob.cpp
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)
CreateJob(QObject *parent=nullptr)
Constructor for jobs that don't require authentication.
Definition createjob.cpp:23
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:638
QUrl createEventUrl(const QString &calendarID, SendUpdatesPolicy updatePolicy)
Returns URL creating new events.
Definition calendarservice.cpp:155
QUrl importEventUrl(const QString &calendarID, SendUpdatesPolicy updatePolicy)
Returns URL importing private copies of existing events.
Definition calendarservice.cpp:165
QNetworkRequest prepareRequest(const QUrl &url)
Preparse a QNetworkRequest for given URL.
Definition calendarservice.cpp:66
EventPtr JSONToEvent(const QByteArray &jsonData)
Parses event JSON into Event object.
Definition calendarservice.cpp:389
SendUpdatesPolicy
Determines whether Google Calendar should send updates to participants.
Definition enums.h:22
QVariant header(QNetworkRequest::KnownHeaders header) const const
ContentTypeHeader
QObject(QObject *parent)
Q_EMITQ_EMIT
virtual bool event(QEvent *e)
QObject * parent() const const
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-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:07:23 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:07:23 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.