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

KCalCore Library

  • 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
28using namespace KCalCore;
29
30//@cond PRIVATE
31class KCalCore::ScheduleMessage::Private
32{
33public:
34 Private() {}
35
36 IncidenceBase::Ptr mIncidence;
37 iTIPMethod mMethod;
38 Status mStatus;
39 QString mError;
40
41 ~Private() {}
42};
43//@endcond
44
45ScheduleMessage::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
55ScheduleMessage::~ScheduleMessage()
56{
57 delete d;
58}
59
60IncidenceBase::Ptr ScheduleMessage::event() const
61{
62 return d->mIncidence;
63}
64
65iTIPMethod ScheduleMessage::method() const
66{
67 return d->mMethod;
68}
69
70QString 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
94ScheduleMessage::Status ScheduleMessage::status() const
95{
96 return d->mStatus;
97}
98
99QString ScheduleMessage::error() const
100{
101 return d->mError;
102}
KCalCore::IncidenceBase::Ptr
QSharedPointer< IncidenceBase > Ptr
A shared pointer to an IncidenceBase.
Definition incidencebase.h:115
KCalCore::ScheduleMessage
A Scheduling message class.
Definition schedulemessage.h:55
KCalCore::ScheduleMessage::~ScheduleMessage
~ScheduleMessage()
Destructor.
Definition schedulemessage.cpp:55
KCalCore::ScheduleMessage::method
iTIPMethod method() const
Returns the iTIP method associated with this message.
Definition schedulemessage.cpp:65
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::Status
Status
Message status.
Definition schedulemessage.h:60
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::status
Status status() const
Returns the status of this message.
Definition schedulemessage.cpp:94
KCalCore::ScheduleMessage::event
IncidenceBase::Ptr event() const
Returns the event associated with this message.
Definition schedulemessage.cpp:60
KCalCore::ScheduleMessage::error
QString error() const
Returns the error message if there is any.
Definition schedulemessage.cpp:99
incidencebase.h
This file is part of the API for handling calendar data and defines the IncidenceBase class.
KCalCore
TODO: KDE5:
Definition alarm.h:47
KCalCore::iTIPMethod
iTIPMethod
iTIP methods.
Definition schedulemessage.h:35
KCalCore::iTIPRefresh
@ iTIPRefresh
Event or to-do description update request.
Definition schedulemessage.h:41
KCalCore::iTIPCounter
@ iTIPCounter
Event or to-do submit counter proposal.
Definition schedulemessage.h:42
KCalCore::iTIPDeclineCounter
@ iTIPDeclineCounter
Event or to-do decline a counter proposal.
Definition schedulemessage.h:43
KCalCore::iTIPCancel
@ iTIPCancel
Event, to-do or journal cancellation notice.
Definition schedulemessage.h:40
KCalCore::iTIPPublish
@ iTIPPublish
Event, to-do, journal or freebusy posting.
Definition schedulemessage.h:36
KCalCore::iTIPAdd
@ iTIPAdd
Event, to-do or journal additional property request.
Definition schedulemessage.h:39
KCalCore::iTIPReply
@ iTIPReply
Event, to-do or freebusy reply to request.
Definition schedulemessage.h:38
KCalCore::iTIPRequest
@ iTIPRequest
Event, to-do or freebusy scheduling request.
Definition schedulemessage.h:37
qHash
static uint qHash(const KDateTime &dt)
Private class that helps to provide binary compatibility between releases.
Definition occurrenceiterator.cpp:157
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 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-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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