-rw-r--r-- | libkdepim/ksyncmanager.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index ffb1ea4..7b9c499 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h | |||
@@ -59,153 +59,153 @@ class KServerSocket : public QServerSocket | |||
59 | void readBackFileFromSocket(); | 59 | void readBackFileFromSocket(); |
60 | private : | 60 | private : |
61 | bool blockRC; | 61 | bool blockRC; |
62 | void send_file(); | 62 | void send_file(); |
63 | void get_file(); | 63 | void get_file(); |
64 | void end_connect(); | 64 | void end_connect(); |
65 | QDialog* mSyncActionDialog; | 65 | QDialog* mSyncActionDialog; |
66 | QSocket* mSocket; | 66 | QSocket* mSocket; |
67 | QString mPassWord; | 67 | QString mPassWord; |
68 | QString mFileName; | 68 | QString mFileName; |
69 | QTime piTime; | 69 | QTime piTime; |
70 | QString piFileString; | 70 | QString piFileString; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | class KCommandSocket : public QObject | 73 | class KCommandSocket : public QObject |
74 | { | 74 | { |
75 | Q_OBJECT | 75 | Q_OBJECT |
76 | public: | 76 | public: |
77 | enum state { successR, errorR, successW, errorW, errorTO, quiet }; | 77 | enum state { successR, errorR, successW, errorW, errorTO, quiet }; |
78 | KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, const char * name=0 ); | 78 | KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, const char * name=0 ); |
79 | void readFile( QString ); | 79 | void readFile( QString ); |
80 | void writeFile( QString ); | 80 | void writeFile( QString ); |
81 | void sendStop(); | 81 | void sendStop(); |
82 | 82 | ||
83 | signals: | 83 | signals: |
84 | void commandFinished( KCommandSocket*, int ); | 84 | void commandFinished( KCommandSocket*, int ); |
85 | private slots: | 85 | private slots: |
86 | void startReadFileFromSocket(); | 86 | void startReadFileFromSocket(); |
87 | void readFileFromSocket(); | 87 | void readFileFromSocket(); |
88 | void deleteSocket(); | 88 | void deleteSocket(); |
89 | void writeFileToSocket(); | 89 | void writeFileToSocket(); |
90 | private : | 90 | private : |
91 | QSocket* mSocket; | 91 | QSocket* mSocket; |
92 | QString mPassWord; | 92 | QString mPassWord; |
93 | Q_UINT16 mPort; | 93 | Q_UINT16 mPort; |
94 | QString mHost; | 94 | QString mHost; |
95 | QString mFileName; | 95 | QString mFileName; |
96 | QTimer* mTimerSocket; | 96 | QTimer* mTimerSocket; |
97 | int mRetVal; | 97 | int mRetVal; |
98 | QTime mTime; | 98 | QTime mTime; |
99 | QString mFileString; | 99 | QString mFileString; |
100 | bool mFirst; | 100 | bool mFirst; |
101 | }; | 101 | }; |
102 | 102 | ||
103 | 103 | ||
104 | class KSyncManager : public QObject | 104 | class KSyncManager : public QObject |
105 | { | 105 | { |
106 | Q_OBJECT | 106 | Q_OBJECT |
107 | 107 | ||
108 | public: | 108 | public: |
109 | enum TargetApp { | 109 | enum TargetApp { |
110 | KOPI = 0, | 110 | KOPI = 0, |
111 | KAPI = 1, | 111 | KAPI = 1, |
112 | PWMPI = 2 }; | 112 | PWMPI = 2 }; |
113 | 113 | ||
114 | KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu); | 114 | KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu); |
115 | ~KSyncManager() ; | 115 | ~KSyncManager() ; |
116 | 116 | ||
117 | void multiSync( bool askforPrefs ); | 117 | void multiSync( bool askforPrefs ); |
118 | bool blockSave() { return mBlockSaveFlag; } | 118 | bool blockSave() { return mBlockSaveFlag; } |
119 | void setBlockSave(bool sa) { mBlockSaveFlag = sa; } | 119 | void setBlockSave(bool sa) { mBlockSaveFlag = sa; } |
120 | void setDefaultFileName( QString s) { mDefFileName = s ;} | 120 | void setDefaultFileName( QString s) { mDefFileName = s ;} |
121 | QString defaultFileName() { return mDefFileName ;} | 121 | QString defaultFileName() { return mDefFileName ;} |
122 | QString syncFileName(); | 122 | QString syncFileName(); |
123 | void enableQuick( bool ask = true); | ||
123 | 124 | ||
124 | QString getCurrentSyncDevice() { return mCurrentSyncDevice; } | 125 | QString getCurrentSyncDevice() { return mCurrentSyncDevice; } |
125 | QString getCurrentSyncName() { return mCurrentSyncName; } | 126 | QString getCurrentSyncName() { return mCurrentSyncName; } |
126 | 127 | ||
127 | void showProgressBar(int percentage, QString caption = QString::null, int total=100); | 128 | void showProgressBar(int percentage, QString caption = QString::null, int total=100); |
128 | void hideProgressBar(); | 129 | void hideProgressBar(); |
129 | bool isProgressBarCanceled(); | 130 | bool isProgressBarCanceled(); |
130 | 131 | ||
131 | // sync stuff | 132 | // sync stuff |
132 | QString mLocalMachineName; | 133 | QString mLocalMachineName; |
133 | QStringList mExternSyncProfiles; | 134 | QStringList mExternSyncProfiles; |
134 | QStringList mSyncProfileNames; | 135 | QStringList mSyncProfileNames; |
135 | bool mAskForPreferences; | 136 | bool mAskForPreferences; |
136 | bool mShowSyncSummary; | 137 | bool mShowSyncSummary; |
137 | bool mIsKapiFile; | 138 | bool mIsKapiFile; |
138 | bool mWriteBackExistingOnly; | 139 | bool mWriteBackExistingOnly; |
139 | int mSyncAlgoPrefs; | 140 | int mSyncAlgoPrefs; |
140 | bool mWriteBackFile; | 141 | bool mWriteBackFile; |
141 | int mWriteBackInFuture; | 142 | int mWriteBackInFuture; |
142 | QString mPhoneDevice; | 143 | QString mPhoneDevice; |
143 | QString mPhoneConnection; | 144 | QString mPhoneConnection; |
144 | QString mPhoneModel; | 145 | QString mPhoneModel; |
145 | QString mPassWordPiSync; | 146 | QString mPassWordPiSync; |
146 | QString mActiveSyncPort; | 147 | QString mActiveSyncPort; |
147 | QString mActiveSyncIP ; | 148 | QString mActiveSyncIP ; |
148 | 149 | ||
149 | signals: | 150 | signals: |
150 | void save(); | 151 | void save(); |
151 | void request_file(); | 152 | void request_file(); |
152 | void getFile( bool ); | 153 | void getFile( bool ); |
153 | 154 | ||
154 | public slots: | 155 | public slots: |
155 | void slotSyncMenu( int ); | 156 | void slotSyncMenu( int ); |
156 | void deleteCommandSocket(KCommandSocket*s, int state); | 157 | void deleteCommandSocket(KCommandSocket*s, int state); |
157 | void readFileFromSocket(); | 158 | void readFileFromSocket(); |
158 | void fillSyncMenu(); | 159 | void fillSyncMenu(); |
159 | 160 | ||
160 | private: | 161 | private: |
161 | void syncPi(); | 162 | void syncPi(); |
162 | KServerSocket * mServerSocket; | 163 | KServerSocket * mServerSocket; |
163 | void enableQuick(); | ||
164 | KPimPrefs* mPrefs; | 164 | KPimPrefs* mPrefs; |
165 | QString mDefFileName; | 165 | QString mDefFileName; |
166 | QString mCurrentSyncDevice; | 166 | QString mCurrentSyncDevice; |
167 | QString mCurrentSyncName; | 167 | QString mCurrentSyncName; |
168 | void quickSyncLocalFile(); | 168 | void quickSyncLocalFile(); |
169 | bool syncWithFile( QString fn , bool quick ); | 169 | bool syncWithFile( QString fn , bool quick ); |
170 | void syncLocalFile(); | 170 | void syncLocalFile(); |
171 | void syncPhone(); | 171 | void syncPhone(); |
172 | void syncSharp(); | 172 | void syncSharp(); |
173 | void syncKDE(); | 173 | void syncKDE(); |
174 | bool syncExternalApplication(QString); | 174 | bool syncExternalApplication(QString); |
175 | int mCurrentSyncProfile ; | 175 | int mCurrentSyncProfile ; |
176 | void syncRemote( KSyncProfile* prof, bool ask = true); | 176 | void syncRemote( KSyncProfile* prof, bool ask = true); |
177 | void edit_sync_options(); | 177 | void edit_sync_options(); |
178 | void edit_pisync_options(); | 178 | void edit_pisync_options(); |
179 | int ringSync(); | 179 | int ringSync(); |
180 | QString getPassword( ); | 180 | QString getPassword( ); |
181 | bool mPisyncFinished; | 181 | bool mPisyncFinished; |
182 | bool mBlockSaveFlag; | 182 | bool mBlockSaveFlag; |
183 | QWidget* mParent; | 183 | QWidget* mParent; |
184 | KSyncInterface* mImplementation; | 184 | KSyncInterface* mImplementation; |
185 | TargetApp mTargetApp; | 185 | TargetApp mTargetApp; |
186 | QPopupMenu* mSyncMenu; | 186 | QPopupMenu* mSyncMenu; |
187 | QProgressBar* bar; | 187 | QProgressBar* bar; |
188 | 188 | ||
189 | private slots: | 189 | private slots: |
190 | void confSync(); | 190 | void confSync(); |
191 | 191 | ||
192 | 192 | ||
193 | }; | 193 | }; |
194 | 194 | ||
195 | 195 | ||
196 | class KSyncInterface | 196 | class KSyncInterface |
197 | { | 197 | { |
198 | public : | 198 | public : |
199 | virtual bool sync(KSyncManager* manager, QString filename, int mode) = 0; | 199 | virtual bool sync(KSyncManager* manager, QString filename, int mode) = 0; |
200 | virtual bool syncExternal(KSyncManager* manager, QString resource) | 200 | virtual bool syncExternal(KSyncManager* manager, QString resource) |
201 | { | 201 | { |
202 | // empty implementation, because some syncable applications do not | 202 | // empty implementation, because some syncable applications do not |
203 | // have an external(sharpdtm) syncmode, like pwmanager. | 203 | // have an external(sharpdtm) syncmode, like pwmanager. |
204 | return false; | 204 | return false; |
205 | } | 205 | } |
206 | 206 | ||
207 | 207 | ||
208 | }; | 208 | }; |
209 | 209 | ||
210 | 210 | ||
211 | #endif | 211 | #endif |