-rw-r--r-- | core/obex/obex.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/obex/obex.cpp b/core/obex/obex.cpp index 95c561a..e4a3c31 100644 --- a/core/obex/obex.cpp +++ b/core/obex/obex.cpp | |||
@@ -36,50 +36,49 @@ | |||
36 | #include <opie2/odebug.h> | 36 | #include <opie2/odebug.h> |
37 | 37 | ||
38 | /* QT */ | 38 | /* QT */ |
39 | #include <qfileinfo.h> | 39 | #include <qfileinfo.h> |
40 | 40 | ||
41 | 41 | ||
42 | 42 | ||
43 | using namespace OpieObex; | 43 | using namespace OpieObex; |
44 | 44 | ||
45 | using namespace Opie::Core; | 45 | using namespace Opie::Core; |
46 | /* TRANSLATOR OpieObex::Obex */ | 46 | /* TRANSLATOR OpieObex::Obex */ |
47 | 47 | ||
48 | Obex::Obex( QObject *parent, const char* name ) | 48 | Obex::Obex( QObject *parent, const char* name ) |
49 | : ObexBase(parent, name ) | 49 | : ObexBase(parent, name ) |
50 | { | 50 | { |
51 | m_rec = 0; | 51 | m_rec = 0; |
52 | m_send=0; | 52 | m_send=0; |
53 | }; | 53 | }; |
54 | Obex::~Obex() { | 54 | Obex::~Obex() { |
55 | delete m_rec; | 55 | delete m_rec; |
56 | delete m_send; | 56 | delete m_send; |
57 | } | 57 | } |
58 | void Obex::receive() { | 58 | void Obex::receive() { |
59 | ObexBase::receive(); | 59 | ObexBase::receive(); |
60 | m_rec = new OProcess(); | 60 | m_rec = new ObexServer(OBEX_TRANS_IRDA); |
61 | *m_rec << "irobex_palm3"; | ||
62 | // connect to the necessary slots | 61 | // connect to the necessary slots |
63 | connect(m_rec, SIGNAL(processExited(Opie::Core::OProcess*) ), | 62 | connect(m_rec, SIGNAL(processExited(Opie::Core::OProcess*) ), |
64 | this, SLOT(slotExited(Opie::Core::OProcess*) ) ); | 63 | this, SLOT(slotExited(Opie::Core::OProcess*) ) ); |
65 | 64 | ||
66 | connect(m_rec, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ), | 65 | connect(m_rec, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ), |
67 | this, SLOT(slotStdOut(Opie::Core::OProcess*, char*, int) ) ); | 66 | this, SLOT(slotStdOut(Opie::Core::OProcess*, char*, int) ) ); |
68 | 67 | ||
69 | if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { | 68 | if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
70 | emit done( false ); | 69 | emit done( false ); |
71 | delete m_rec; | 70 | delete m_rec; |
72 | m_rec = 0; | 71 | m_rec = 0; |
73 | } | 72 | } |
74 | } | 73 | } |
75 | 74 | ||
76 | // if currently receiving stop it send receive | 75 | // if currently receiving stop it send receive |
77 | void Obex::send(const QString& fileName, const QString& addr) { | 76 | void Obex::send(const QString& fileName, const QString& addr) { |
78 | ObexBase::send(fileName, addr); | 77 | ObexBase::send(fileName, addr); |
79 | if (m_rec != 0 ) { | 78 | if (m_rec != 0 ) { |
80 | if (m_rec->isRunning() ) { | 79 | if (m_rec->isRunning() ) { |
81 | emit error(-1 ); | 80 | emit error(-1 ); |
82 | delete m_rec; | 81 | delete m_rec; |
83 | m_rec = 0; | 82 | m_rec = 0; |
84 | 83 | ||
85 | }else{ | 84 | }else{ |