-rw-r--r-- | libkdepim/ksyncmanager.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index 30ec1e6..e6738b6 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h | |||
@@ -20,24 +20,25 @@ | |||
20 | $Id$ | 20 | $Id$ |
21 | */ | 21 | */ |
22 | #ifndef _KSYNCMANAGER_H | 22 | #ifndef _KSYNCMANAGER_H |
23 | #define _KSYNCMANAGER_H | 23 | #define _KSYNCMANAGER_H |
24 | 24 | ||
25 | #include <qobject.h> | 25 | #include <qobject.h> |
26 | #include <qstring.h> | 26 | #include <qstring.h> |
27 | #include <qsocket.h> | 27 | #include <qsocket.h> |
28 | #include <qdatetime.h> | 28 | #include <qdatetime.h> |
29 | #include <qserversocket.h> | 29 | #include <qserversocket.h> |
30 | #include <qtextstream.h> | 30 | #include <qtextstream.h> |
31 | #include <qregexp.h> | 31 | #include <qregexp.h> |
32 | #include <qprogressdialog.h> | ||
32 | 33 | ||
33 | class QPopupMenu; | 34 | class QPopupMenu; |
34 | class KSyncProfile; | 35 | class KSyncProfile; |
35 | class KPimPrefs; | 36 | class KPimPrefs; |
36 | class QWidget; | 37 | class QWidget; |
37 | class KSyncManager; | 38 | class KSyncManager; |
38 | class KSyncInterface; | 39 | class KSyncInterface; |
39 | class QProgressBar; | 40 | class QProgressBar; |
40 | 41 | ||
41 | 42 | ||
42 | class KServerSocket : public QServerSocket | 43 | class KServerSocket : public QServerSocket |
43 | { | 44 | { |
@@ -77,33 +78,37 @@ class KServerSocket : public QServerSocket | |||
77 | class KCommandSocket : public QObject | 78 | class KCommandSocket : public QObject |
78 | { | 79 | { |
79 | Q_OBJECT | 80 | Q_OBJECT |
80 | public: | 81 | public: |
81 | enum state { successR, errorR, successW, errorW, errorTO, errorPW, errorCA, errorFI, errorUN, errorED,quiet }; | 82 | enum state { successR, errorR, successW, errorW, errorTO, errorPW, errorCA, errorFI, errorUN, errorED,quiet }; |
82 | KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, QWidget* cap = 0, const char * name=0 ); | 83 | KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, QWidget* cap = 0, const char * name=0 ); |
83 | void readFile( QString ); | 84 | void readFile( QString ); |
84 | void writeFile( QString ); | 85 | void writeFile( QString ); |
85 | void sendStop(); | 86 | void sendStop(); |
86 | 87 | ||
87 | private slots : | 88 | private slots : |
88 | void sendFileRequest(); | 89 | void sendFileRequest(); |
90 | void updateConnectDialog(); | ||
89 | 91 | ||
90 | signals: | 92 | signals: |
91 | void commandFinished( KCommandSocket*, int ); | 93 | void commandFinished( KCommandSocket*, int ); |
92 | private slots: | 94 | private slots: |
93 | void startReadFileFromSocket(); | 95 | void startReadFileFromSocket(); |
94 | void readFileFromSocket(); | 96 | void readFileFromSocket(); |
95 | void deleteSocket(); | 97 | void deleteSocket(); |
96 | void writeFileToSocket(); | 98 | void writeFileToSocket(); |
97 | private : | 99 | private : |
100 | int mConnectCount; | ||
101 | int mConnectMax; | ||
102 | QProgressDialog mConnectProgress; | ||
98 | QWidget* tlw; | 103 | QWidget* tlw; |
99 | QSocket* mSocket; | 104 | QSocket* mSocket; |
100 | QString mPassWord; | 105 | QString mPassWord; |
101 | Q_UINT16 mPort; | 106 | Q_UINT16 mPort; |
102 | QString mHost; | 107 | QString mHost; |
103 | QString mFileName; | 108 | QString mFileName; |
104 | QTimer* mTimerSocket; | 109 | QTimer* mTimerSocket; |
105 | int mRetVal; | 110 | int mRetVal; |
106 | QTime mTime; | 111 | QTime mTime; |
107 | QString mFileString; | 112 | QString mFileString; |
108 | bool mFirst; | 113 | bool mFirst; |
109 | bool mFirstLine; | 114 | bool mFirstLine; |
@@ -196,24 +201,25 @@ class KSyncManager : public QObject | |||
196 | int ringSync(); | 201 | int ringSync(); |
197 | QString getPassword( ); | 202 | QString getPassword( ); |
198 | bool mPisyncFinished; | 203 | bool mPisyncFinished; |
199 | bool mBlockSaveFlag; | 204 | bool mBlockSaveFlag; |
200 | QWidget* mParent; | 205 | QWidget* mParent; |
201 | KSyncInterface* mImplementation; | 206 | KSyncInterface* mImplementation; |
202 | TargetApp mTargetApp; | 207 | TargetApp mTargetApp; |
203 | QPopupMenu* mSyncMenu; | 208 | QPopupMenu* mSyncMenu; |
204 | QProgressBar* bar; | 209 | QProgressBar* bar; |
205 | bool mSyncWithDesktop; | 210 | bool mSyncWithDesktop; |
206 | 211 | ||
207 | private slots: | 212 | private slots: |
213 | void displayErrorPort(); | ||
208 | void confSync(); | 214 | void confSync(); |
209 | 215 | ||
210 | 216 | ||
211 | }; | 217 | }; |
212 | 218 | ||
213 | 219 | ||
214 | class KSyncInterface | 220 | class KSyncInterface |
215 | { | 221 | { |
216 | public : | 222 | public : |
217 | virtual void removeSyncInfo( QString syncProfile) = 0; | 223 | virtual void removeSyncInfo( QString syncProfile) = 0; |
218 | virtual bool sync(KSyncManager* manager, QString filename, int mode) = 0; | 224 | virtual bool sync(KSyncManager* manager, QString filename, int mode) = 0; |
219 | virtual bool syncExternal(KSyncManager* manager, QString resource) | 225 | virtual bool syncExternal(KSyncManager* manager, QString resource) |