Diffstat (limited to 'core/launcher/transferserver.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/launcher/transferserver.cpp | 5 |
1 files changed, 2 insertions, 3 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 | |||
@@ -10,25 +10,25 @@ | |||
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
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 |
26 | #include <pwd.h> | 26 | #include <pwd.h> |
27 | #include <sys/types.h> | 27 | #include <sys/types.h> |
28 | #include <unistd.h> | 28 | #include <unistd.h> |
29 | #include <stdlib.h> | 29 | #include <stdlib.h> |
30 | #include <time.h> | 30 | #include <time.h> |
31 | 31 | ||
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> |
@@ -54,25 +54,24 @@ | |||
54 | #include <qregexp.h> | 54 | #include <qregexp.h> |
55 | //#include <qtopia/qcopchannel_qws.h> | 55 | //#include <qtopia/qcopchannel_qws.h> |
56 | #include <qtopia/process.h> | 56 | #include <qtopia/process.h> |
57 | #include <qtopia/global.h> | 57 | #include <qtopia/global.h> |
58 | #include <qtopia/config.h> | 58 | #include <qtopia/config.h> |
59 | #include <qtopia/private/contact.h> | 59 | #include <qtopia/private/contact.h> |
60 | #include <qtopia/quuid.h> | 60 | #include <qtopia/quuid.h> |
61 | #include <qtopia/version.h> | 61 | #include <qtopia/version.h> |
62 | #ifdef Q_WS_QWS | 62 | #ifdef Q_WS_QWS |
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> |
70 | 69 | ||
71 | const int block_size = 51200; | 70 | const int block_size = 51200; |
72 | 71 | ||
73 | TransferServer::TransferServer( Q_UINT16 port, QObject *parent, | 72 | TransferServer::TransferServer( Q_UINT16 port, QObject *parent, |
74 | const char* name) | 73 | const char* name) |
75 | : QServerSocket( port, 1, parent, name ) | 74 | : QServerSocket( port, 1, parent, name ) |
76 | { | 75 | { |
77 | connections.setAutoDelete( TRUE ); | 76 | connections.setAutoDelete( TRUE ); |
78 | if ( !ok() ) | 77 | if ( !ok() ) |
@@ -105,25 +104,25 @@ void TransferServer::newConnection( int socket ) | |||
105 | ServerPI *ptr = new ServerPI( socket, this ); | 104 | ServerPI *ptr = new ServerPI( socket, this ); |
106 | connect( ptr, SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) ); | 105 | connect( ptr, SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) ); |
107 | connections.append( ptr ); | 106 | connections.append( ptr ); |
108 | } | 107 | } |
109 | 108 | ||
110 | QString SyncAuthentication::serverId() | 109 | QString SyncAuthentication::serverId() |
111 | { | 110 | { |
112 | Config cfg("Security"); | 111 | Config cfg("Security"); |
113 | cfg.setGroup("Sync"); | 112 | cfg.setGroup("Sync"); |
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; |
121 | } | 120 | } |
122 | 121 | ||
123 | QString SyncAuthentication::ownerName() | 122 | QString SyncAuthentication::ownerName() |
124 | { | 123 | { |
125 | QString vfilename = Global::applicationFileName("addressbook", | 124 | QString vfilename = Global::applicationFileName("addressbook", |
126 | "businesscard.vcf"); | 125 | "businesscard.vcf"); |
127 | if (QFile::exists(vfilename)) { | 126 | if (QFile::exists(vfilename)) { |
128 | Contact c; | 127 | Contact c; |
129 | c = Contact::readVCard( vfilename )[0]; | 128 | c = Contact::readVCard( vfilename )[0]; |