vcal-conduit.h
00001 #ifndef _KPILOT_VCAL_CONDUIT_H
00002 #define _KPILOT_VCAL_CONDUIT_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include <plugin.h>
00033
00034
00035 #include "libkcal/event.h"
00036 #include "libkcal/calendarlocal.h"
00037
00038
00039 #include "pilotDateEntry.h"
00040
00041 #include "vcal-factory.h"
00042 #include "vcal-conduitbase.h"
00043
00044
00045 class PilotRecord;
00046 class PilotSerialDatabase;
00047 class PilotLocalDatabase;
00048
00049
00050 class VCalConduitPrivate : public VCalConduitPrivateBase
00051 {
00052 public:
00053 VCalConduitPrivate(KCal::CalendarLocal *buddy);
00054 virtual ~VCalConduitPrivate() {};
00055
00056 #ifdef KDE2
00057 QList<KCal::Event> fAllEvents;
00058 #else
00059 QPtrList<KCal::Event> fAllEvents;
00060 #endif
00061
00062 virtual int updateIncidences();
00063 virtual void addIncidence(KCal::Incidence*);
00064 virtual void removeIncidence(KCal::Incidence *);
00065 virtual KCal::Incidence *findIncidence(recordid_t);
00068 virtual KCal::Incidence *findIncidence(PilotAppCategory*tosearch);
00069 virtual KCal::Incidence *getNextIncidence();
00070 virtual KCal::Incidence *getNextModifiedIncidence();
00071 virtual int count() {return fAllEvents.count();};
00072 } ;
00073
00074
00075
00076 class VCalConduit : public VCalConduitBase
00077 {
00078 Q_OBJECT
00079
00080
00081 public:
00082 VCalConduit(KPilotDeviceLink *,
00083 const char *name=0L,
00084 const QStringList &args = QStringList());
00085 virtual ~VCalConduit();
00086
00087 protected:
00088 virtual const QString configGroup() { return QString::fromLatin1(VCalConduitFactory::group); };
00089 virtual const QString dbname() { return CSL1("DatebookDB"); };
00090
00091 virtual VCalConduitPrivateBase*newVCalPrivate(KCal::CalendarLocal *fCalendar);
00092
00093
00094 virtual PilotAppCategory*newPilotEntry(PilotRecord*r) { if (r) return new PilotDateEntry(r); else return new PilotDateEntry();};
00095 virtual KCal::Incidence*newIncidence() { return new KCal::Event; };
00096 virtual const QString getTitle(PilotAppCategory*de);
00097
00098 protected:
00099 virtual PilotRecord *recordFromIncidence(PilotAppCategory*de, const KCal::Incidence*e);
00100 virtual PilotRecord *recordFromIncidence(PilotDateEntry*de, const KCal::Event*e);
00101 virtual KCal::Incidence *incidenceFromRecord(KCal::Incidence *, const PilotAppCategory *);
00102 virtual KCal::Event *incidenceFromRecord(KCal::Event *, const PilotDateEntry *);
00103
00104
00105 void setStartEndTimes(KCal::Event *,const PilotDateEntry *);
00106 void setAlarms(KCal::Event *,const PilotDateEntry *);
00107 void setRecurrence(KCal::Event *,const PilotDateEntry *);
00108 void setExceptions(KCal::Event *,const PilotDateEntry *);
00109
00110 void setStartEndTimes(PilotDateEntry *, const KCal::Event * );
00111 void setAlarms(PilotDateEntry *, const KCal::Event * );
00112 void setRecurrence(PilotDateEntry *, const KCal::Event * );
00113 void setExceptions(PilotDateEntry *, const KCal::Event * );
00114
00115 void doTest();
00116 } ;
00117
00118 #endif
This file is part of the documentation for kdelibs Version 3.1.4.