hotSync.h
00001 #ifndef _KPILOT_HOTSYNC_H
00002 #define _KPILOT_HOTSYNC_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
00033
00034
00035 class QTimer;
00036
00037 #include <qstring.h>
00038 #include <qstringlist.h>
00039
00040 #include "syncAction.h"
00041 #include "syncStack.h"
00042
00043 class TestLink : public SyncAction
00044 {
00045 Q_OBJECT
00046
00047 public:
00048 TestLink(KPilotDeviceLink *);
00049
00050 protected:
00051 virtual bool exec();
00052 } ;
00053
00054 class BackupAction : public SyncAction
00055 {
00056 Q_OBJECT
00057
00058 public:
00059 BackupAction(KPilotDeviceLink *, int mode=ActionQueue::BackupMode);
00060
00061 enum Status { Init,
00062 Error,
00063 FastBackup,
00064 FullBackup,
00065 BackupIncomplete,
00066 BackupEnded,
00067 BackupComplete
00068 } ;
00069 virtual QString statusString() const;
00070
00071 protected:
00072 virtual bool exec();
00073
00074 private:
00078 void endBackup();
00079 bool createLocalDatabase(DBInfo *);
00080 bool checkBackupDirectory(QString backupDir);
00081
00082 private slots:
00083 void backupOneDB();
00084
00085 private:
00086 QTimer *fTimer;
00087 int fDBIndex;
00088 QString fBackupDir, fDatabaseDir;
00089 int fMode;
00090 bool fFullBackup;
00091 } ;
00092
00093 class FileInstallAction : public SyncAction
00094 {
00095 Q_OBJECT
00096 public:
00097 FileInstallAction(KPilotDeviceLink *,
00098 const QString &fileDir,
00099 const QStringList &fileNames);
00100 virtual ~FileInstallAction();
00101
00102 virtual QString statusString() const;
00103
00104 protected:
00105 virtual bool exec();
00106
00107 protected slots:
00108 void installNextFile();
00109
00110 private:
00111 int fDBIndex;
00112 QTimer *fTimer;
00113 QString fDir;
00114 QStringList fList;
00115 } ;
00116
00117 class CleanupAction : public SyncAction
00118 {
00119 public:
00120 CleanupAction(KPilotDeviceLink * p);
00121 virtual ~CleanupAction();
00122
00123 protected:
00124 virtual bool exec();
00125 } ;
00126
00127 #endif
This file is part of the documentation for kpilot Library Version 3.2.2.