kpilot
vcal-conduit.h
Go to the documentation of this file.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., 51 Franklin Street, Fifth Floor, Boston, 00025 ** MA 02110-1301, USA. 00026 */ 00027 00028 /* 00029 ** Bug reports and questions can be sent to kde-pim@kde.org 00030 */ 00031 00032 #include <libkcal/event.h> 00033 00034 #include "pilotDateEntry.h" 00035 00036 #include "vcal-conduitbase.h" 00037 00038 class PilotRecord; 00039 class PilotSerialDatabase; 00040 class PilotLocalDatabase; 00041 00042 class VCalConduitPrivate : public VCalConduitPrivateBase 00043 { 00044 public: 00045 VCalConduitPrivate(KCal::Calendar *buddy); 00046 virtual ~VCalConduitPrivate() {}; 00047 00048 KCal::Event::List fAllEvents; 00049 KCal::Event::List::ConstIterator fAllEventsIterator; 00050 00051 virtual int updateIncidences(); 00052 virtual void addIncidence(KCal::Incidence*); 00053 virtual void removeIncidence(KCal::Incidence *); 00054 virtual KCal::Incidence *findIncidence(recordid_t); 00059 virtual KCal::Incidence *findIncidence(PilotRecordBase *tosearch); 00060 virtual KCal::Incidence *getNextIncidence(); 00061 virtual KCal::Incidence *getNextModifiedIncidence(); 00062 virtual int count() {return fAllEvents.count();}; 00063 } ; 00064 00065 00066 00067 class VCalConduit : public VCalConduitBase 00068 { 00069 Q_OBJECT 00070 public: 00071 VCalConduit(KPilotLink *, 00072 const char *name=0L, 00073 const QStringList &args = QStringList()); 00074 virtual ~VCalConduit(); 00075 00076 protected: 00077 virtual const QString dbname() { return CSL1("DatebookDB"); }; 00078 00079 virtual void preSync() {VCalConduitBase::preSync(); _getAppInfo(); }; 00080 virtual VCalConduitPrivateBase *createPrivateCalendarData(KCal::Calendar *fCalendar); 00081 00082 void _getAppInfo(); 00083 void _setAppInfo(); 00084 00085 virtual PilotRecordBase *newPilotEntry(PilotRecord*r); 00086 virtual KCal::Incidence*newIncidence(); 00087 virtual const QString getTitle(PilotRecordBase *de); 00088 virtual VCalConduitSettings *config(); 00089 public: 00090 static VCalConduitSettings *theConfig(); 00091 00092 protected: 00093 virtual PilotRecord *recordFromIncidence(PilotRecordBase *de, 00094 const KCal::Incidence *e); 00095 virtual KCal::Incidence *incidenceFromRecord(KCal::Incidence *e, 00096 const PilotRecordBase *de); 00097 00098 PilotDateInfo *fAppointmentAppInfo; 00099 }; 00100 00101 #endif