-rw-r--r-- | core/applets/obex/obeximpl.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/applets/obex/obeximpl.cc b/core/applets/obex/obeximpl.cc index 82ff1a1..e787fca 100644 --- a/core/applets/obex/obeximpl.cc +++ b/core/applets/obex/obeximpl.cc | |||
@@ -1,58 +1,58 @@ | |||
1 | 1 | ||
2 | #include <qdatastream.h> | 2 | #include <qdatastream.h> |
3 | #include <qpe/qcom.h> | 3 | #include <qpe/qcom.h> |
4 | 4 | ||
5 | #include "obex.h" | 5 | #include "obex.h" |
6 | #include "obeximpl.h" | 6 | #include "obeximpl.h" |
7 | 7 | ||
8 | 8 | ||
9 | 9 | ||
10 | using namespace OpieObex; | 10 | using namespace OpieObex; |
11 | 11 | ||
12 | ObexImpl::ObexImpl( ) | 12 | ObexImpl::ObexImpl( ) |
13 | : QObject() { | 13 | : QObject() { |
14 | // register to a channel | 14 | // register to a channel |
15 | qWarning( "c'tor" ); | 15 | qWarning( "c'tor" ); |
16 | m_obex = new Obex(this, "obex"); | 16 | m_obex = new Obex(this, "obex"); |
17 | m_chan = new QCopChannel("QPE/Obex" ); | 17 | m_chan = new QCopChannel("QPE/Obex" ); |
18 | connect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ), | 18 | connect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ), |
19 | this, SLOT(slotMessage(const QCString&, const QByteArray&) ) ); | 19 | this, SLOT(slotMessage(const QCString&, const QByteArray&) ) ); |
20 | } | 20 | } |
21 | ObexImpl::~ObexImpl() { | 21 | ObexImpl::~ObexImpl() { |
22 | delete m_obex; | 22 | delete m_obex; |
23 | delete m_chan; | 23 | delete m_chan; |
24 | } | 24 | } |
25 | QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { | 25 | QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { |
26 | *iface = 0; | 26 | *iface = 0; |
27 | if( uuid == IID_QUnknown ) | 27 | if( uuid == IID_QUnknown ) |
28 | *iface = this; | 28 | *iface = this; |
29 | else if( uuid == IID_ObexInterface ) | 29 | else if( uuid == IID_ObexInterface ) |
30 | *iface = this; | 30 | *iface = this; |
31 | 31 | ||
32 | qWarning("query" ); | 32 | qWarning("query" ); |
33 | if(*iface ) | 33 | if(*iface ) |
34 | (*iface)->addRef(); | 34 | (*iface)->addRef(); |
35 | return QS_OK; | 35 | return QS_OK; |
36 | 36 | ||
37 | } | 37 | } |
38 | void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) { | 38 | void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) { |
39 | QDataStream stream( data, IO_ReadOnly ); | 39 | QDataStream stream( data, IO_ReadOnly ); |
40 | qWarning("Message %s", msg.data() ); | 40 | qWarning("Message %s", msg.data() ); |
41 | if(msg == "send(QString,QString,QString)" ) { | 41 | if(msg == "send(QString,QString,QString)" ) { |
42 | QString desc; | 42 | QString desc; |
43 | stream >> desc; | 43 | stream >> desc; |
44 | QString filename; | 44 | QString filename; |
45 | stream >> filename; | 45 | stream >> filename; |
46 | m_obex->send(filename ); | 46 | m_obex->send(filename ); |
47 | QCopEnvelope e ("QPE/Obex", "done(QString)" ); | 47 | // QCopEnvelope e ("QPE/Obex", "done(QString)" ); but this into a slot |
48 | e << filename; | 48 | //e << filename; |
49 | }else if(msg == "receive(bool)" ) { // open a GUI | 49 | }else if(msg == "receive(bool)" ) { // open a GUI |
50 | m_obex->receive(); | 50 | m_obex->receive(); |
51 | ; | 51 | ; |
52 | } | 52 | } |
53 | } | 53 | } |
54 | 54 | ||
55 | Q_EXPORT_INTERFACE() | 55 | Q_EXPORT_INTERFACE() |
56 | { | 56 | { |
57 | Q_CREATE_INSTANCE( ObexImpl ) | 57 | Q_CREATE_INSTANCE( ObexImpl ) |
58 | } | 58 | } |