summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/lib/device.cc
Unidiff
Diffstat (limited to 'noncore/net/opietooth/lib/device.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/device.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/noncore/net/opietooth/lib/device.cc b/noncore/net/opietooth/lib/device.cc
index e3d7f3b..5234996 100644
--- a/noncore/net/opietooth/lib/device.cc
+++ b/noncore/net/opietooth/lib/device.cc
@@ -1,7 +1,7 @@
1 1
2#include <signal.h> 2#include <signal.h>
3 3
4#include "kprocess.h" 4#include <opie/oprocess.h>
5 5
6#include "device.h" 6#include "device.h"
7 7
@@ -40,17 +40,17 @@ void Device::attach(){
40 if(m_process == 0 ){ 40 if(m_process == 0 ){
41 m_output.resize(0); 41 m_output.resize(0);
42 qWarning("new process to create" ); 42 qWarning("new process to create" );
43 m_process = new KProcess(); 43 m_process = new OProcess();
44 *m_process << "hciattach"; 44 *m_process << "hciattach";
45 *m_process << "-p"; 45 *m_process << "-p";
46 *m_process << m_device << m_mode; 46 *m_process << m_device << m_mode;
47 connect(m_process, SIGNAL( processExited(KProcess*) ), 47 connect(m_process, SIGNAL( processExited(OProcess*) ),
48 this, SLOT( slotExited(KProcess* ) ) ); 48 this, SLOT( slotExited(OProcess* ) ) );
49 connect(m_process, SIGNAL( receivedStdout(KProcess*, char*, int) ), 49 connect(m_process, SIGNAL( receivedStdout(OProcess*, char*, int) ),
50 this, SLOT(slotStdOut(KProcess*,char*,int ) ) ); 50 this, SLOT(slotStdOut(OProcess*,char*,int ) ) );
51 connect(m_process, SIGNAL(receivedStderr(KProcess*, char*, int ) ), 51 connect(m_process, SIGNAL(receivedStderr(OProcess*, char*, int ) ),
52 this, SLOT(slotStdErr(KProcess*,char*,int) ) ); 52 this, SLOT(slotStdErr(OProcess*,char*,int) ) );
53 if(!m_process->start(KProcess::NotifyOnExit, KProcess::AllOutput ) ){ 53 if(!m_process->start(OProcess::NotifyOnExit, OProcess::AllOutput ) ){
54 qWarning("Could not start" ); 54 qWarning("Could not start" );
55 delete m_process; 55 delete m_process;
56 m_process = 0; 56 m_process = 0;
@@ -74,7 +74,7 @@ bool Device::isLoaded()const{
74QString Device::devName()const { 74QString Device::devName()const {
75 return QString::fromLatin1("hci0"); 75 return QString::fromLatin1("hci0");
76}; 76};
77void Device::slotExited( KProcess* proc) 77void Device::slotExited( OProcess* proc)
78{ 78{
79 qWarning("prcess exited" ); 79 qWarning("prcess exited" );
80 if(proc== m_process ){ 80 if(proc== m_process ){
@@ -88,11 +88,11 @@ void Device::slotExited( KProcess* proc)
88 // now hciconfig hci0 up ( determine hciX FIXME) 88 // now hciconfig hci0 up ( determine hciX FIXME)
89 // and call hciconfig hci0 up 89 // and call hciconfig hci0 up
90 // FIXME hardcoded to hci0 now :( 90 // FIXME hardcoded to hci0 now :(
91 m_hci = new KProcess( ); 91 m_hci = new OProcess( );
92 *m_hci << "hciconfig"; 92 *m_hci << "hciconfig";
93 *m_hci << "hci0 up"; 93 *m_hci << "hci0 up";
94 connect(m_hci, SIGNAL( processExited(KProcess*) ), 94 connect(m_hci, SIGNAL( processExited(OProcess*) ),
95 this, SLOT( slotExited(KProcess* ) ) ); 95 this, SLOT( slotExited(OProcess* ) ) );
96 if(!m_hci->start() ){ 96 if(!m_hci->start() ){
97 qWarning("could not start" ); 97 qWarning("could not start" );
98 m_attached = false; 98 m_attached = false;
@@ -125,7 +125,7 @@ void Device::slotExited( KProcess* proc)
125 m_hci = 0; 125 m_hci = 0;
126 } 126 }
127} 127}
128void Device::slotStdOut(KProcess* proc, char* chars, int len) 128void Device::slotStdOut(OProcess* proc, char* chars, int len)
129{ 129{
130 qWarning("std out" ); 130 qWarning("std out" );
131 if( len <1 ) 131 if( len <1 )
@@ -136,7 +136,7 @@ void Device::slotStdOut(KProcess* proc, char* chars, int len)
136 m_output.append( string.data() ); 136 m_output.append( string.data() );
137 } 137 }
138} 138}
139void Device::slotStdErr(KProcess*, char*, int ) 139void Device::slotStdErr(OProcess*, char*, int )
140{ 140{
141 qWarning("std err" ); 141 qWarning("std err" );
142} 142}