22 #ifndef KCAL_ICALFORMATIMPL_H
23 #define KCAL_ICALFORMATIMPL_H
28 #include "scheduler.h"
33 #include <libical/ical.h>
49 ICalFormatImpl( ICalFormat *parent );
50 virtual ~ICalFormatImpl();
52 bool populate( Calendar *, icalcomponent *fs);
54 icalcomponent *writeIncidence(IncidenceBase *incidence,
Scheduler::Method method = Scheduler::Request );
55 icalcomponent *writeTodo(Todo *todo);
56 icalcomponent *writeEvent(Event *event);
57 icalcomponent *writeFreeBusy(FreeBusy *freebusy,
59 icalcomponent *writeJournal(Journal *journal);
60 void writeIncidence(icalcomponent *parent,Incidence *incidence);
61 icalproperty *writeAttendee(Attendee *attendee);
62 icalproperty *writeOrganizer(
const Person &organizer );
63 icalproperty *writeAttachment(Attachment *attach);
64 icalproperty *writeRecurrenceRule(Recurrence *);
65 icalrecurrencetype writeRecurrenceRule( RecurrenceRule *recur );
66 icalcomponent *writeAlarm(Alarm *alarm);
68 TQString extractErrorProperty(icalcomponent *);
69 Todo *readTodo(icalcomponent *vtodo);
70 Event *readEvent(icalcomponent *vevent, icalcomponent *vtimezone);
71 FreeBusy *readFreeBusy(icalcomponent *vfreebusy);
72 Journal *readJournal(icalcomponent *vjournal);
73 Attendee *readAttendee(icalproperty *attendee);
74 Person readOrganizer( icalproperty *organizer );
75 Attachment *readAttachment(icalproperty *attach);
76 void readIncidence(icalcomponent *parent, icaltimezone *timezone, Incidence *incidence);
77 void readRecurrenceRule(icalproperty *rrule,Incidence *event );
78 void readExceptionRule( icalproperty *rrule, Incidence *incidence );
79 void readRecurrence(
const struct icalrecurrencetype &r, RecurrenceRule* recur );
80 void readAlarm(icalcomponent *alarm,Incidence *incidence);
82 const TQString &loadedProductId() {
return mLoadedProductId; }
84 static icaltimetype writeICalDate(
const TQDate &);
85 static TQDate readICalDate(icaltimetype);
86 icaltimetype writeICalDateTime(
const TQDateTime &);
87 TQDateTime readICalDateTime( icalproperty*, icaltimetype&, icaltimezone* tz = 0 );
88 static icaldurationtype writeICalDuration(
int seconds);
89 static int readICalDuration(icaldurationtype);
90 static icaldatetimeperiodtype writeICalDatePeriod(
const TQDate &date );
91 icaldatetimeperiodtype writeICalDateTimePeriod(
const TQDateTime &date );
93 icalcomponent *createCalendarComponent(Calendar * = 0);
97 void dumpIcalRecurrence(icalrecurrencetype);
99 void writeIncidenceBase(icalcomponent *parent,IncidenceBase *);
100 void readIncidenceBase(icalcomponent *parent, IncidenceBase *);
101 void writeCustomProperties(icalcomponent *parent,CustomProperties *);
102 void readCustomProperties(icalcomponent *parent,CustomProperties *);
103 void readTimezone(icalcomponent *vtimezone);
108 TQString mLoadedProductId;
110 Event::List mEventsRelate;
111 Todo::List mTodosRelate;
113 static const int mSecondsPerWeek;
114 static const int mSecondsPerDay;
115 static const int mSecondsPerHour;
116 static const int mSecondsPerMinute;
120 class ToComponentVisitor;
Namespace KCal is for global classes, objects and/or functions in libkcal.