author | zecke <zecke> | 2002-06-12 16:37:52 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-12 16:37:52 (UTC) |
commit | ac707e366de561cabc8074b62025d143200869d7 (patch) (unidiff) | |
tree | ad30bac3657fde6e664e7784eb34873989e94699 /core/applets/obex/obex.cc | |
parent | 9b87f7a2f2de6b5c1bad4f35f76fc7a0fd1ad021 (diff) | |
download | opie-ac707e366de561cabc8074b62025d143200869d7.zip opie-ac707e366de561cabc8074b62025d143200869d7.tar.gz opie-ac707e366de561cabc8074b62025d143200869d7.tar.bz2 |
OBEX time
-rw-r--r-- | core/applets/obex/obex.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/core/applets/obex/obex.cc b/core/applets/obex/obex.cc index f2ceff8..582ebbc 100644 --- a/core/applets/obex/obex.cc +++ b/core/applets/obex/obex.cc | |||
@@ -1,6 +1,6 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #include "kprocess.h" | 3 | #include <opie/oprocess.h> |
4 | #include "obex.h" | 4 | #include "obex.h" |
5 | 5 | ||
6 | using namespace OpieObex; | 6 | using namespace OpieObex; |
@@ -17,16 +17,16 @@ Obex::~Obex() { | |||
17 | delete m_send; | 17 | delete m_send; |
18 | } | 18 | } |
19 | void Obex::receive() { | 19 | void Obex::receive() { |
20 | m_rec = new KProcess(); | 20 | m_rec = new OProcess(); |
21 | *m_rec << "irobex_palm3"; | 21 | *m_rec << "irobex_palm3"; |
22 | // connect to the necessary slots | 22 | // connect to the necessary slots |
23 | connect(m_rec, SIGNAL(processExited(KProcess*) ), | 23 | connect(m_rec, SIGNAL(processExited(OProcess*) ), |
24 | this, SLOT(slotExited(KProcess*) ) ); | 24 | this, SLOT(slotExited(OProcess*) ) ); |
25 | 25 | ||
26 | connect(m_rec, SIGNAL(receivedStdout(KProcess*, char*, int ) ), | 26 | connect(m_rec, SIGNAL(receivedStdout(OProcess*, char*, int ) ), |
27 | this, SLOT(slotStdOut(KProcess*, char*, int) ) ); | 27 | this, SLOT(slotStdOut(OProcess*, char*, int) ) ); |
28 | 28 | ||
29 | if(!m_rec->start(KProcess::NotifyOnExit, KProcess::AllOutput) ) { | 29 | if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
30 | qWarning("could not start :("); | 30 | qWarning("could not start :("); |
31 | emit done( false ); | 31 | emit done( false ); |
32 | } | 32 | } |
@@ -42,18 +42,18 @@ void Obex::sendNow(){ | |||
42 | if ( m_count >= 15 ) { // could not send | 42 | if ( m_count >= 15 ) { // could not send |
43 | emit error(-1 ); | 43 | emit error(-1 ); |
44 | } | 44 | } |
45 | // KProcess inititialisation | 45 | // OProcess inititialisation |
46 | m_send = new KProcess(); | 46 | m_send = new OProcess(); |
47 | *m_send << "irobex_palm3"; | 47 | *m_send << "irobex_palm3"; |
48 | *m_send << m_file; | 48 | *m_send << m_file; |
49 | 49 | ||
50 | // connect to slots Exited and and StdOut | 50 | // connect to slots Exited and and StdOut |
51 | connect(m_send, SIGNAL(processExited(KProcess*) ), | 51 | connect(m_send, SIGNAL(processExited(OProcess*) ), |
52 | this, SLOT(slotExited(KProcess*)) ); | 52 | this, SLOT(slotExited(OProcess*)) ); |
53 | connect(m_send, SIGNAL(receivedStdout(KProcess*, char*, int )), | 53 | connect(m_send, SIGNAL(receivedStdout(OProcess*, char*, int )), |
54 | this, SLOT(slotStdOut(KProcess*, char*, int) ) ); | 54 | this, SLOT(slotStdOut(OProcess*, char*, int) ) ); |
55 | // now start it | 55 | // now start it |
56 | if (!m_send->start(/*KProcess::NotifyOnExit, KProcess::AllOutput*/ ) ) { | 56 | if (!m_send->start(/*OProcess::NotifyOnExit, OProcess::AllOutput*/ ) ) { |
57 | m_count = 15; | 57 | m_count = 15; |
58 | emit error(-1 ); | 58 | emit error(-1 ); |
59 | } | 59 | } |
@@ -62,14 +62,14 @@ void Obex::sendNow(){ | |||
62 | emit currentTry( m_count ); | 62 | emit currentTry( m_count ); |
63 | } | 63 | } |
64 | 64 | ||
65 | void Obex::slotExited(KProcess* proc ){ | 65 | void Obex::slotExited(OProcess* proc ){ |
66 | if (proc == m_rec ) { // recieve process | 66 | if (proc == m_rec ) { // recieve process |
67 | recieved(); | 67 | recieved(); |
68 | }else if ( proc == m_send ) { | 68 | }else if ( proc == m_send ) { |
69 | sendEnd(); | 69 | sendEnd(); |
70 | } | 70 | } |
71 | } | 71 | } |
72 | void Obex::slotStdOut(KProcess* proc, char* buf, int len){ | 72 | void Obex::slotStdOut(OProcess* proc, char* buf, int len){ |
73 | if ( proc == m_rec ) { // only recieve | 73 | if ( proc == m_rec ) { // only recieve |
74 | QCString cstring( buf, len ); | 74 | QCString cstring( buf, len ); |
75 | m_outp.append( cstring.data() ); | 75 | m_outp.append( cstring.data() ); |