-rw-r--r-- | libkdepim/ksyncmanager.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index 810a515..bd3ecdc 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h | |||
@@ -26,85 +26,88 @@ | |||
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 | 32 | ||
33 | class QPopupMenu; | 33 | class QPopupMenu; |
34 | class KSyncProfile; | 34 | class KSyncProfile; |
35 | class KPimPrefs; | 35 | class KPimPrefs; |
36 | class QWidget; | 36 | class QWidget; |
37 | class KSyncManager; | 37 | class KSyncManager; |
38 | class KSyncInterface; | 38 | class KSyncInterface; |
39 | class QProgressBar; | 39 | class QProgressBar; |
40 | 40 | ||
41 | 41 | ||
42 | class KServerSocket : public QServerSocket | 42 | class KServerSocket : public QServerSocket |
43 | { | 43 | { |
44 | Q_OBJECT | 44 | Q_OBJECT |
45 | 45 | ||
46 | public: | 46 | public: |
47 | KServerSocket ( QString password, Q_UINT16 port, int backlog = 0, QObject * parent=0, const char * name=0 ); | 47 | KServerSocket ( QString password, Q_UINT16 port, int backlog = 0, QObject * parent=0, const char * name=0 ); |
48 | 48 | ||
49 | void newConnection ( int socket ) ; | 49 | void newConnection ( int socket ) ; |
50 | void setFileName( QString fn ) {mFileName = fn;}; | 50 | void setFileName( QString fn ) {mFileName = fn;}; |
51 | signals: | 51 | signals: |
52 | void file_received( bool ); | 52 | void file_received( bool ); |
53 | void request_file(); | 53 | void request_file(); |
54 | void saveFile(); | 54 | void saveFile(); |
55 | void endConnect(); | 55 | void endConnect(); |
56 | private slots: | 56 | private slots: |
57 | void discardClient(); | 57 | void discardClient(); |
58 | void deleteSocket(); | ||
58 | void readClient(); | 59 | void readClient(); |
60 | void displayErrorMessage(); | ||
59 | void readBackFileFromSocket(); | 61 | void readBackFileFromSocket(); |
60 | private : | 62 | private : |
63 | int mErrorMessage; | ||
61 | bool blockRC; | 64 | bool blockRC; |
62 | void send_file(); | 65 | void send_file(); |
63 | void get_file(); | 66 | void get_file(); |
64 | void end_connect(); | 67 | void end_connect(); |
65 | void error_connect(); | 68 | void error_connect( QString ); |
66 | QDialog* mSyncActionDialog; | 69 | QDialog* mSyncActionDialog; |
67 | QSocket* mSocket; | 70 | QSocket* mSocket; |
68 | QString mPassWord; | 71 | QString mPassWord; |
69 | QString mFileName; | 72 | QString mFileName; |
70 | QTime piTime; | 73 | QTime piTime; |
71 | QString piFileString; | 74 | QString piFileString; |
72 | }; | 75 | }; |
73 | 76 | ||
74 | class KCommandSocket : public QObject | 77 | class KCommandSocket : public QObject |
75 | { | 78 | { |
76 | Q_OBJECT | 79 | Q_OBJECT |
77 | public: | 80 | public: |
78 | enum state { successR, errorR, successW, errorW, errorTO, errorPW,quiet }; | 81 | enum state { successR, errorR, successW, errorW, errorTO, errorPW, errorCA, errorFI, errorUN,quiet }; |
79 | KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, QWidget* cap = 0, const char * name=0 ); | 82 | KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, QWidget* cap = 0, const char * name=0 ); |
80 | void readFile( QString ); | 83 | void readFile( QString ); |
81 | void writeFile( QString ); | 84 | void writeFile( QString ); |
82 | void sendStop(); | 85 | void sendStop(); |
83 | 86 | ||
84 | private slots : | 87 | private slots : |
85 | void sendFileRequest(); | 88 | void sendFileRequest(); |
86 | 89 | ||
87 | signals: | 90 | signals: |
88 | void commandFinished( KCommandSocket*, int ); | 91 | void commandFinished( KCommandSocket*, int ); |
89 | private slots: | 92 | private slots: |
90 | void startReadFileFromSocket(); | 93 | void startReadFileFromSocket(); |
91 | void readFileFromSocket(); | 94 | void readFileFromSocket(); |
92 | void deleteSocket(); | 95 | void deleteSocket(); |
93 | void writeFileToSocket(); | 96 | void writeFileToSocket(); |
94 | private : | 97 | private : |
95 | QWidget* tlw; | 98 | QWidget* tlw; |
96 | QSocket* mSocket; | 99 | QSocket* mSocket; |
97 | QString mPassWord; | 100 | QString mPassWord; |
98 | Q_UINT16 mPort; | 101 | Q_UINT16 mPort; |
99 | QString mHost; | 102 | QString mHost; |
100 | QString mFileName; | 103 | QString mFileName; |
101 | QTimer* mTimerSocket; | 104 | QTimer* mTimerSocket; |
102 | int mRetVal; | 105 | int mRetVal; |
103 | QTime mTime; | 106 | QTime mTime; |
104 | QString mFileString; | 107 | QString mFileString; |
105 | bool mFirst; | 108 | bool mFirst; |
106 | bool mFirstLine; | 109 | bool mFirstLine; |
107 | }; | 110 | }; |
108 | 111 | ||
109 | 112 | ||
110 | class KSyncManager : public QObject | 113 | class KSyncManager : public QObject |