• Skip to content
  • Skip to link menu
KDE 4.7 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

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 }

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal