-rw-r--r-- | core/obex/libopieobex0.control | 6 | ||||
-rw-r--r-- | core/obex/obexhandler.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/core/obex/libopieobex0.control b/core/obex/libopieobex0.control index d74b51c..6df9f36 100644 --- a/core/obex/libopieobex0.control +++ b/core/obex/libopieobex0.control @@ -1,9 +1,9 @@ -Files: plugins/obex/libopieobex.so* +Files: plugins/obex/libopieobex.so* pics/obex/* Priority: optional Section: opie/system -Maintainer: Holger Freyther <zecke@handhelds.org> +Maintainer: hOlgar Freyther <zecke@handhelds.org> Architecture: arm Version: $QPE_VERSION-$SUB_VERSION.1 Depends: opie-base ($QPE_VERSION), openobex Description: Irda obex lib -
\ No newline at end of file + diff --git a/core/obex/obexhandler.cpp b/core/obex/obexhandler.cpp index 16e1c2f..6509d12 100644 --- a/core/obex/obexhandler.cpp +++ b/core/obex/obexhandler.cpp @@ -1,65 +1,65 @@ #include <qcopchannel_qws.h> #include <qpe/qcopenvelope_qws.h> #include "obexsend.h" #include "receiver.h" #include "obexhandler.h" using namespace OpieObex; ObexHandler::ObexHandler() { m_wasRec = false; m_sender = 0l; m_receiver = 0l; QCopChannel* chan = new QCopChannel("QPE/Obex"); connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), this, SLOT(irdaMessage(const QCString&, const QByteArray& ) ) ); } ObexHandler::~ObexHandler() { delete m_sender; delete m_receiver; } void ObexHandler::doSend(const QString& str, const QString& desc) { delete m_sender; m_sender = new SendWidget; m_sender->raise(); m_sender->showMaximized(); connect(m_sender, SIGNAL(done() ), this, SLOT(slotSent() ) ); m_sender->send( str, desc ); } void ObexHandler::doReceive(bool b) { if (m_receiver && b ) return; // we should enable receiver and it is on else if (!m_receiver && !b ) return; // we should disbale receiver and it is off else if (m_receiver && !b ) { delete m_receiver; m_receiver=0; }else if (!m_receiver && b ) { m_receiver= new Receiver; } } void ObexHandler::slotSent() { QString file = m_sender->file(); delete m_sender; m_sender = 0; QCopEnvelope e ("QPE/Obex", "done(QString)" ); e << file; doReceive(m_wasRec ); m_wasRec = false; } void ObexHandler::irdaMessage( const QCString& msg, const QByteArray& data) { QDataStream stream( data, IO_ReadOnly ); if ( msg == "send(QString,QString,QString)" ) { QString name, desc; - stream >> name; stream >> desc; + stream >> name; m_wasRec = (m_receiver != 0 ); doReceive( false ); - doSend(desc, name); + doSend(name, desc); }else if (msg == "receive(int)") { int rec; stream >> rec; doReceive(rec); } } |