KCalCore Library
icalformat.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00028 #ifndef KCALCORE_ICALFORMAT_H
00029 #define KCALCORE_ICALFORMAT_H
00030
00031 #include "incidence.h"
00032 #include "freebusy.h"
00033 #include "kcalcore_export.h"
00034 #include "calformat.h"
00035 #include "schedulemessage.h"
00036
00037 #include <KDE/KDateTime>
00038
00039 namespace KCalCore {
00040
00041 class FreeBusy;
00042 class Incidence;
00043 class IncidenceBase;
00044 class RecurrenceRule;
00045
00058 class KCALCORE_EXPORT ICalFormat : public CalFormat
00059 {
00060 public:
00064 ICalFormat();
00065
00069 virtual ~ICalFormat();
00070
00075 bool load( const Calendar::Ptr &calendar, const QString &fileName );
00076
00081 bool save( const Calendar::Ptr &calendar, const QString &fileName );
00082
00089 bool fromString( const Calendar::Ptr &calendar, const QString &string,
00090 bool deleted = false, const QString ¬ebook = QString() );
00091
00100 Incidence::Ptr fromString( const QString &string );
00101
00109 bool fromString ( RecurrenceRule *rule, const QString &string );
00110
00115 bool fromRawString( const Calendar::Ptr &calendar, const QByteArray &string,
00116 bool deleted = false, const QString ¬ebook = QString() );
00117
00122 QString toString( const Calendar::Ptr &calendar,
00123 const QString ¬ebook = QString(), bool deleted = false );
00124
00132 QString toString( const Incidence::Ptr &incidence );
00133
00141 QString toString( RecurrenceRule *rule );
00142
00150 QString toICalString( const Incidence::Ptr &incidence );
00151
00160 QString createScheduleMessage( const IncidenceBase::Ptr &incidence,
00161 iTIPMethod method );
00162
00173 ScheduleMessage::Ptr parseScheduleMessage( const Calendar::Ptr &calendar,
00174 const QString &string );
00175
00184 FreeBusy::Ptr parseFreeBusy( const QString &string );
00185
00191 void setTimeSpec( const KDateTime::Spec &timeSpec );
00192
00197 KDateTime::Spec timeSpec() const;
00198
00203 QString timeZoneId() const;
00204
00205 protected:
00210 virtual void virtual_hook( int id, void *data );
00211
00212 private:
00213
00214 Q_DISABLE_COPY( ICalFormat )
00215 class Private;
00216 Private *const d;
00217
00218 };
00219
00220 }
00221
00222 #endif