author | zecke <zecke> | 2003-03-14 08:23:21 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-03-14 08:23:21 (UTC) |
commit | 52c72efc3bcc6b57c6960b5da3393b57182b5ee6 (patch) (side-by-side diff) | |
tree | 42bb8ed6f48484fd02912354a11086a51b3bd17c | |
parent | 7e04934c4b7b9f8ad0d74d2da1c7c1273d9fe1d4 (diff) | |
download | opie-52c72efc3bcc6b57c6960b5da3393b57182b5ee6.zip opie-52c72efc3bcc6b57c6960b5da3393b57182b5ee6.tar.gz opie-52c72efc3bcc6b57c6960b5da3393b57182b5ee6.tar.bz2 |
Unconfuse eilers about naming variables :)
I hate big gray squares in a TextView better include
pics/obex/* to the obex2 package...
-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 @@ -7,59 +7,59 @@ #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); } } |