From b15f8a613d83a2f3957fef515e20981f636b908b Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 15 Jun 2002 20:06:04 +0000 Subject: isCOnnected, add and remove Service + first bits of service browsing done --- (limited to 'noncore/net/opietooth/lib/device.cc') 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 @@ #include -#include "kprocess.h" +#include #include "device.h" @@ -40,17 +40,17 @@ void Device::attach(){ if(m_process == 0 ){ m_output.resize(0); qWarning("new process to create" ); - m_process = new KProcess(); + m_process = new OProcess(); *m_process << "hciattach"; *m_process << "-p"; *m_process << m_device << m_mode; - connect(m_process, SIGNAL( processExited(KProcess*) ), - this, SLOT( slotExited(KProcess* ) ) ); - connect(m_process, SIGNAL( receivedStdout(KProcess*, char*, int) ), - this, SLOT(slotStdOut(KProcess*,char*,int ) ) ); - connect(m_process, SIGNAL(receivedStderr(KProcess*, char*, int ) ), - this, SLOT(slotStdErr(KProcess*,char*,int) ) ); - if(!m_process->start(KProcess::NotifyOnExit, KProcess::AllOutput ) ){ + connect(m_process, SIGNAL( processExited(OProcess*) ), + this, SLOT( slotExited(OProcess* ) ) ); + connect(m_process, SIGNAL( receivedStdout(OProcess*, char*, int) ), + this, SLOT(slotStdOut(OProcess*,char*,int ) ) ); + connect(m_process, SIGNAL(receivedStderr(OProcess*, char*, int ) ), + this, SLOT(slotStdErr(OProcess*,char*,int) ) ); + if(!m_process->start(OProcess::NotifyOnExit, OProcess::AllOutput ) ){ qWarning("Could not start" ); delete m_process; m_process = 0; @@ -74,7 +74,7 @@ bool Device::isLoaded()const{ QString Device::devName()const { return QString::fromLatin1("hci0"); }; -void Device::slotExited( KProcess* proc) +void Device::slotExited( OProcess* proc) { qWarning("prcess exited" ); if(proc== m_process ){ @@ -88,11 +88,11 @@ void Device::slotExited( KProcess* proc) // now hciconfig hci0 up ( determine hciX FIXME) // and call hciconfig hci0 up // FIXME hardcoded to hci0 now :( - m_hci = new KProcess( ); + m_hci = new OProcess( ); *m_hci << "hciconfig"; *m_hci << "hci0 up"; - connect(m_hci, SIGNAL( processExited(KProcess*) ), - this, SLOT( slotExited(KProcess* ) ) ); + connect(m_hci, SIGNAL( processExited(OProcess*) ), + this, SLOT( slotExited(OProcess* ) ) ); if(!m_hci->start() ){ qWarning("could not start" ); m_attached = false; @@ -125,7 +125,7 @@ void Device::slotExited( KProcess* proc) m_hci = 0; } } -void Device::slotStdOut(KProcess* proc, char* chars, int len) +void Device::slotStdOut(OProcess* proc, char* chars, int len) { qWarning("std out" ); if( len <1 ) @@ -136,7 +136,7 @@ void Device::slotStdOut(KProcess* proc, char* chars, int len) m_output.append( string.data() ); } } -void Device::slotStdErr(KProcess*, char*, int ) +void Device::slotStdErr(OProcess*, char*, int ) { qWarning("std err" ); } -- cgit v0.9.0.2