author | zecke <zecke> | 2002-10-01 18:04:40 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-01 18:04:40 (UTC) |
commit | de95e9ad55685630512a8ee67d6e9214af1b1071 (patch) (side-by-side diff) | |
tree | a2f62044d8ba48aab1ca3f74376358f5aef352b3 /x11/ipc/client/ocopclient.h | |
parent | 1d9e6c252f74bfc8fcf6c80d8ce2a80cbd566d26 (diff) | |
download | opie-de95e9ad55685630512a8ee67d6e9214af1b1071.zip opie-de95e9ad55685630512a8ee67d6e9214af1b1071.tar.gz opie-de95e9ad55685630512a8ee67d6e9214af1b1071.tar.bz2 |
The client should be working
it's complete but I never compiled it
-rw-r--r-- | x11/ipc/client/ocopclient.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/x11/ipc/client/ocopclient.h b/x11/ipc/client/ocopclient.h new file mode 100644 index 0000000..5300132 --- a/dev/null +++ b/x11/ipc/client/ocopclient.h @@ -0,0 +1,56 @@ +#ifndef OPIE_OCOP_CLIENT_H +#define OPIE_OCOP_CLIENT_H + + +#include <qobject.h> +#include <qcstring.h> +#include <qmap.h> +#include <qsignal.h> +#include <qstring.h> +#include <qsocketnotifier.h> + + +/** + * This is the OCOP client + * It currently only supports + * asking if a Channel is registered, + * calling and receiving calls + */ +class OCOPPacket; +class OCOPClient : public QObject{ + Q_OBJECT +public: + + /** + * Occasionally I decide to start a Server from here + */ + OCOPClient(const QString& pathToServer = QString::null, QObject* obj = 0l); + ~OCOPClient(); + + bool isRegistered( const QCString& )const; + void send( const QCString& chan, const QCString&, const QByteArray& msg ); + + /** + * add a channel and does connect to a signal + * callback is the object + * slot is the SLOT() + */ + void addChannel( const QCString& channel ); + void delChannel( const QCString& channel ); +/* no direct signals due the design */ +signals: + void called(const QCString&, const QCString&, const QByteArray ); +private slots: + void init(const QCString& pa); + void newData(); +private: + OCOPPacket packet(); + void call( const OCOPPacket& ); + + QSocketNotifier* m_notify; + int m_socket; +private slots: + +}; + +#endif |