• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KCal Library

scheduler.h

00001 /*
00002   This file is part of the kcal library.
00003 
00004   Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
00005 
00006   This library is free software; you can redistribute it and/or
00007   modify it under the terms of the GNU Library General Public
00008   License as published by the Free Software Foundation; either
00009   version 2 of the License, or (at your option) any later version.
00010 
00011   This library is distributed in the hope that it will be useful,
00012   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014   Library General Public License for more details.
00015 
00016   You should have received a copy of the GNU Library General Public License
00017   along with this library; see the file COPYING.LIB.  If not, write to
00018   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019   Boston, MA 02110-1301, USA.
00020 */
00021 #ifndef KCAL_SCHEDULER_H
00022 #define KCAL_SCHEDULER_H
00023 
00024 #include "kcal_export.h"
00025 
00026 #include <QtCore/QString>
00027 #include <QtCore/QList>
00028 
00029 namespace KCal {
00030 
00034 enum iTIPMethod {
00035   iTIPPublish,       
00036   iTIPRequest,       
00037   iTIPReply,         
00038   iTIPAdd,           
00039   iTIPCancel,        
00040   iTIPRefresh,       
00041   iTIPCounter,       
00042   iTIPDeclineCounter,
00043   iTIPNoMethod       
00044 };
00045 
00046 class IncidenceBase;
00047 class Calendar;
00048 class ICalFormat;
00049 class FreeBusyCache;
00050 
00058 class KCAL_EXPORT ScheduleMessage
00059 {
00060   public:
00064     enum Status {
00065       PublishNew,      
00066       PublishUpdate,   
00067       Obsolete,        
00068       RequestNew,      
00069       RequestUpdate,   
00070       Unknown          
00071     };
00072 
00077     ScheduleMessage( IncidenceBase *incidence, iTIPMethod method, Status status );
00078 
00082     ~ScheduleMessage();
00083 
00087     IncidenceBase *event();
00088 
00092     iTIPMethod method();
00093 
00097     Status status();
00098 
00102     static QString statusName( Status status );
00103 
00107     QString error();
00108 
00109   private:
00110     Q_DISABLE_COPY( ScheduleMessage )
00111     class Private;
00112     Private *const d;
00113 };
00114 
00120 class KCAL_EXPORT Scheduler
00121 {
00122   public:
00126     explicit Scheduler( Calendar *calendar );
00127     virtual ~Scheduler();
00128 
00132     virtual bool publish( IncidenceBase *incidence,
00133                           const QString &recipients ) = 0;
00141     virtual bool performTransaction( IncidenceBase *incidence,
00142                                      iTIPMethod method ) = 0;
00143 
00153     virtual bool performTransaction( IncidenceBase *incidence,
00154                                      iTIPMethod method,
00155                                      const QString &recipients ) = 0;
00156 
00160     virtual QList<ScheduleMessage*> retrieveTransactions() = 0;
00161 
00171     bool acceptTransaction( IncidenceBase *, iTIPMethod method,
00172                             ScheduleMessage::Status status );
00173 
00177     static QString methodName( iTIPMethod method );
00178 
00182     static QString translatedMethodName( iTIPMethod method );
00183 
00184     virtual bool deleteTransaction( IncidenceBase *incidence );
00185 
00189     virtual QString freeBusyDir() = 0;
00190 
00194     void setFreeBusyCache( FreeBusyCache * );
00195 
00199     FreeBusyCache *freeBusyCache() const;
00200 
00201   protected:
00202     bool acceptPublish( IncidenceBase *, ScheduleMessage::Status status, iTIPMethod method );
00203     bool acceptRequest( IncidenceBase *, ScheduleMessage::Status status );
00204     bool acceptAdd( IncidenceBase *, ScheduleMessage::Status status );
00205     bool acceptCancel( IncidenceBase *, ScheduleMessage::Status status );
00206     bool acceptDeclineCounter( IncidenceBase *, ScheduleMessage::Status status );
00207     bool acceptReply( IncidenceBase *, ScheduleMessage::Status status, iTIPMethod method );
00208     bool acceptRefresh( IncidenceBase *, ScheduleMessage::Status status );
00209     bool acceptCounter( IncidenceBase *, ScheduleMessage::Status status );
00210     bool acceptFreeBusy( IncidenceBase *, iTIPMethod method );
00211 
00212     Calendar *mCalendar;
00213     ICalFormat *mFormat;
00214 
00215   private:
00216     Q_DISABLE_COPY( Scheduler )
00217     struct Private;
00218     Private *const d;
00219 };
00220 
00221 }
00222 
00223 #endif

KCal Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.7.1
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