-rw-r--r-- | core/obex/obex.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/obex/obex.cc b/core/obex/obex.cc index 92cd317..b8ed6e0 100644 --- a/core/obex/obex.cc +++ b/core/obex/obex.cc | |||
@@ -8,25 +8,25 @@ | |||
8 | 8 | ||
9 | using namespace OpieObex; | 9 | using namespace OpieObex; |
10 | 10 | ||
11 | Obex::Obex( QObject *parent, const char* name ) | 11 | Obex::Obex( QObject *parent, const char* name ) |
12 | : QObject(parent, name ) | 12 | : QObject(parent, name ) |
13 | { | 13 | { |
14 | m_rec = 0; | 14 | m_rec = 0; |
15 | m_send=0; | 15 | m_send=0; |
16 | m_count = 0; | 16 | m_count = 0; |
17 | m_receive = false; | 17 | m_receive = false; |
18 | connect( this, SIGNAL(error(int) ), // for recovering to receive | 18 | connect( this, SIGNAL(error(int) ), // for recovering to receive |
19 | SLOT(slotError() ) ); | 19 | SLOT(slotError() ) ); |
20 | connect( this, SIGNAL(sent() ), | 20 | connect( this, SIGNAL(sent(bool) ), |
21 | SLOT(slotError() ) ); | 21 | SLOT(slotError() ) ); |
22 | }; | 22 | }; |
23 | Obex::~Obex() { | 23 | Obex::~Obex() { |
24 | delete m_rec; | 24 | delete m_rec; |
25 | delete m_send; | 25 | delete m_send; |
26 | } | 26 | } |
27 | void Obex::receive() { | 27 | void Obex::receive() { |
28 | m_receive = true; | 28 | m_receive = true; |
29 | m_outp = QString::null; | 29 | m_outp = QString::null; |
30 | qWarning("Receive" ); | 30 | qWarning("Receive" ); |
31 | m_rec = new OProcess(); | 31 | m_rec = new OProcess(); |
32 | *m_rec << "irobex_palm3"; | 32 | *m_rec << "irobex_palm3"; |
@@ -97,34 +97,34 @@ void Obex::sendNow(){ | |||
97 | emit currentTry( m_count ); | 97 | emit currentTry( m_count ); |
98 | } | 98 | } |
99 | 99 | ||
100 | void Obex::slotExited(OProcess* proc ){ | 100 | void Obex::slotExited(OProcess* proc ){ |
101 | if (proc == m_rec ) { // receive process | 101 | if (proc == m_rec ) { // receive process |
102 | received(); | 102 | received(); |
103 | }else if ( proc == m_send ) { | 103 | }else if ( proc == m_send ) { |
104 | sendEnd(); | 104 | sendEnd(); |
105 | } | 105 | } |
106 | } | 106 | } |
107 | void Obex::slotStdOut(OProcess* proc, char* buf, int len){ | 107 | void Obex::slotStdOut(OProcess* proc, char* buf, int len){ |
108 | if ( proc == m_rec ) { // only receive | 108 | if ( proc == m_rec ) { // only receive |
109 | QCString cstring( buf, len ); | 109 | QString str = QString::fromUtf8( buf, len ); |
110 | m_outp.append( cstring.data() ); | 110 | m_outp.append( str ); |
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | void Obex::received() { | 114 | void Obex::received() { |
115 | if (m_rec->normalExit() ) { | 115 | if (m_rec->normalExit() ) { |
116 | if ( m_rec->exitStatus() == 0 ) { // we got one | 116 | if ( m_rec->exitStatus() == 0 ) { // we got one |
117 | QString filename = parseOut(); | 117 | QString filename = parseOut(); |
118 | qWarning("ACHTUNG"); | 118 | qWarning("ACHTUNG %s", filename.latin1() ); |
119 | emit receivedFile( filename ); | 119 | emit receivedFile( filename ); |
120 | } | 120 | } |
121 | }else{ | 121 | }else{ |
122 | emit done(false); | 122 | emit done(false); |
123 | }; | 123 | }; |
124 | delete m_rec; | 124 | delete m_rec; |
125 | m_rec = 0; | 125 | m_rec = 0; |
126 | receive(); | 126 | receive(); |
127 | } | 127 | } |
128 | 128 | ||
129 | void Obex::sendEnd() { | 129 | void Obex::sendEnd() { |
130 | if (m_send->normalExit() ) { | 130 | if (m_send->normalExit() ) { |