• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KCalCore Library

  • sources
  • kde-4.12
  • kdepimlibs
  • kcalcore
schedulemessage.cpp
1 /*
2  This file is part of the kcalcore library.
3 
4  Copyright (c) 2001,2004 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 #include "schedulemessage.h"
24 #include "incidencebase.h"
25 
26 #include <QtCore/QString>
27 
28 using namespace KCalCore;
29 
30 //@cond PRIVATE
31 class KCalCore::ScheduleMessage::Private
32 {
33 public:
34  Private() {}
35 
36  IncidenceBase::Ptr mIncidence;
37  iTIPMethod mMethod;
38  Status mStatus;
39  QString mError;
40 
41  ~Private() {}
42 };
43 //@endcond
44 
45 ScheduleMessage::ScheduleMessage(IncidenceBase::Ptr incidence,
46  iTIPMethod method,
47  ScheduleMessage::Status status)
48  : d(new KCalCore::ScheduleMessage::Private)
49 {
50  d->mIncidence = incidence;
51  d->mMethod = method;
52  d->mStatus = status;
53 }
54 
55 ScheduleMessage::~ScheduleMessage()
56 {
57  delete d;
58 }
59 
60 IncidenceBase::Ptr ScheduleMessage::event() const
61 {
62  return d->mIncidence;
63 }
64 
65 iTIPMethod ScheduleMessage::method() const
66 {
67  return d->mMethod;
68 }
69 
70 QString ScheduleMessage::methodName(iTIPMethod method)
71 {
72  switch (method) {
73  case iTIPPublish:
74  return QLatin1String("Publish");
75  case iTIPRequest:
76  return QLatin1String("Request");
77  case iTIPRefresh:
78  return QLatin1String("Refresh");
79  case iTIPCancel:
80  return QLatin1String("Cancel");
81  case iTIPAdd:
82  return QLatin1String("Add");
83  case iTIPReply:
84  return QLatin1String("Reply");
85  case iTIPCounter:
86  return QLatin1String("Counter");
87  case iTIPDeclineCounter:
88  return QLatin1String("Decline Counter");
89  default:
90  return QLatin1String("Unknown");
91  }
92 }
93 
94 ScheduleMessage::Status ScheduleMessage::status() const
95 {
96  return d->mStatus;
97 }
98 
99 QString ScheduleMessage::error() const
100 {
101  return d->mError;
102 }
KCalCore::ScheduleMessage::method
iTIPMethod method() const
Returns the iTIP method associated with this message.
Definition: schedulemessage.cpp:65
KCalCore::ScheduleMessage::methodName
static QString methodName(iTIPMethod method)
Returns a machine-readable (not translatable) name for a iTIP method.
Definition: schedulemessage.cpp:70
KCalCore::ScheduleMessage
A Scheduling message class.
Definition: schedulemessage.h:54
KCalCore::ScheduleMessage::event
IncidenceBase::Ptr event() const
Returns the event associated with this message.
Definition: schedulemessage.cpp:60
KCalCore::ScheduleMessage::ScheduleMessage
ScheduleMessage(IncidenceBase::Ptr incidence, iTIPMethod method, Status status)
Creates a scheduling message with method as defined in iTIPMethod and a status.
Definition: schedulemessage.cpp:45
KCalCore::ScheduleMessage::error
QString error() const
Returns the error message if there is any.
Definition: schedulemessage.cpp:99
KCalCore::IncidenceBase::Ptr
QSharedPointer< IncidenceBase > Ptr
A shared pointer to an IncidenceBase.
Definition: incidencebase.h:115
KCalCore::iTIPMethod
iTIPMethod
iTIP methods.
Definition: schedulemessage.h:35
KCalCore::iTIPCounter
Event or to-do submit counter proposal.
Definition: schedulemessage.h:42
KCalCore::iTIPDeclineCounter
Event or to-do decline a counter proposal.
Definition: schedulemessage.h:43
KCalCore::iTIPReply
Event, to-do or freebusy reply to request.
Definition: schedulemessage.h:38
KCalCore::ScheduleMessage::Status
Status
Message status.
Definition: schedulemessage.h:60
KCalCore::ScheduleMessage::status
Status status() const
Returns the status of this message.
Definition: schedulemessage.cpp:94
incidencebase.h
This file is part of the API for handling calendar data and defines the IncidenceBase class...
KCalCore::iTIPCancel
Event, to-do or journal cancellation notice.
Definition: schedulemessage.h:40
KCalCore::ScheduleMessage::~ScheduleMessage
~ScheduleMessage()
Destructor.
Definition: schedulemessage.cpp:55
KCalCore::iTIPAdd
Event, to-do or journal additional property request.
Definition: schedulemessage.h:39
KCalCore::iTIPPublish
Event, to-do, journal or freebusy posting.
Definition: schedulemessage.h:36
KCalCore::iTIPRefresh
Event or to-do description update request.
Definition: schedulemessage.h:41
KCalCore::iTIPRequest
Event, to-do or freebusy scheduling request.
Definition: schedulemessage.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalCore Library

Skip menu "KCalCore Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal