kpilot/kpilot
syncStack.hGo to the documentation of this file.00001 #ifndef _KPILOT_SYNCSTACK_H
00002 #define _KPILOT_SYNCSTACK_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 #include <qptrqueue.h>
00035
00036 #include "plugin.h"
00037
00061 class ActionQueue : public SyncAction
00062 {
00063 Q_OBJECT
00064 public:
00068 ActionQueue(KPilotDeviceLink *device);
00069
00070 virtual ~ActionQueue();
00071
00072 private:
00073 QPtrQueue < SyncAction > SyncActionQueue;
00074
00075 public:
00076 bool isEmpty() const { return SyncActionQueue.isEmpty(); };
00081 void addAction(SyncAction * a) { SyncActionQueue.enqueue(a); };
00082
00083 protected:
00084 void clear() { SyncActionQueue.clear(); };
00085 SyncAction *nextAction() { return SyncActionQueue.dequeue(); };
00086
00087 bool fReady;
00088
00089 QString fInstallerDir;
00090 QStringList fInstallerFiles;
00091 QStringList fConduits;
00092
00093 public:
00109 void queueInit(bool checkUser = false);
00110 void queueConduits(const QStringList &conduits,const SyncAction::SyncMode &e, bool local=false);
00111 void queueInstaller(const QString &dir);
00112 void queueCleanup();
00113
00114
00115 protected:
00116 virtual bool exec();
00117
00118 protected slots:
00122 void actionCompleted(SyncAction *);
00123 };
00124
00129 class WelcomeAction : public SyncAction
00130 {
00131 public:
00132 WelcomeAction(KPilotDeviceLink *);
00133
00134 protected:
00135 virtual bool exec();
00136 } ;
00137
00143 class SorryAction : public SyncAction
00144 {
00145 public:
00146 SorryAction(KPilotDeviceLink *, const QString &s=QString::null);
00147
00148 protected:
00149 virtual bool exec();
00150 QString fMessage;
00151 } ;
00152
00160 class LocalBackupAction : public SyncAction
00161 {
00162 public:
00163 LocalBackupAction(KPilotDeviceLink *, const QString &);
00164 protected:
00165 virtual bool exec();
00166 QString fDir;
00167 } ;
00168
00175 class ConduitProxy : public ConduitAction
00176 {
00177 Q_OBJECT
00178
00179 public:
00180 ConduitProxy(KPilotDeviceLink *,
00181 const QString &desktopName,
00182 const SyncAction::SyncMode &m);
00183
00184 protected:
00185 virtual bool exec();
00186 protected slots:
00187 void execDone(SyncAction *);
00188
00189 protected:
00190 QString fDesktopName;
00191 QString fLibraryName;
00192 ConduitAction *fConduit;
00193 } ;
00194
00195
00196 #endif
|