KCalCore Library
schedulemessage.cpp
00001 /* 00002 This file is part of the kcalcore library. 00003 00004 Copyright (c) 2001,2004 Cornelius Schumacher <schumacher@kde.org> 00005 Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00020 Boston, MA 02110-1301, USA. 00021 */ 00022 00023 #include "schedulemessage.h" 00024 #include "incidencebase.h" 00025 00026 #include <QtCore/QString> 00027 00028 using namespace KCalCore; 00029 00030 //@cond PRIVATE 00031 class KCalCore::ScheduleMessage::Private 00032 { 00033 public: 00034 Private() {} 00035 00036 IncidenceBase::Ptr mIncidence; 00037 iTIPMethod mMethod; 00038 Status mStatus; 00039 QString mError; 00040 00041 ~Private() {} 00042 }; 00043 //@endcond 00044 00045 ScheduleMessage::ScheduleMessage( IncidenceBase::Ptr incidence, 00046 iTIPMethod method, 00047 ScheduleMessage::Status status ) 00048 : d( new KCalCore::ScheduleMessage::Private ) 00049 { 00050 d->mIncidence = incidence; 00051 d->mMethod = method; 00052 d->mStatus = status; 00053 } 00054 00055 ScheduleMessage::~ScheduleMessage() 00056 { 00057 delete d; 00058 } 00059 00060 IncidenceBase::Ptr ScheduleMessage::event() const 00061 { 00062 return d->mIncidence; 00063 } 00064 00065 iTIPMethod ScheduleMessage::method() const 00066 { 00067 return d->mMethod; 00068 } 00069 00070 QString ScheduleMessage::methodName( iTIPMethod method ) 00071 { 00072 switch ( method ) { 00073 case iTIPPublish: 00074 return QLatin1String( "Publish" ); 00075 case iTIPRequest: 00076 return QLatin1String( "Request" ); 00077 case iTIPRefresh: 00078 return QLatin1String( "Refresh" ); 00079 case iTIPCancel: 00080 return QLatin1String( "Cancel" ); 00081 case iTIPAdd: 00082 return QLatin1String( "Add" ); 00083 case iTIPReply: 00084 return QLatin1String( "Reply" ); 00085 case iTIPCounter: 00086 return QLatin1String( "Counter" ); 00087 case iTIPDeclineCounter: 00088 return QLatin1String( "Decline Counter" ); 00089 default: 00090 return QLatin1String( "Unknown" ); 00091 } 00092 } 00093 00094 ScheduleMessage::Status ScheduleMessage::status() const 00095 { 00096 return d->mStatus; 00097 } 00098 00099 QString ScheduleMessage::error() const 00100 { 00101 return d->mError; 00102 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:48:21 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:48:21 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.