-rw-r--r-- | libkdepim/ksyncmanager.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index e6738b6..d3734da 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h | |||
@@ -9,48 +9,49 @@ | |||
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | 19 | ||
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 | #include <qprogressdialog.h> |
33 | #include <kdialog.h> | ||
33 | 34 | ||
34 | class QPopupMenu; | 35 | class QPopupMenu; |
35 | class KSyncProfile; | 36 | class KSyncProfile; |
36 | class KPimPrefs; | 37 | class KPimPrefs; |
37 | class QWidget; | 38 | class QWidget; |
38 | class KSyncManager; | 39 | class KSyncManager; |
39 | class KSyncInterface; | 40 | class KSyncInterface; |
40 | class QProgressBar; | 41 | class QProgressBar; |
41 | 42 | ||
42 | 43 | ||
43 | class KServerSocket : public QServerSocket | 44 | class KServerSocket : public QServerSocket |
44 | { | 45 | { |
45 | Q_OBJECT | 46 | Q_OBJECT |
46 | 47 | ||
47 | public: | 48 | public: |
48 | KServerSocket ( QString password, Q_UINT16 port, int backlog = 0, QObject * parent=0, const char * name=0 ); | 49 | KServerSocket ( QString password, Q_UINT16 port, int backlog = 0, QObject * parent=0, const char * name=0 ); |
49 | 50 | ||
50 | void newConnection ( int socket ) ; | 51 | void newConnection ( int socket ) ; |
51 | void setFileName( QString fn ) {mFileName = fn;}; | 52 | void setFileName( QString fn ) {mFileName = fn;}; |
52 | signals: | 53 | signals: |
53 | void file_received( bool ); | 54 | void file_received( bool ); |
54 | void request_file(); | 55 | void request_file(); |
55 | void saveFile(); | 56 | void saveFile(); |
56 | void endConnect(); | 57 | void endConnect(); |
@@ -78,49 +79,49 @@ class KServerSocket : public QServerSocket | |||
78 | class KCommandSocket : public QObject | 79 | class KCommandSocket : public QObject |
79 | { | 80 | { |
80 | Q_OBJECT | 81 | Q_OBJECT |
81 | public: | 82 | public: |
82 | enum state { successR, errorR, successW, errorW, errorTO, errorPW, errorCA, errorFI, errorUN, errorED,quiet }; | 83 | enum state { successR, errorR, successW, errorW, errorTO, errorPW, errorCA, errorFI, errorUN, errorED,quiet }; |
83 | KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, QWidget* cap = 0, const char * name=0 ); | 84 | KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, QWidget* cap = 0, const char * name=0 ); |
84 | void readFile( QString ); | 85 | void readFile( QString ); |
85 | void writeFile( QString ); | 86 | void writeFile( QString ); |
86 | void sendStop(); | 87 | void sendStop(); |
87 | 88 | ||
88 | private slots : | 89 | private slots : |
89 | void sendFileRequest(); | 90 | void sendFileRequest(); |
90 | void updateConnectDialog(); | 91 | void updateConnectDialog(); |
91 | 92 | ||
92 | signals: | 93 | signals: |
93 | void commandFinished( KCommandSocket*, int ); | 94 | void commandFinished( KCommandSocket*, int ); |
94 | private slots: | 95 | private slots: |
95 | void startReadFileFromSocket(); | 96 | void startReadFileFromSocket(); |
96 | void readFileFromSocket(); | 97 | void readFileFromSocket(); |
97 | void deleteSocket(); | 98 | void deleteSocket(); |
98 | void writeFileToSocket(); | 99 | void writeFileToSocket(); |
99 | private : | 100 | private : |
100 | int mConnectCount; | 101 | int mConnectCount; |
101 | int mConnectMax; | 102 | int mConnectMax; |
102 | QProgressDialog mConnectProgress; | 103 | KProgressDialog mConnectProgress; |
103 | QWidget* tlw; | 104 | QWidget* tlw; |
104 | QSocket* mSocket; | 105 | QSocket* mSocket; |
105 | QString mPassWord; | 106 | QString mPassWord; |
106 | Q_UINT16 mPort; | 107 | Q_UINT16 mPort; |
107 | QString mHost; | 108 | QString mHost; |
108 | QString mFileName; | 109 | QString mFileName; |
109 | QTimer* mTimerSocket; | 110 | QTimer* mTimerSocket; |
110 | int mRetVal; | 111 | int mRetVal; |
111 | QTime mTime; | 112 | QTime mTime; |
112 | QString mFileString; | 113 | QString mFileString; |
113 | bool mFirst; | 114 | bool mFirst; |
114 | bool mFirstLine; | 115 | bool mFirstLine; |
115 | }; | 116 | }; |
116 | 117 | ||
117 | 118 | ||
118 | class KSyncManager : public QObject | 119 | class KSyncManager : public QObject |
119 | { | 120 | { |
120 | Q_OBJECT | 121 | Q_OBJECT |
121 | 122 | ||
122 | public: | 123 | public: |
123 | enum TargetApp { | 124 | enum TargetApp { |
124 | KOPI = 0, | 125 | KOPI = 0, |
125 | KAPI = 1, | 126 | KAPI = 1, |
126 | PWMPI = 2 }; | 127 | PWMPI = 2 }; |