-rw-r--r-- | core/qws/qcopbridge.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/core/qws/qcopbridge.cpp b/core/qws/qcopbridge.cpp index 6177a7c..c0c52e8 100644 --- a/core/qws/qcopbridge.cpp +++ b/core/qws/qcopbridge.cpp | |||
@@ -1,66 +1,60 @@ | |||
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 | 20 | ||
21 | #include "qcopbridge.h" | 21 | #include "qcopbridge.h" |
22 | #include "transferserver.h" | 22 | #include "transferserver.h" |
23 | 23 | ||
24 | #include <qpe/qcopenvelope_qws.h> | 24 | #include <qpe/qcopenvelope_qws.h> |
25 | #include <qpe/qpeapplication.h> | 25 | #include <qpe/qpeapplication.h> |
26 | #include <qpe/version.h> | 26 | #include <qpe/version.h> |
27 | 27 | ||
28 | #include <qdir.h> | ||
29 | #include <qfile.h> | ||
30 | #include <qtextstream.h> | 28 | #include <qtextstream.h> |
31 | #include <qdatastream.h> | ||
32 | #include <qstringlist.h> | ||
33 | #include <qfileinfo.h> | ||
34 | #include <qregexp.h> | ||
35 | #ifdef QWS | 29 | #ifdef QWS |
36 | #include <qcopchannel_qws.h> | 30 | #include <qcopchannel_qws.h> |
37 | #endif | 31 | #endif |
38 | 32 | ||
39 | #define _XOPEN_SOURCE | 33 | #define _XOPEN_SOURCE |
40 | #include <pwd.h> | 34 | #include <pwd.h> |
41 | #include <sys/types.h> | 35 | #include <sys/types.h> |
42 | #include <unistd.h> | 36 | #include <unistd.h> |
43 | 37 | ||
44 | #if defined(_OS_LINUX_) | 38 | #if defined(_OS_LINUX_) |
45 | #include <shadow.h> | 39 | #include <shadow.h> |
46 | #endif | 40 | #endif |
47 | 41 | ||
48 | //#define INSECURE | 42 | //#define INSECURE |
49 | 43 | ||
50 | const int block_size = 51200; | 44 | const int block_size = 51200; |
51 | 45 | ||
52 | QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent , | 46 | QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent , |
53 | const char* name ) | 47 | const char* name ) |
54 | : QServerSocket( port, 1, parent, name ), | 48 | : QServerSocket( port, 1, parent, name ), |
55 | desktopChannel( 0 ), | 49 | desktopChannel( 0 ), |
56 | cardChannel( 0 ) | 50 | cardChannel( 0 ) |
57 | { | 51 | { |
58 | if ( !ok() ) | 52 | if ( !ok() ) |
59 | qWarning( "Failed to bind to port %d", port ); | 53 | qWarning( "Failed to bind to port %d", port ); |
60 | else { | 54 | else { |
61 | #ifndef QT_NO_COP | 55 | #ifndef QT_NO_COP |
62 | desktopChannel = new QCopChannel( "QPE/Desktop", this ); | 56 | desktopChannel = new QCopChannel( "QPE/Desktop", this ); |
63 | connect( desktopChannel, SIGNAL(received(const QCString &, const QByteArray &)), | 57 | connect( desktopChannel, SIGNAL(received(const QCString &, const QByteArray &)), |
64 | this, SLOT(desktopMessage( const QCString &, const QByteArray &)) ); | 58 | this, SLOT(desktopMessage( const QCString &, const QByteArray &)) ); |
65 | cardChannel = new QCopChannel( "QPE/Card", this ); | 59 | cardChannel = new QCopChannel( "QPE/Card", this ); |
66 | connect( cardChannel, SIGNAL(received(const QCString &, const QByteArray &)), | 60 | connect( cardChannel, SIGNAL(received(const QCString &, const QByteArray &)), |