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-2003 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 #include <libkcal/event.h>
00035 #include <libkcal/calendarlocal.h>
00036 #include "vcal-factory.h"
00037 #include "vcal-conduitbase.h"
00038 #include <pilotDateEntry.h>
00039 
00040 class PilotRecord;
00041 class PilotSerialDatabase;
00042 class PilotLocalDatabase;
00043 
00044 
00045 class VCalConduitPrivate : public VCalConduitPrivateBase
00046 {
00047 public:
00048     VCalConduitPrivate(KCal::Calendar *buddy);
00049     virtual ~VCalConduitPrivate() {};
00050 
00051     KCal::Event::List fAllEvents;
00052     KCal::Event::List::ConstIterator fAllEventsIterator;
00053 
00054     virtual int updateIncidences();
00055     virtual void addIncidence(KCal::Incidence*);
00056     virtual void removeIncidence(KCal::Incidence *);
00057     virtual KCal::Incidence *findIncidence(recordid_t);
00060     virtual KCal::Incidence *findIncidence(PilotAppCategory*tosearch);
00061     virtual KCal::Incidence *getNextIncidence();
00062     virtual KCal::Incidence *getNextModifiedIncidence();
00063     virtual int count() {return fAllEvents.count();};
00064 } ;
00065 
00066 
00067 
00068 class VCalConduit : public VCalConduitBase
00069 {
00070 Q_OBJECT
00071 public:
00072     VCalConduit(KPilotDeviceLink *,
00073         const char *name=0L,
00074         const QStringList &args = QStringList());
00075     virtual ~VCalConduit();
00076 
00077 protected:
00078     virtual const QString dbname() { return CSL1("DatebookDB"); };
00079 
00080     virtual VCalConduitPrivateBase*newVCalPrivate(KCal::Calendar *fCalendar);
00081 
00082 
00083     virtual PilotAppCategory*newPilotEntry(PilotRecord*r) { if (r) return new PilotDateEntry(r);  else return new PilotDateEntry();};
00084     virtual KCal::Incidence*newIncidence() { return new KCal::Event; };
00085     virtual const QString getTitle(PilotAppCategory*de);
00086 
00087 protected:
00088     virtual PilotRecord *recordFromIncidence(PilotAppCategory*de, const KCal::Incidence*e);
00089     virtual PilotRecord *recordFromIncidence(PilotDateEntry*de, const KCal::Event*e);
00090     virtual KCal::Incidence *incidenceFromRecord(KCal::Incidence *, const PilotAppCategory *);
00091     virtual KCal::Event *incidenceFromRecord(KCal::Event *, const PilotDateEntry *);
00092 
00093 
00094     void setStartEndTimes(KCal::Event *,const PilotDateEntry *);
00095     void setAlarms(KCal::Event *,const PilotDateEntry *);
00096     void setRecurrence(KCal::Event *,const PilotDateEntry *);
00097     void setExceptions(KCal::Event *,const PilotDateEntry *);
00098 
00099     void setStartEndTimes(PilotDateEntry *, const KCal::Event * );
00100     void setAlarms(PilotDateEntry *, const KCal::Event * );
00101     void setRecurrence(PilotDateEntry *, const KCal::Event * );
00102     void setExceptions(PilotDateEntry *, const KCal::Event * );
00103 
00104 } ;
00105 
00106 #endif
KDE Logo
This file is part of the documentation for kpilot Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:36:50 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003