kpilot/kpilot
hotSync.h00001 #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
00036 class QTimer;
00037
00038 #include "syncAction.h"
00039 #include "syncStack.h"
00040
00041 class TestLink : public SyncAction
00042 {
00043 Q_OBJECT
00044
00045 public:
00046 TestLink(KPilotDeviceLink *);
00047
00048 protected:
00049 virtual bool exec();
00050 } ;
00051
00052 class BackupAction : public SyncAction
00053 {
00054 Q_OBJECT
00055
00056 public:
00057 BackupAction(KPilotDeviceLink *, bool full);
00058
00059 enum Status { Init,
00060 Error,
00061 FastBackup,
00062 FullBackup,
00063 BackupIncomplete,
00064 BackupEnded,
00065 BackupComplete
00066 } ;
00067 virtual QString statusString() const;
00068
00069 protected:
00070 virtual bool exec();
00071
00072 private:
00076 void endBackup();
00077 bool createLocalDatabase(DBInfo *);
00078 bool checkBackupDirectory(QString backupDir);
00079
00080 private slots:
00081 void backupOneDB();
00082
00083 private:
00084 QTimer *fTimer;
00085 int fDBIndex;
00086 QString fBackupDir, fDatabaseDir;
00087 bool fFullBackup;
00088 QStringList fNoBackupDBs;
00089 QValueList<unsigned long> fNoBackupCreators;
00090 QStringList mDeviceDBs;
00091 } ;
00092
00093 class FileInstallAction : public SyncAction
00094 {
00095 Q_OBJECT
00096 public:
00097 FileInstallAction(KPilotDeviceLink *,
00098 const QString &fileDir);
00099 virtual ~FileInstallAction();
00100
00101 virtual QString statusString() const;
00102
00103 protected:
00104 virtual bool exec();
00105
00106 protected slots:
00107 void installNextFile();
00108
00109 private:
00110 int fDBIndex;
00111 QTimer *fTimer;
00112 QString fDir;
00113 QStringList fList;
00114
00115
00116
00117 bool resourceOK(const QString &, const QString &) ;
00118 } ;
00119
00120 class CleanupAction : public SyncAction
00121 {
00122 public:
00123 CleanupAction(KPilotDeviceLink * p);
00124 virtual ~CleanupAction();
00125
00126 protected:
00127 virtual bool exec();
00128 } ;
00129
00130 #endif
|