summaryrefslogtreecommitdiff
path: root/core/applets/obex/obeximpl.cc
Unidiff
Diffstat (limited to 'core/applets/obex/obeximpl.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/obex/obeximpl.cc50
1 files changed, 50 insertions, 0 deletions
diff --git a/core/applets/obex/obeximpl.cc b/core/applets/obex/obeximpl.cc
new file mode 100644
index 0000000..a3004ab
--- a/dev/null
+++ b/core/applets/obex/obeximpl.cc
@@ -0,0 +1,50 @@
1
2
3#include "obex.h"
4#include "obeximpl.h"
5
6using namespace OpieObex;
7
8ObexImpl::ObexImpl( )
9 : QObject {
10 // register to a channel
11 m_obex = new Obex(this, "obex");
12 m_chan = new QCopChannel("QPE/Obex" );
13 cconnect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ),
14 this, SLOT(slotMessage(const QCString&, const QByteArray&) ) );
15}
16ObexImpl::~ObexImpl() {
17 delete m_obex;
18 delete m_chan;
19}
20QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) {
21 *iface = 0;
22 if( uuid == IID_QUknown )
23 *iface = this;
24 else if( uuid == IID_ObexInterface )
25 *iface = this;
26
27 if(*iface )
28 (*iface)->addRef();
29 return QS_OK;
30
31}
32void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) {
33 QDataStrean stream( data, IO_ReadOnly );
34 if(msg == "send(QString,QString,QString)" ) {
35 QString desc;
36 stream >> desc;
37 QString filename;
38 stream >> filename;
39 m_obex->send(filename );
40 QCopEnvelope e ("QPE/Obex", "done(QString)" ):
41 e << filename;
42 }else if( ) {
43
44 }
45}
46
47Q_EXPORT_INTERFACE()
48{
49 Q_CREATE_INSTANCE( IrdaAppletImpl )
50}