summaryrefslogtreecommitdiff
path: root/core/launcher/qcopbridge.h
Unidiff
Diffstat (limited to 'core/launcher/qcopbridge.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/qcopbridge.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/launcher/qcopbridge.h b/core/launcher/qcopbridge.h
index bae3f88..9483d9d 100644
--- a/core/launcher/qcopbridge.h
+++ b/core/launcher/qcopbridge.h
@@ -16,70 +16,73 @@
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#ifndef __qcopbridge_h__ 20#ifndef __qcopbridge_h__
21#define __qcopbridge_h__ 21#define __qcopbridge_h__
22 22
23#include <qtopia/global.h> 23#include <qtopia/global.h>
24#include <qserversocket.h> 24#include <qserversocket.h>
25#include <qsocket.h> 25#include <qsocket.h>
26#include <qdir.h> 26#include <qdir.h>
27#include <qfile.h> 27#include <qfile.h>
28#include <qbuffer.h> 28#include <qbuffer.h>
29 29
30class QFileInfo; 30class QFileInfo;
31class QCopBridgePI; 31class QCopBridgePI;
32class QCopChannel; 32class QCopChannel;
33class QTimer; 33class QTimer;
34 34
35class QCopBridge : public QServerSocket 35class QCopBridge : public QServerSocket
36{ 36{
37 Q_OBJECT 37 Q_OBJECT
38 38
39public: 39public:
40 enum Mode { Qtopia1_7= 0x01, Sharp = 0x02, Both = Qtopia1_7 | Sharp };
40 QCopBridge( Q_UINT16 port, QObject *parent = 0, const char* name = 0 ); 41 QCopBridge( Q_UINT16 port, QObject *parent = 0, const char* name = 0 );
41 virtual ~QCopBridge(); 42 virtual ~QCopBridge();
42 43
43 void newConnection( int socket ); 44 void newConnection( int socket );
44 void closeOpenConnections(); 45 void closeOpenConnections();
45 void authorizeConnections(); 46 void authorizeConnections();
46 47
47public slots: 48public slots:
48 void closed( QCopBridgePI *pi ); 49 void closed( QCopBridgePI *pi );
49 void desktopMessage( const QCString &call, const QByteArray & ); 50 void desktopMessage( const QCString &call, const QByteArray & );
50 51
51signals: 52signals:
52 void connectionClosed( const QHostAddress & ); 53 void connectionClosed( const QHostAddress & );
53 54
54protected: 55protected:
55 void timerEvent( QTimerEvent * ); 56 void timerEvent( QTimerEvent * );
57 void sendDesktopMessageOld( const QCString&, const QByteArray& );
56 58
57private: 59private:
58 QCopChannel *desktopChannel; 60 QCopChannel *desktopChannel;
59 QCopChannel *cardChannel; 61 QCopChannel *cardChannel;
60 QList<QCopBridgePI> openConnections; 62 QList<QCopBridgePI> openConnections;
61 bool sendSync; 63 bool sendSync;
64 Mode m_mode;
62}; 65};
63 66
64 67
65class QCopBridgePI : public QSocket 68class QCopBridgePI : public QSocket
66{ 69{
67 Q_OBJECT 70 Q_OBJECT
68 71
69 enum State { Connected, Wait_USER, Wait_PASS, Ready, Forbidden }; 72 enum State { Connected, Wait_USER, Wait_PASS, Ready, Forbidden };
70 73
71public: 74public:
72 QCopBridgePI( int socket, QObject *parent = 0, const char* name = 0 ); 75 QCopBridgePI( int socket, QObject *parent = 0, const char* name = 0 );
73 virtual ~QCopBridgePI(); 76 virtual ~QCopBridgePI();
74 77
75 void sendDesktopMessage( const QString &msg ); 78 void sendDesktopMessage( const QString &msg );
76 void sendDesktopMessage( const QCString &msg, const QByteArray& ); 79 void sendDesktopMessage( const QCString &msg, const QByteArray& );
77 void startSync() { sendSync = TRUE; } 80 void startSync() { sendSync = TRUE; }
78 bool verifyAuthorised(); 81 bool verifyAuthorised();
79 82
80signals: 83signals:
81 void connectionClosed( QCopBridgePI *); 84 void connectionClosed( QCopBridgePI *);
82 85
83protected slots: 86protected slots:
84 void read(); 87 void read();
85 void send( const QString& msg ); 88 void send( const QString& msg );