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
00037 class QTimer;
00038
00039 #include "syncAction.h"
00040
00041 class TestLink : public SyncAction
00042 {
00043 Q_OBJECT
00044
00045 public:
00046 TestLink(KPilotLink *);
00047
00048 protected:
00049 virtual bool exec();
00050 } ;
00051
00052 class BackupAction : public SyncAction
00053 {
00054 Q_OBJECT
00055
00056 public:
00065 BackupAction(KPilotLink *, bool full);
00066
00067 enum Status { Init,
00068 Error,
00069 FastBackup,
00070 FullBackup,
00071 BackupIncomplete,
00072 BackupEnded,
00073 BackupComplete
00074 } ;
00075 virtual QString statusString() const;
00076
00086 void setDirectory( const QString &path );
00087
00088 protected:
00089 virtual bool exec();
00090
00091 private:
00093 void endBackup();
00094
00098 bool createLocalDatabase(DBInfo *info);
00099
00105 static bool checkBackupDirectory( const QString &backupDir );
00106
00107 private slots:
00112 void backupOneDB();
00113
00114 private:
00115 class Private;
00116 Private *fP;
00117 } ;
00118
00119 class FileInstallAction : public SyncAction
00120 {
00121 Q_OBJECT
00122 public:
00123 FileInstallAction(KPilotLink *,
00124 const QString &fileDir);
00125 virtual ~FileInstallAction();
00126
00127 virtual QString statusString() const;
00128
00129 protected:
00130 virtual bool exec();
00131
00132 protected slots:
00133 void installNextFile();
00134
00135 private:
00136 int fDBIndex;
00137 QTimer *fTimer;
00138 QString fDir;
00139 QStringList fList;
00140
00141
00142
00143 bool resourceOK(const QString &, const QString &) ;
00144 } ;
00145
00146 class CleanupAction : public SyncAction
00147 {
00148 public:
00149 CleanupAction(KPilotLink * p);
00150 virtual ~CleanupAction();
00151
00152 protected:
00153 virtual bool exec();
00154 } ;
00155
00156 #endif
|