author | zecke <zecke> | 2002-10-15 21:38:43 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-15 21:38:43 (UTC) |
commit | b774e015816e51ac65e5d1c685306f8404a3a19e (patch) (side-by-side diff) | |
tree | ccb4881ffce2a027b6c0b95854623bb713b69554 /x11/libqpe-x11/qt/qcopchannel_qws.cpp | |
parent | fb99aec5215da635abfa28288d170f110114bba3 (diff) | |
download | opie-b774e015816e51ac65e5d1c685306f8404a3a19e.zip opie-b774e015816e51ac65e5d1c685306f8404a3a19e.tar.gz opie-b774e015816e51ac65e5d1c685306f8404a3a19e.tar.bz2 |
More OPIE X11 Stuff
Some empty stubs to compile against Qt2/X
it will not link though
Diffstat (limited to 'x11/libqpe-x11/qt/qcopchannel_qws.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | x11/libqpe-x11/qt/qcopchannel_qws.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/x11/libqpe-x11/qt/qcopchannel_qws.cpp b/x11/libqpe-x11/qt/qcopchannel_qws.cpp new file mode 100644 index 0000000..efbef3f --- a/dev/null +++ b/x11/libqpe-x11/qt/qcopchannel_qws.cpp @@ -0,0 +1,46 @@ + +#include "../ipc/client/ocopclient.h" + +#include <qcopchannel_qws.h> + +QCopChannel::QCopChannel( const QCString& channel, QObject* parent, + const char* name ) + : QObject( parent, name ),m_chan(channel) { + init(); +} +QCopChannel::~QCopChannel() { + m_client->delChannel( m_chan ); + delete m_client; +} +void QCopChannel::init() { + m_client = new OCOPClient(QString::null, this ); + m_client->addChannel(m_chan ); + connect(m_client, SIGNAL(called(const QCString&, const QCString&, const QByteArray& ) ), + this, SLOT(rev(const QCString&, const QCString&, const QByteArray&) ) ); +} +QCString QCopChannel::channel()const { + return m_chan; +} +bool QCopChannel::isRegistered( const QCString& chan) { + OCOPClient client; + return client.isRegistered( chan ); +} +bool QCopChannel::send( const QCString& chan, const QCString& msg ) { + QByteArray ar(0); + return return sendLocally(chan, msg, ar ); +} +bool QCString::send( const QCString& chan, const QCString& msg, + const QByteArray& ar ) { + return sendLocally( chan, msg, ar ); +} +bool QCopChannel::sendLocally( const QCString& chan, const QCString& msg, + const QByteArray& ar ) { + OCOPClient client; + client.send( chan, msg, ar ); + + return true; +} +void QCopChannel::rev( const QCString& chan, const QCString& msg, const QByteArray& ar ) { + if (chan == m_chan ) + emit received(chan, msg, ar ); +} |