KCalCore Library
icalformat_p.h
Go to the documentation of this file.
00001 /* 00002 This file is part of the kcalcore library. 00003 00004 Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org> 00005 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com> 00006 Copyright (c) 2006 David Jarvie <software@astrojar.org.uk> 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Library General Public 00010 License as published by the Free Software Foundation; either 00011 version 2 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public License 00019 along with this library; see the file COPYING.LIB. If not, write to 00020 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00021 Boston, MA 02110-1301, USA. 00022 */ 00032 #ifndef KCALCORE_ICALFORMAT_P_H 00033 #define KCALCORE_ICALFORMAT_P_H 00034 00035 #include "exceptions.h" 00036 #include "freebusy.h" 00037 #include "todo.h" 00038 #include "journal.h" 00039 #include "event.h" 00040 #include "person.h" 00041 #include "calendar.h" 00042 #include "schedulemessage.h" 00043 00044 #include <KDateTime> 00045 00046 #include <ical.h> 00047 00048 class QDate; 00049 00050 namespace KCalCore { 00051 00052 class Alarm; 00053 class Attachment; 00054 class Attendee; 00055 class Duration; 00056 class Event; 00057 class FreeBusy; 00058 class ICalFormat; 00059 class ICalTimeZones; 00060 class Incidence; 00061 class Journal; 00062 class Recurrence; 00063 class RecurrenceRule; 00064 class Todo; 00065 00070 #define _ICAL_VERSION "2.0" 00071 00082 class ICalFormatImpl 00083 { 00084 public: 00089 explicit ICalFormatImpl( ICalFormat *parent ); 00090 00094 virtual ~ICalFormatImpl(); 00095 00101 bool populate( const Calendar::Ptr &calendar, icalcomponent *fs, 00102 bool deleted = false, const QString ¬ebook = QString() ); 00103 00104 icalcomponent *writeIncidence( const IncidenceBase::Ptr &incidence, 00105 iTIPMethod method = iTIPRequest, 00106 ICalTimeZones *tzList = 0, 00107 ICalTimeZones *tzUsedList = 0 ); 00108 00109 icalcomponent *writeTodo( const Todo::Ptr &todo, ICalTimeZones *tzlist = 0, 00110 ICalTimeZones *tzUsedList = 0 ); 00111 00112 icalcomponent *writeEvent( const Event::Ptr &event, ICalTimeZones *tzlist = 0, 00113 ICalTimeZones *tzUsedList = 0 ); 00114 00115 icalcomponent *writeJournal( const Journal::Ptr &journal, ICalTimeZones *tzlist = 0, 00116 ICalTimeZones *tzUsedList = 0 ); 00117 00118 icalcomponent *writeFreeBusy( const FreeBusy::Ptr &freebusy, 00119 iTIPMethod method = iTIPPublish ); 00120 00121 void writeIncidence( icalcomponent *parent, const Incidence::Ptr &incidence, 00122 ICalTimeZones *tzlist = 0, ICalTimeZones *tzUsedList = 0 ); 00123 00124 icalproperty *writeDescription( const QString &description, bool isRich = false ); 00125 icalproperty *writeSummary( const QString &summary, bool isRich = false ); 00126 icalproperty *writeLocation( const QString &location, bool isRich = false ); 00127 icalproperty *writeAttendee( const Attendee::Ptr &attendee ); 00128 icalproperty *writeOrganizer( const Person::Ptr &organizer ); 00129 icalproperty *writeAttachment( const Attachment::Ptr &attach ); 00130 icalproperty *writeRecurrenceRule( Recurrence * ); 00131 icalrecurrencetype writeRecurrenceRule( RecurrenceRule *recur ); 00132 icalcomponent *writeAlarm( const Alarm::Ptr &alarm ); 00133 00134 QString extractErrorProperty( icalcomponent * ); 00135 Todo::Ptr readTodo( icalcomponent *vtodo, ICalTimeZones *tzlist ); 00136 Event::Ptr readEvent( icalcomponent *vevent, ICalTimeZones *tzlist ); 00137 FreeBusy::Ptr readFreeBusy( icalcomponent *vfreebusy ); 00138 Journal::Ptr readJournal( icalcomponent *vjournal, ICalTimeZones *tzlist ); 00139 Attendee::Ptr readAttendee( icalproperty *attendee ); 00140 Person::Ptr readOrganizer( icalproperty *organizer ); 00141 Attachment::Ptr readAttachment( icalproperty *attach ); 00142 void readIncidence( icalcomponent *parent, Incidence::Ptr incidence, 00143 ICalTimeZones *tzlist ); 00144 void readRecurrenceRule( icalproperty *rrule, Incidence::Ptr event ); 00145 void readExceptionRule( icalproperty *rrule, Incidence::Ptr incidence ); 00146 void readRecurrence( const struct icalrecurrencetype &r, 00147 RecurrenceRule *recur ); 00148 void readAlarm( icalcomponent *alarm, Incidence::Ptr incidence, 00149 ICalTimeZones *tzlist ); 00150 00154 QString loadedProductId() const; 00155 00156 static icaltimetype writeICalDate( const QDate & ); 00157 00158 static QDate readICalDate(icaltimetype); 00159 00160 static icaltimetype writeICalDateTime( const KDateTime & ); 00161 00162 static icaltimetype writeICalUtcDateTime( const KDateTime & ); 00163 00179 static icalproperty *writeICalDateTimeProperty( const icalproperty_kind kind, 00180 const KDateTime &dt, 00181 ICalTimeZones *tzlist = 0, 00182 ICalTimeZones *tzUsedList = 0 ); 00183 00196 static KDateTime readICalDateTime( icalproperty *p, const icaltimetype &t, 00197 ICalTimeZones *tzlist, bool utc = false ); 00198 00208 static KDateTime readICalUtcDateTime( icalproperty *p, icaltimetype &t, 00209 ICalTimeZones *tzlist = 0 ) 00210 { return readICalDateTime( p, t, tzlist, true ); } 00211 00222 static KDateTime readICalDateTimeProperty( icalproperty *p, 00223 ICalTimeZones *tzlist, bool utc = false ); 00224 00229 static KDateTime readICalUtcDateTimeProperty( icalproperty *p ) 00230 { return readICalDateTimeProperty( p, 0, true ); } 00231 00232 static icaldurationtype writeICalDuration( const Duration &duration ); 00233 00234 static Duration readICalDuration( icaldurationtype d ); 00235 00236 static icaldatetimeperiodtype writeICalDatePeriod( const QDate &date ); 00237 00238 icalcomponent *createCalendarComponent( const Calendar::Ptr &calendar = Calendar::Ptr() ); 00239 00240 icalcomponent *createScheduleComponent( const IncidenceBase::Ptr &incidence, 00241 iTIPMethod method ); 00242 00243 protected: 00244 // void dumpIcalRecurrence( const icalrecurrencetype &r ); 00245 00246 private: 00247 //@cond PRIVATE 00248 class Private; 00249 Private *const d; 00250 //@endcond 00251 }; 00252 00253 } 00254 00255 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:24:11 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:24:11 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.