kpilot Library API Documentation

vcal-conduit.h

00001 #ifndef _KPILOT_VCAL_CONDUIT_H
00002 #define _KPILOT_VCAL_CONDUIT_H
00003 /* vcal-conduit.h                       KPilot
00004 **
00005 ** Copyright (C) 2002 Reinhold Kainhofer
00006 ** Copyright (C) 2001 by Dan Pilone
00007 **
00008 ** This file defines the vcal-conduit plugin.
00009 */
00010 
00011 /*
00012 ** This program is free software; you can redistribute it and/or modify
00013 ** it under the terms of the GNU General Public License as published by
00014 ** the Free Software Foundation; either version 2 of the License, or
00015 ** (at your option) any later version.
00016 **
00017 ** This program is distributed in the hope that it will be useful,
00018 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00020 ** GNU General Public License for more details.
00021 **
00022 ** You should have received a copy of the GNU General Public License
00023 ** along with this program in a file called COPYING; if not, write to
00024 ** the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00025 ** MA 02111-1307, USA.
00026 */
00027 
00028 /*
00029 ** Bug reports and questions can be sent to kde-pim@kde.org
00030 */
00031 
00032 #include <plugin.h>
00033 
00034 // libkcal includes
00035 #include "libkcal/event.h"
00036 #include "libkcal/calendarlocal.h"
00037 
00038 // kpilot includes
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 //private:
00080 //      class VCalPrivate;
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         /* virtual */ void doTest();
00116 } ;
00117 
00118 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:15 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001