-rw-r--r-- | core/obex/obex.cc | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/core/obex/obex.cc b/core/obex/obex.cc index 2a306de..50e5201 100644 --- a/core/obex/obex.cc +++ b/core/obex/obex.cc | |||
@@ -1,55 +1,51 @@ | |||
1 | 1 | ||
2 | #include <qapplication.h> | ||
3 | #include <qfile.h> | ||
4 | #include <qfileinfo.h> | 2 | #include <qfileinfo.h> |
5 | #include <qtextcodec.h> | ||
6 | 3 | ||
7 | #include <qpe/qcopenvelope_qws.h> | ||
8 | 4 | ||
9 | #include <opie/oprocess.h> | 5 | #include <opie/oprocess.h> |
10 | #include "obex.h" | 6 | #include "obex.h" |
11 | 7 | ||
12 | using namespace OpieObex; | 8 | using namespace OpieObex; |
13 | 9 | ||
14 | /* TRANSLATOR OpieObex::Obex */ | 10 | /* TRANSLATOR OpieObex::Obex */ |
15 | 11 | ||
16 | Obex::Obex( QObject *parent, const char* name ) | 12 | Obex::Obex( QObject *parent, const char* name ) |
17 | : QObject(parent, name ) | 13 | : QObject(parent, name ) |
18 | { | 14 | { |
19 | m_rec = 0; | 15 | m_rec = 0; |
20 | m_send=0; | 16 | m_send=0; |
21 | m_count = 0; | 17 | m_count = 0; |
22 | m_receive = false; | 18 | m_receive = false; |
23 | connect( this, SIGNAL(error(int) ), // for recovering to receive | 19 | connect( this, SIGNAL(error(int) ), // for recovering to receive |
24 | SLOT(slotError() ) ); | 20 | SLOT(slotError() ) ); |
25 | connect( this, SIGNAL(sent(bool) ), | 21 | connect( this, SIGNAL(sent(bool) ), |
26 | SLOT(slotError() ) ); | 22 | SLOT(slotError() ) ); |
27 | }; | 23 | }; |
28 | Obex::~Obex() { | 24 | Obex::~Obex() { |
29 | delete m_rec; | 25 | delete m_rec; |
30 | delete m_send; | 26 | delete m_send; |
31 | } | 27 | } |
32 | void Obex::receive() { | 28 | void Obex::receive() { |
33 | m_receive = true; | 29 | m_receive = true; |
34 | m_outp = QString::null; | 30 | m_outp = QString::null; |
35 | qWarning("Receive" ); | 31 | qWarning("Receive" ); |
36 | m_rec = new OProcess(); | 32 | m_rec = new OProcess(); |
37 | *m_rec << "irobex_palm3"; | 33 | *m_rec << "irobex_palm3"; |
38 | // connect to the necessary slots | 34 | // connect to the necessary slots |
39 | connect(m_rec, SIGNAL(processExited(OProcess*) ), | 35 | connect(m_rec, SIGNAL(processExited(OProcess*) ), |
40 | this, SLOT(slotExited(OProcess*) ) ); | 36 | this, SLOT(slotExited(OProcess*) ) ); |
41 | 37 | ||
42 | connect(m_rec, SIGNAL(receivedStdout(OProcess*, char*, int ) ), | 38 | connect(m_rec, SIGNAL(receivedStdout(OProcess*, char*, int ) ), |
43 | this, SLOT(slotStdOut(OProcess*, char*, int) ) ); | 39 | this, SLOT(slotStdOut(OProcess*, char*, int) ) ); |
44 | 40 | ||
45 | if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { | 41 | if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
46 | qWarning("could not start :("); | 42 | qWarning("could not start :("); |
47 | emit done( false ); | 43 | emit done( false ); |
48 | delete m_rec; | 44 | delete m_rec; |
49 | m_rec = 0; | 45 | m_rec = 0; |
50 | } | 46 | } |
51 | // emit currentTry(m_count ); | 47 | // emit currentTry(m_count ); |
52 | 48 | ||
53 | } | 49 | } |
54 | void Obex::send( const QString& fileName) { // if currently receiving stop it send receive | 50 | void Obex::send( const QString& fileName) { // if currently receiving stop it send receive |
55 | m_count = 0; | 51 | m_count = 0; |