kpilot Library API Documentation

MultiDB-conduit.h

00001 #ifndef _MultiDBCONDUIT_H
00002 #define _MultiDBCONDUIT_H
00003 
00004 /* MultiDB-conduit.h                    KPilot
00005 **
00006 ** Copyright (C) 1998-2001 Dan Pilone
00007 ** Copyright (C) 1998-2000 Preston Brown
00008 ** Copyright (C) 1998 Herwin-Jan Steehouwer
00009 ** Copyright (C) 1998 Reinhold Kainhofer
00010 **
00011 ** This file is part of the MultiDB conduit, a conduit for KPilot that
00012 ** synchronises the Pilot's MultiDB application with the outside world,
00013 ** which currently means KOrganizer.
00014 */
00015 
00016 /*
00017 ** This program is free software; you can redistribute it and/or modify
00018 ** it under the terms of the GNU General Public License as published by
00019 ** the Free Software Foundation; either version 2 of the License, or
00020 ** (at your option) any later version.
00021 **
00022 ** This program is distributed in the hope that it will be useful,
00023 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00024 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00025 ** GNU General Public License for more details.
00026 **
00027 ** You should have received a copy of the GNU General Public License
00028 ** along with this program in a file called COPYING; if not, write to
00029 ** the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00030 ** MA 02111-1307, USA.
00031 */
00032 
00033 /*
00034 ** Bug reports and questions can be sent to groot@kde.org
00035 */
00036 
00037 #include "klistview.h"
00038 #include "options.h"
00039 
00040 #include <plugin.h>
00041 #include <todo.h>
00042 #include <pilotSerialDatabase.h>
00043 #include <pilotLocalDatabase.h>
00044 #include "MultiDB-factory.h"
00045 #include "calendar.h"
00046 
00047 using namespace KCal;
00048 
00049 
00050 class MultiDBConduit : public ConduitAction {
00051         Q_OBJECT
00052 public:
00053         MultiDBConduit(KPilotDeviceLink *, const char *n=0L, const QStringList &l=QStringList(), SyncTypeList_t *tps=NULL);
00054         virtual ~MultiDBConduit() {} ;
00055 
00056         virtual unsigned long flags() const { return 0; }
00057         virtual bool exec();
00058         virtual bool isCorrectDBTypeCreator(DBInfo dbinfo) { return dbinfo.type==dbtype() && dbinfo.creator==dbcreator(); } ;
00059 
00060         /* pure virtual functions, need to be overloaded in child classes */
00061         virtual const QString conduitName()=0;
00062         virtual const QString conduitSettingsGroup()=0;
00063         virtual const QString settingsFileList()=0;
00064         virtual const unsigned long dbtype()=0;
00065         virtual const unsigned long dbcreator()=0;
00066         virtual bool GetSyncType(DBInfo dbinfo, DBSyncInfo*syncinfo);
00067         virtual const QString getSyncTypeEntry()=0;
00068         virtual const QString getSyncFileEntry()=0;
00069         virtual void updateLocalEntry(PilotRecord *rec, bool force=false)=0;
00070         virtual bool preSyncAction(DBSyncInfo*dbinfo);
00071 
00072 protected slots:
00073         virtual void syncNextDB();
00074         virtual void finishedDB();
00075         virtual void syncNextRecord();
00076         virtual void cleanup();
00077         virtual void cleanupDB();
00078 
00079 protected:
00080         DBSyncInfo syncinfo;
00081         QStringList dbases;
00082         int dbnr;
00083         bool fFullSync, conflictResolution, archive;
00084         PilotSerialDatabase *fCurrentDatabase;
00085         PilotLocalDatabase *fBackupDatabase;
00086         SyncTypeList_t *synctypes;
00087 };
00088 
00089 
00090 // $Log: MultiDB-conduit.h,v $
00091 // Revision 1.3.4.1  2003/03/12 23:31:10  adridg
00092 // CVS_SILENT: FSF address change
00093 //
00094 // Revision 1.3  2002/08/23 22:59:29  kainhofe
00095 // Implemented Adriaan's change 'signal: void exec()' -> 'bool exec()' for "my" conduits
00096 //
00097 // Revision 1.2  2002/07/05 00:15:22  kainhofe
00098 // Added KPilotDeviceLink::tickle(), Changelog update, compile fixes
00099 //
00100 // Revision 1.1  2002/04/07 12:09:42  kainhofe
00101 // Initial checkin of the conduit. The gui works mostly, but syncing crashes KPilot...
00102 //
00103 // Revision 1.1  2002/04/07 01:03:52  reinhold
00104 // the list of possible actions is now created dynamically
00105 //
00106 // Revision 1.11  2002/04/05 21:17:00  reinhold
00107 // *** empty log message ***
00108 //
00109 // Revision 1.10  2002/04/01 09:22:11  reinhold
00110 // Implemented the syncNextRecord routine
00111 //
00112 // Revision 1.9  2002/03/28 13:47:53  reinhold
00113 // Added the list of synctypes, aboutbox is now directly passed on to the setup dlg (instead of being a static var)
00114 //
00115 // Revision 1.7  2002/03/23 21:46:42  reinhold
00116 // config  dlg works, but the last changes crash the plugin itself
00117 //
00118 // Revision 1.6  2002/03/23 18:21:14  reinhold
00119 // Cleaned up the structure. Works with QTimer instead of loops.
00120 //
00121 // Revision 1.5  2002/03/15 20:43:17  reinhold
00122 // Fixed the crash on loading (member function not defined)...
00123 //
00124 // Revision 1.4  2002/03/13 22:14:40  reinhold
00125 // GUI should work now...
00126 //
00127 // Revision 1.3  2002/03/10 23:58:32  reinhold
00128 // Made the conduit compile...
00129 //
00130 // Revision 1.2  2002/03/10 16:06:43  reinhold
00131 // Cleaned up the class hierarchy, implemented some more features (should be quite finished now...)
00132 //
00133 // Revision 1.1.1.1  2002/03/09 15:38:45  reinhold
00134 // Initial checin of the  project manager / List manager conduit.
00135 //
00136 //
00137 //
00138 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:44 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001