-rw-r--r-- | core/launcher/qcopbridge.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/core/launcher/qcopbridge.h b/core/launcher/qcopbridge.h index 408d10d..bae3f88 100644 --- a/core/launcher/qcopbridge.h +++ b/core/launcher/qcopbridge.h | |||
@@ -20,6 +20,7 @@ | |||
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 <qserversocket.h> | 24 | #include <qserversocket.h> |
24 | #include <qsocket.h> | 25 | #include <qsocket.h> |
25 | #include <qdir.h> | 26 | #include <qdir.h> |
@@ -29,6 +30,7 @@ | |||
29 | class QFileInfo; | 30 | class QFileInfo; |
30 | class QCopBridgePI; | 31 | class QCopBridgePI; |
31 | class QCopChannel; | 32 | class QCopChannel; |
33 | class QTimer; | ||
32 | 34 | ||
33 | class QCopBridge : public QServerSocket | 35 | class QCopBridge : public QServerSocket |
34 | { | 36 | { |
@@ -40,14 +42,18 @@ public: | |||
40 | 42 | ||
41 | void newConnection( int socket ); | 43 | void newConnection( int socket ); |
42 | void closeOpenConnections(); | 44 | void closeOpenConnections(); |
45 | void authorizeConnections(); | ||
43 | 46 | ||
44 | public slots: | 47 | public slots: |
45 | void connectionClosed( QCopBridgePI *pi ); | 48 | void closed( QCopBridgePI *pi ); |
46 | void desktopMessage( const QCString &call, const QByteArray & ); | 49 | void desktopMessage( const QCString &call, const QByteArray & ); |
47 | 50 | ||
51 | signals: | ||
52 | void connectionClosed( const QHostAddress & ); | ||
53 | |||
48 | protected: | 54 | protected: |
49 | void timerEvent( QTimerEvent * ); | 55 | void timerEvent( QTimerEvent * ); |
50 | 56 | ||
51 | private: | 57 | private: |
52 | QCopChannel *desktopChannel; | 58 | QCopChannel *desktopChannel; |
53 | QCopChannel *cardChannel; | 59 | QCopChannel *cardChannel; |
@@ -67,26 +73,25 @@ public: | |||
67 | virtual ~QCopBridgePI(); | 73 | virtual ~QCopBridgePI(); |
68 | 74 | ||
69 | void sendDesktopMessage( const QString &msg ); | 75 | void sendDesktopMessage( const QString &msg ); |
76 | void sendDesktopMessage( const QCString &msg, const QByteArray& ); | ||
70 | void startSync() { sendSync = TRUE; } | 77 | void startSync() { sendSync = TRUE; } |
71 | 78 | bool verifyAuthorised(); | |
79 | |||
72 | signals: | 80 | signals: |
73 | void connectionClosed( QCopBridgePI *); | 81 | void connectionClosed( QCopBridgePI *); |
74 | 82 | ||
75 | protected slots: | 83 | protected slots: |
76 | void read(); | 84 | void read(); |
77 | void send( const QString& msg ); | 85 | void send( const QString& msg ); |
78 | void process( const QString& command ); | 86 | void process( const QString& command ); |
79 | void connectionClosed(); | 87 | void myConnectionClosed(); |
80 | |||
81 | protected: | ||
82 | void timerEvent( QTimerEvent *e ); | ||
83 | 88 | ||
84 | private: | 89 | private: |
85 | State state; | 90 | State state; |
86 | Q_UINT16 peerport; | 91 | Q_UINT16 peerport; |
87 | QHostAddress peeraddress; | 92 | QHostAddress peeraddress; |
88 | bool connected; | ||
89 | bool sendSync; | 93 | bool sendSync; |
94 | QTimer *timer; | ||
90 | }; | 95 | }; |
91 | 96 | ||
92 | #endif | 97 | #endif |