From ac707e366de561cabc8074b62025d143200869d7 Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 12 Jun 2002 16:37:52 +0000 Subject: OBEX time --- (limited to 'core/applets/obex/obeximpl.cc') diff --git a/core/applets/obex/obeximpl.cc b/core/applets/obex/obeximpl.cc index a3004ab..fa2a30a 100644 --- a/core/applets/obex/obeximpl.cc +++ b/core/applets/obex/obeximpl.cc @@ -1,16 +1,21 @@ +#include +#include #include "obex.h" #include "obeximpl.h" + + using namespace OpieObex; ObexImpl::ObexImpl( ) - : QObject { + : QObject() { // register to a channel + qWarning( "c'tor" ); m_obex = new Obex(this, "obex"); m_chan = new QCopChannel("QPE/Obex" ); - cconnect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ), + connect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ), this, SLOT(slotMessage(const QCString&, const QByteArray&) ) ); } ObexImpl::~ObexImpl() { @@ -19,32 +24,34 @@ ObexImpl::~ObexImpl() { } QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; - if( uuid == IID_QUknown ) + if( uuid == IID_QUnknown ) *iface = this; else if( uuid == IID_ObexInterface ) *iface = this; + qWarning("query" ); if(*iface ) (*iface)->addRef(); return QS_OK; } void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) { - QDataStrean stream( data, IO_ReadOnly ); + QDataStream stream( data, IO_ReadOnly ); + qWarning("Message %s", msg.data() ); if(msg == "send(QString,QString,QString)" ) { QString desc; stream >> desc; QString filename; stream >> filename; m_obex->send(filename ); - QCopEnvelope e ("QPE/Obex", "done(QString)" ): - e << filename; - }else if( ) { - + QCopEnvelope e ("QPE/Obex", "done(QString)" ); + e << filename; + }else if(msg == "receive(bool)" ) { + ; } } Q_EXPORT_INTERFACE() { - Q_CREATE_INSTANCE( IrdaAppletImpl ) + Q_CREATE_INSTANCE( ObexImpl ) } -- cgit v0.9.0.2