author | zecke <zecke> | 2003-03-14 08:23:21 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-03-14 08:23:21 (UTC) |
commit | 52c72efc3bcc6b57c6960b5da3393b57182b5ee6 (patch) (unidiff) | |
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 @@ | |||
1 | Files: plugins/obex/libopieobex.so* | 1 | Files: plugins/obex/libopieobex.so* pics/obex/* |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/system | 3 | Section: opie/system |
4 | Maintainer: Holger Freyther <zecke@handhelds.org> | 4 | Maintainer: hOlgar Freyther <zecke@handhelds.org> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: $QPE_VERSION-$SUB_VERSION.1 | 6 | Version: $QPE_VERSION-$SUB_VERSION.1 |
7 | Depends: opie-base ($QPE_VERSION), openobex | 7 | Depends: opie-base ($QPE_VERSION), openobex |
8 | Description: Irda obex lib | 8 | Description: Irda obex lib |
9 | \ No newline at end of file | 9 | |
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 @@ | |||
7 | #include "obexhandler.h" | 7 | #include "obexhandler.h" |
8 | 8 | ||
9 | using namespace OpieObex; | 9 | using namespace OpieObex; |
10 | 10 | ||
11 | ObexHandler::ObexHandler() { | 11 | ObexHandler::ObexHandler() { |
12 | m_wasRec = false; | 12 | m_wasRec = false; |
13 | m_sender = 0l; | 13 | m_sender = 0l; |
14 | m_receiver = 0l; | 14 | m_receiver = 0l; |
15 | QCopChannel* chan = new QCopChannel("QPE/Obex"); | 15 | QCopChannel* chan = new QCopChannel("QPE/Obex"); |
16 | connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), | 16 | connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), |
17 | this, SLOT(irdaMessage(const QCString&, const QByteArray& ) ) ); | 17 | this, SLOT(irdaMessage(const QCString&, const QByteArray& ) ) ); |
18 | } | 18 | } |
19 | ObexHandler::~ObexHandler() { | 19 | ObexHandler::~ObexHandler() { |
20 | delete m_sender; | 20 | delete m_sender; |
21 | delete m_receiver; | 21 | delete m_receiver; |
22 | } | 22 | } |
23 | void ObexHandler::doSend(const QString& str, const QString& desc) { | 23 | void ObexHandler::doSend(const QString& str, const QString& desc) { |
24 | delete m_sender; | 24 | delete m_sender; |
25 | m_sender = new SendWidget; | 25 | m_sender = new SendWidget; |
26 | m_sender->raise(); | 26 | m_sender->raise(); |
27 | m_sender->showMaximized(); | 27 | m_sender->showMaximized(); |
28 | connect(m_sender, SIGNAL(done() ), | 28 | connect(m_sender, SIGNAL(done() ), |
29 | this, SLOT(slotSent() ) ); | 29 | this, SLOT(slotSent() ) ); |
30 | m_sender->send( str, desc ); | 30 | m_sender->send( str, desc ); |
31 | } | 31 | } |
32 | void ObexHandler::doReceive(bool b) { | 32 | void ObexHandler::doReceive(bool b) { |
33 | if (m_receiver && b ) return; // we should enable receiver and it is on | 33 | if (m_receiver && b ) return; // we should enable receiver and it is on |
34 | else if (!m_receiver && !b ) return; // we should disbale receiver and it is off | 34 | else if (!m_receiver && !b ) return; // we should disbale receiver and it is off |
35 | else if (m_receiver && !b ) { | 35 | else if (m_receiver && !b ) { |
36 | delete m_receiver; | 36 | delete m_receiver; |
37 | m_receiver=0; | 37 | m_receiver=0; |
38 | }else if (!m_receiver && b ) { | 38 | }else if (!m_receiver && b ) { |
39 | m_receiver= new Receiver; | 39 | m_receiver= new Receiver; |
40 | } | 40 | } |
41 | } | 41 | } |
42 | void ObexHandler::slotSent() { | 42 | void ObexHandler::slotSent() { |
43 | QString file = m_sender->file(); | 43 | QString file = m_sender->file(); |
44 | delete m_sender; | 44 | delete m_sender; |
45 | m_sender = 0; | 45 | m_sender = 0; |
46 | QCopEnvelope e ("QPE/Obex", "done(QString)" ); | 46 | QCopEnvelope e ("QPE/Obex", "done(QString)" ); |
47 | e << file; | 47 | e << file; |
48 | doReceive(m_wasRec ); | 48 | doReceive(m_wasRec ); |
49 | m_wasRec = false; | 49 | m_wasRec = false; |
50 | } | 50 | } |
51 | void ObexHandler::irdaMessage( const QCString& msg, const QByteArray& data) { | 51 | void ObexHandler::irdaMessage( const QCString& msg, const QByteArray& data) { |
52 | QDataStream stream( data, IO_ReadOnly ); | 52 | QDataStream stream( data, IO_ReadOnly ); |
53 | if ( msg == "send(QString,QString,QString)" ) { | 53 | if ( msg == "send(QString,QString,QString)" ) { |
54 | QString name, desc; | 54 | QString name, desc; |
55 | stream >> name; | ||
56 | stream >> desc; | 55 | stream >> desc; |
56 | stream >> name; | ||
57 | m_wasRec = (m_receiver != 0 ); | 57 | m_wasRec = (m_receiver != 0 ); |
58 | doReceive( false ); | 58 | doReceive( false ); |
59 | doSend(desc, name); | 59 | doSend(name, desc); |
60 | }else if (msg == "receive(int)") { | 60 | }else if (msg == "receive(int)") { |
61 | int rec; | 61 | int rec; |
62 | stream >> rec; | 62 | stream >> rec; |
63 | doReceive(rec); | 63 | doReceive(rec); |
64 | } | 64 | } |
65 | } | 65 | } |