Diffstat (limited to 'core/launcher/transferserver.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/transferserver.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index 8367a62..b998e95 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp | |||
@@ -1,84 +1,74 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
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 <opie2/oglobal.h> | 22 | #include <opie2/oglobal.h> |
23 | #include <qtopia/qpeapplication.h> | ||
24 | 23 | ||
25 | #ifndef Q_OS_WIN32 | 24 | #ifndef Q_OS_WIN32 |
26 | #include <pwd.h> | 25 | #include <pwd.h> |
27 | #include <sys/types.h> | 26 | #include <sys/types.h> |
28 | #include <unistd.h> | 27 | #include <unistd.h> |
29 | #include <stdlib.h> | 28 | #include <stdlib.h> |
30 | #include <time.h> | 29 | #include <time.h> |
31 | 30 | ||
32 | #ifndef Q_OS_MACX | 31 | #ifndef Q_OS_MACX |
33 | #include <shadow.h> | 32 | #include <shadow.h> |
34 | #include <crypt.h> | 33 | #include <crypt.h> |
35 | #endif /* Q_OS_MACX */ | 34 | #endif /* Q_OS_MACX */ |
36 | 35 | ||
37 | #else | 36 | #else |
38 | #include <stdlib.h> | 37 | #include <stdlib.h> |
39 | #include <time.h> | 38 | #include <time.h> |
40 | #endif | 39 | #endif |
41 | 40 | ||
42 | 41 | ||
43 | #if defined(_OS_LINUX_) | 42 | #if defined(_OS_LINUX_) |
44 | #include <shadow.h> | 43 | #include <shadow.h> |
45 | #endif | 44 | #endif |
46 | 45 | ||
47 | #include <qdir.h> | ||
48 | #include <qfile.h> | ||
49 | #include <qtextstream.h> | 46 | #include <qtextstream.h> |
50 | #include <qdatastream.h> | ||
51 | #include <qmessagebox.h> | 47 | #include <qmessagebox.h> |
52 | #include <qstringlist.h> | ||
53 | #include <qfileinfo.h> | ||
54 | #include <qregexp.h> | ||
55 | //#include <qtopia/qcopchannel_qws.h> | 48 | //#include <qtopia/qcopchannel_qws.h> |
56 | #include <qtopia/process.h> | 49 | #include <qtopia/process.h> |
57 | #include <qtopia/global.h> | ||
58 | #include <qtopia/config.h> | ||
59 | #include <qtopia/private/contact.h> | 50 | #include <qtopia/private/contact.h> |
60 | #include <qtopia/quuid.h> | ||
61 | #include <qtopia/version.h> | 51 | #include <qtopia/version.h> |
62 | #ifdef Q_WS_QWS | 52 | #ifdef Q_WS_QWS |
63 | #include <qtopia/qcopenvelope_qws.h> | 53 | #include <qtopia/qcopenvelope_qws.h> |
64 | #endif | 54 | #endif |
65 | 55 | ||
66 | 56 | ||
67 | #include "transferserver.h" | 57 | #include "transferserver.h" |
68 | #include <qtopia/qprocess.h> | 58 | #include <qtopia/qprocess.h> |
69 | 59 | ||
70 | const int block_size = 51200; | 60 | const int block_size = 51200; |
71 | 61 | ||
72 | TransferServer::TransferServer( Q_UINT16 port, QObject *parent, | 62 | TransferServer::TransferServer( Q_UINT16 port, QObject *parent, |
73 | const char* name) | 63 | const char* name) |
74 | : QServerSocket( port, 1, parent, name ) | 64 | : QServerSocket( port, 1, parent, name ) |
75 | { | 65 | { |
76 | connections.setAutoDelete( TRUE ); | 66 | connections.setAutoDelete( TRUE ); |
77 | if ( !ok() ) | 67 | if ( !ok() ) |
78 | qWarning( "Failed to bind to port %d", port ); | 68 | qWarning( "Failed to bind to port %d", port ); |
79 | } | 69 | } |
80 | 70 | ||
81 | void TransferServer::authorizeConnections() | 71 | void TransferServer::authorizeConnections() |
82 | { | 72 | { |
83 | QListIterator<ServerPI> it(connections); | 73 | QListIterator<ServerPI> it(connections); |
84 | while ( it.current() ) { | 74 | while ( it.current() ) { |