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 #include "incidencebase.h"
12 
13 #include <QString>
14 
15 using namespace KCalendarCore;
16 
17 //@cond PRIVATE
18 class Q_DECL_HIDDEN KCalendarCore::ScheduleMessage::Private
19 {
20 public:
21  Private() {}
22 
23  IncidenceBase::Ptr mIncidence;
24  iTIPMethod mMethod;
25  Status mStatus;
26  QString mError;
27 
28  ~Private() {}
29 };
30 //@endcond
31 
33  iTIPMethod method,
35  : d(new KCalendarCore::ScheduleMessage::Private)
36 {
37  d->mIncidence = incidence;
38  d->mMethod = method;
39  d->mStatus = status;
40 }
41 
43 {
44  delete d;
45 }
46 
48 {
49  return d->mIncidence;
50 }
51 
53 {
54  return d->mMethod;
55 }
56 
58 {
59  switch (method) {
60  case iTIPPublish:
61  return QStringLiteral("Publish");
62  case iTIPRequest:
63  return QStringLiteral("Request");
64  case iTIPRefresh:
65  return QStringLiteral("Refresh");
66  case iTIPCancel:
67  return QStringLiteral("Cancel");
68  case iTIPAdd:
69  return QStringLiteral("Add");
70  case iTIPReply:
71  return QStringLiteral("Reply");
72  case iTIPCounter:
73  return QStringLiteral("Counter");
74  case iTIPDeclineCounter:
75  return QStringLiteral("Decline Counter");
76  default:
77  return QStringLiteral("Unknown");
78  }
79 }
80 
82 {
83  return d->mStatus;
84 }
85 
87 {
88  return d->mError;
89 }
QString error() const
Returns the error message if there is any.
ScheduleMessage(const IncidenceBase::Ptr &incidence, iTIPMethod method, Status status)
Creates a scheduling message with method as defined in iTIPMethod and a status.
Event, to-do or freebusy reply to request.
static QString methodName(iTIPMethod method)
Returns a machine-readable (not translatable) name for a iTIP method.
A Scheduling message class.
Event or to-do submit counter proposal.
IncidenceBase::Ptr event() const
Returns the event associated with this message.
iTIPMethod
iTIP methods.
Status status() const
Returns the status of this message.
Event or to-do description update request.
Event, to-do, journal or freebusy posting.
This file is part of the API for handling calendar data and defines the IncidenceBase class...
Event, to-do or journal cancellation notice.
Event or to-do decline a counter proposal.
Event, to-do or freebusy scheduling request.
Event, to-do or journal additional property request.
iTIPMethod method() const
Returns the iTIP method associated with this message.
Namespace for all KCalendarCore types.
Definition: alarm.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 1 2020 22:54:22 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.