author | zecke <zecke> | 2004-02-21 11:32:55 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-02-21 11:32:55 (UTC) |
commit | f80b38b2e348b588bf7560161d7551e6bd4939c0 (patch) (unidiff) | |
tree | 34c4359580641cb1447dab8df8731c9733e1d39f /core/launcher/transferserver.cpp | |
parent | b38daa3f05f3a250a8c5114890158863ab02a99f (diff) | |
download | opie-f80b38b2e348b588bf7560161d7551e6bd4939c0.zip opie-f80b38b2e348b588bf7560161d7551e6bd4939c0.tar.gz opie-f80b38b2e348b588bf7560161d7551e6bd4939c0.tar.bz2 |
Move to LibOpie2
remove launcher global and use OGlobal
Diffstat (limited to 'core/launcher/transferserver.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/transferserver.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index 9519d11..9cb9d7a 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp | |||
@@ -19,7 +19,7 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | //#define _XOPEN_SOURCE | 20 | //#define _XOPEN_SOURCE |
21 | 21 | ||
22 | #include <qtopia/global.h> | 22 | #include <opie2/oglobal.h> |
23 | #include <qtopia/qpeapplication.h> | 23 | #include <qtopia/qpeapplication.h> |
24 | 24 | ||
25 | #ifndef Q_OS_WIN32 | 25 | #ifndef Q_OS_WIN32 |
@@ -32,7 +32,7 @@ | |||
32 | #ifndef Q_OS_MACX | 32 | #ifndef Q_OS_MACX |
33 | #include <shadow.h> | 33 | #include <shadow.h> |
34 | #include <crypt.h> | 34 | #include <crypt.h> |
35 | #endif /* Q_OS_MACX */ | 35 | #endif /* Q_OS_MACX */ |
36 | 36 | ||
37 | #else | 37 | #else |
38 | #include <stdlib.h> | 38 | #include <stdlib.h> |
@@ -63,7 +63,6 @@ | |||
63 | #include <qtopia/qcopenvelope_qws.h> | 63 | #include <qtopia/qcopenvelope_qws.h> |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #include "launcherglobal.h" | ||
67 | 66 | ||
68 | #include "transferserver.h" | 67 | #include "transferserver.h" |
69 | #include <qtopia/qprocess.h> | 68 | #include <qtopia/qprocess.h> |
@@ -114,7 +113,7 @@ QString SyncAuthentication::serverId() | |||
114 | QString r = cfg.readEntry("serverid"); | 113 | QString r = cfg.readEntry("serverid"); |
115 | 114 | ||
116 | if ( r.isEmpty() ) { | 115 | if ( r.isEmpty() ) { |
117 | r = Opie::Global::uuid(); | 116 | r = OGlobal::generateUuid(); |
118 | cfg.writeEntry("serverid", r ); | 117 | cfg.writeEntry("serverid", r ); |
119 | } | 118 | } |
120 | return r; | 119 | return r; |
@@ -193,18 +192,18 @@ bool SyncAuthentication::checkPassword( const QString& password ) | |||
193 | static int lastdenial=0; | 192 | static int lastdenial=0; |
194 | static int denials=0; | 193 | static int denials=0; |
195 | int now = time(0); | 194 | int now = time(0); |
196 | 195 | ||
197 | Config cfg("Security"); | 196 | Config cfg("Security"); |
198 | cfg.setGroup("Sync"); | 197 | cfg.setGroup("Sync"); |
199 | QString syncapp = cfg.readEntry("syncapp","Qtopia"); | 198 | QString syncapp = cfg.readEntry("syncapp","Qtopia"); |
200 | 199 | ||
201 | //No password needed if the user really wants it | 200 | //No password needed if the user really wants it |
202 | if (syncapp == "IntelliSync") { | 201 | if (syncapp == "IntelliSync") { |
203 | return TRUE; | 202 | return TRUE; |
204 | } | 203 | } |
205 | 204 | ||
206 | // Detect old Qtopia Desktop (no password) | 205 | // Detect old Qtopia Desktop (no password) |
207 | if ( password.isEmpty() ) { | 206 | if ( password.isEmpty() ) { |
208 | if ( denials < 3 || now > lastdenial+600 ) { | 207 | if ( denials < 3 || now > lastdenial+600 ) { |
209 | QMessageBox unauth( | 208 | QMessageBox unauth( |
210 | tr("Sync Connection"), | 209 | tr("Sync Connection"), |
@@ -219,17 +218,17 @@ bool SyncAuthentication::checkPassword( const QString& password ) | |||
219 | 218 | ||
220 | denials++; | 219 | denials++; |
221 | lastdenial=now; | 220 | lastdenial=now; |
222 | } | 221 | } |
223 | return FALSE; | 222 | return FALSE; |
224 | 223 | ||
225 | } | 224 | } |
226 | 225 | ||
227 | // Second, check sync password... | 226 | // Second, check sync password... |
228 | 227 | ||
229 | static int lock=0; | 228 | static int lock=0; |
230 | if ( lock ) return FALSE; | 229 | if ( lock ) return FALSE; |
231 | 230 | ||
232 | ++lock; | 231 | ++lock; |
233 | 232 | ||
234 | /* | 233 | /* |
235 | * we need to support old Sync software and QtopiaDesktop | 234 | * we need to support old Sync software and QtopiaDesktop |