author | zecke <zecke> | 2003-09-19 16:45:45 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-09-19 16:45:45 (UTC) |
commit | 0468cfef459d613ae0a32a3fa03e67726d19f6e9 (patch) (unidiff) | |
tree | a9c3a751f206b97e8eee6046057eba8d92a22d1d /core/launcher/qcopbridge.h | |
parent | 42a5104340694255dc514514e7621ac2cee026fe (diff) | |
download | opie-0468cfef459d613ae0a32a3fa03e67726d19f6e9.zip opie-0468cfef459d613ae0a32a3fa03e67726d19f6e9.tar.gz opie-0468cfef459d613ae0a32a3fa03e67726d19f6e9.tar.bz2 |
Either be compatible with Sharp( IntelliSync, KitchenSync, QtopiaDesktop)
or with the newer QtopiaDesktop or with both
-rw-r--r-- | core/launcher/qcopbridge.h | 3 |
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 | ||
30 | class QFileInfo; | 30 | class QFileInfo; |
31 | class QCopBridgePI; | 31 | class QCopBridgePI; |
32 | class QCopChannel; | 32 | class QCopChannel; |
33 | class QTimer; | 33 | class QTimer; |
34 | 34 | ||
35 | class QCopBridge : public QServerSocket | 35 | class QCopBridge : public QServerSocket |
36 | { | 36 | { |
37 | Q_OBJECT | 37 | Q_OBJECT |
38 | 38 | ||
39 | public: | 39 | public: |
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 | ||
47 | public slots: | 48 | public 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 | ||
51 | signals: | 52 | signals: |
52 | void connectionClosed( const QHostAddress & ); | 53 | void connectionClosed( const QHostAddress & ); |
53 | 54 | ||
54 | protected: | 55 | protected: |
55 | void timerEvent( QTimerEvent * ); | 56 | void timerEvent( QTimerEvent * ); |
57 | void sendDesktopMessageOld( const QCString&, const QByteArray& ); | ||
56 | 58 | ||
57 | private: | 59 | private: |
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 | ||
65 | class QCopBridgePI : public QSocket | 68 | class 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 | ||
71 | public: | 74 | public: |
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 | ||
80 | signals: | 83 | signals: |
81 | void connectionClosed( QCopBridgePI *); | 84 | void connectionClosed( QCopBridgePI *); |
82 | 85 | ||
83 | protected slots: | 86 | protected slots: |
84 | void read(); | 87 | void read(); |
85 | void send( const QString& msg ); | 88 | void send( const QString& msg ); |