KCalendarCore

schedulemessage.cpp
1/*
2 This file is part of the kcalcore library.
3
4 SPDX-FileCopyrightText: 2001, 2004 Cornelius Schumacher <schumacher@kde.org>
5 SPDX-FileCopyrightText: 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6
7 SPDX-License-Identifier: LGPL-2.0-or-later
8*/
9
10#include "schedulemessage.h"
11
12#include <QString>
13
14using namespace KCalendarCore;
15
16//@cond PRIVATE
17class Q_DECL_HIDDEN KCalendarCore::ScheduleMessage::Private
18{
19public:
20 Private()
21 {
22 }
23
24 IncidenceBase::Ptr mIncidence;
25 iTIPMethod mMethod;
26 Status mStatus;
27 QString mError;
28
29 ~Private()
30 {
31 }
32};
33//@endcond
34
36 : d(new KCalendarCore::ScheduleMessage::Private)
37{
38 d->mIncidence = incidence;
39 d->mMethod = method;
40 d->mStatus = status;
41}
42
44{
45 delete d;
46}
47
49{
50 return d->mIncidence;
51}
52
54{
55 return d->mMethod;
56}
57
59{
60 switch (method) {
61 case iTIPPublish:
62 return QStringLiteral("Publish");
63 case iTIPRequest:
64 return QStringLiteral("Request");
65 case iTIPRefresh:
66 return QStringLiteral("Refresh");
67 case iTIPCancel:
68 return QStringLiteral("Cancel");
69 case iTIPAdd:
70 return QStringLiteral("Add");
71 case iTIPReply:
72 return QStringLiteral("Reply");
73 case iTIPCounter:
74 return QStringLiteral("Counter");
76 return QStringLiteral("Decline Counter");
77 default:
78 return QStringLiteral("Unknown");
79 }
80}
81
83{
84 return d->mStatus;
85}
86
88{
89 return d->mError;
90}
A Scheduling message class.
iTIPMethod method() const
Returns the iTIP method associated with this message.
ScheduleMessage(const IncidenceBase::Ptr &incidence, iTIPMethod method, Status status)
Creates a scheduling message with method as defined in iTIPMethod and a status.
static QString methodName(iTIPMethod method)
Returns a machine-readable (not translatable) name for a iTIP method.
Status status() const
Returns the status of this message.
IncidenceBase::Ptr event() const
Returns the event associated with this message.
QString error() const
Returns the error message if there is any.
Q_SCRIPTABLE CaptureState status()
Namespace for all KCalendarCore types.
Definition alarm.h:37
iTIPMethod
iTIP methods.
@ iTIPReply
Event, to-do or freebusy reply to request.
@ iTIPRequest
Event, to-do or freebusy scheduling request.
@ iTIPPublish
Event, to-do, journal or freebusy posting.
@ iTIPCancel
Event, to-do or journal cancellation notice.
@ iTIPDeclineCounter
Event or to-do decline a counter proposal.
@ iTIPCounter
Event or to-do submit counter proposal.
@ iTIPRefresh
Event or to-do description update request.
@ iTIPAdd
Event, to-do or journal additional property request.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.