KCalendarCore

schedulemessage.cpp
1 /*
2  This file is part of the kcalcore library.
3 
4  SPDX-FileCopyrightText: 2001, 2004 Cornelius Schumacher <[email protected]>
5  SPDX-FileCopyrightText: 2004 Reinhold Kainhofer <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9 
10 #include "schedulemessage.h"
11 
12 #include <QString>
13 
14 using namespace KCalendarCore;
15 
16 //@cond PRIVATE
17 class Q_DECL_HIDDEN KCalendarCore::ScheduleMessage::Private
18 {
19 public:
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");
75  case iTIPDeclineCounter:
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 }
Status status() const
Returns the status of this message.
@ iTIPDeclineCounter
Event or to-do decline a counter proposal.
Namespace for all KCalendarCore types.
Definition: alarm.h:36
@ iTIPCancel
Event, to-do or journal cancellation notice.
@ iTIPPublish
Event, to-do, journal or freebusy posting.
@ iTIPAdd
Event, to-do or journal additional property request.
Q_SCRIPTABLE CaptureState status()
iTIPMethod
iTIP methods.
ScheduleMessage(const IncidenceBase::Ptr &incidence, iTIPMethod method, Status status)
Creates a scheduling message with method as defined in iTIPMethod and a status.
QString error() const
Returns the error message if there is any.
@ iTIPRefresh
Event or to-do description update request.
@ iTIPCounter
Event or to-do submit counter proposal.
@ iTIPReply
Event, to-do or freebusy reply to request.
IncidenceBase::Ptr event() const
Returns the event associated with this message.
@ iTIPRequest
Event, to-do or freebusy scheduling request.
iTIPMethod method() const
Returns the iTIP method associated with this message.
A Scheduling message class.
static QString methodName(iTIPMethod method)
Returns a machine-readable (not translatable) name for a iTIP method.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:00:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.