author | zecke <zecke> | 2002-06-12 16:37:52 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-12 16:37:52 (UTC) |
commit | ac707e366de561cabc8074b62025d143200869d7 (patch) (unidiff) | |
tree | ad30bac3657fde6e664e7784eb34873989e94699 /core/applets/obex/obeximpl.cc | |
parent | 9b87f7a2f2de6b5c1bad4f35f76fc7a0fd1ad021 (diff) | |
download | opie-ac707e366de561cabc8074b62025d143200869d7.zip opie-ac707e366de561cabc8074b62025d143200869d7.tar.gz opie-ac707e366de561cabc8074b62025d143200869d7.tar.bz2 |
OBEX time
Diffstat (limited to 'core/applets/obex/obeximpl.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/obex/obeximpl.cc | 25 |
1 files changed, 16 insertions, 9 deletions
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 @@ | |||
1 | 1 | ||
2 | #include <qdatastream.h> | ||
3 | #include <qpe/qcom.h> | ||
2 | 4 | ||
3 | #include "obex.h" | 5 | #include "obex.h" |
4 | #include "obeximpl.h" | 6 | #include "obeximpl.h" |
5 | 7 | ||
8 | |||
9 | |||
6 | using namespace OpieObex; | 10 | using namespace OpieObex; |
7 | 11 | ||
8 | ObexImpl::ObexImpl( ) | 12 | ObexImpl::ObexImpl( ) |
9 | : QObject { | 13 | : QObject() { |
10 | // register to a channel | 14 | // register to a channel |
15 | qWarning( "c'tor" ); | ||
11 | m_obex = new Obex(this, "obex"); | 16 | m_obex = new Obex(this, "obex"); |
12 | m_chan = new QCopChannel("QPE/Obex" ); | 17 | m_chan = new QCopChannel("QPE/Obex" ); |
13 | cconnect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ), | 18 | connect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ), |
14 | this, SLOT(slotMessage(const QCString&, const QByteArray&) ) ); | 19 | this, SLOT(slotMessage(const QCString&, const QByteArray&) ) ); |
15 | } | 20 | } |
16 | ObexImpl::~ObexImpl() { | 21 | ObexImpl::~ObexImpl() { |
@@ -19,32 +24,34 @@ ObexImpl::~ObexImpl() { | |||
19 | } | 24 | } |
20 | QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { | 25 | QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { |
21 | *iface = 0; | 26 | *iface = 0; |
22 | if( uuid == IID_QUknown ) | 27 | if( uuid == IID_QUnknown ) |
23 | *iface = this; | 28 | *iface = this; |
24 | else if( uuid == IID_ObexInterface ) | 29 | else if( uuid == IID_ObexInterface ) |
25 | *iface = this; | 30 | *iface = this; |
26 | 31 | ||
32 | qWarning("query" ); | ||
27 | if(*iface ) | 33 | if(*iface ) |
28 | (*iface)->addRef(); | 34 | (*iface)->addRef(); |
29 | return QS_OK; | 35 | return QS_OK; |
30 | 36 | ||
31 | } | 37 | } |
32 | void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) { | 38 | void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) { |
33 | QDataStrean stream( data, IO_ReadOnly ); | 39 | QDataStream stream( data, IO_ReadOnly ); |
40 | qWarning("Message %s", msg.data() ); | ||
34 | if(msg == "send(QString,QString,QString)" ) { | 41 | if(msg == "send(QString,QString,QString)" ) { |
35 | QString desc; | 42 | QString desc; |
36 | stream >> desc; | 43 | stream >> desc; |
37 | QString filename; | 44 | QString filename; |
38 | stream >> filename; | 45 | stream >> filename; |
39 | m_obex->send(filename ); | 46 | m_obex->send(filename ); |
40 | QCopEnvelope e ("QPE/Obex", "done(QString)" ): | 47 | QCopEnvelope e ("QPE/Obex", "done(QString)" ); |
41 | e << filename; | 48 | e << filename; |
42 | }else if( ) { | 49 | }else if(msg == "receive(bool)" ) { |
43 | 50 | ; | |
44 | } | 51 | } |
45 | } | 52 | } |
46 | 53 | ||
47 | Q_EXPORT_INTERFACE() | 54 | Q_EXPORT_INTERFACE() |
48 | { | 55 | { |
49 | Q_CREATE_INSTANCE( IrdaAppletImpl ) | 56 | Q_CREATE_INSTANCE( ObexImpl ) |
50 | } | 57 | } |