summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/lib/manager.cc
Side-by-side diff
Diffstat (limited to 'noncore/net/opietooth/lib/manager.cc') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/manager.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/noncore/net/opietooth/lib/manager.cc b/noncore/net/opietooth/lib/manager.cc
index c89d325..56156a8 100644
--- a/noncore/net/opietooth/lib/manager.cc
+++ b/noncore/net/opietooth/lib/manager.cc
@@ -1,16 +1,18 @@
-#include <opie/oprocess.h>
+#include <opie2/oprocess.h>
#include "parser.h"
#include "manager.h"
using namespace OpieTooth;
+using namespace Opie::Core;
+using namespace Opie::Core;
Manager::Manager( const QString& dev )
: QObject()
{
qWarning("created");
m_device = dev;
m_hcitool = 0;
@@ -39,13 +41,13 @@ void Manager::setDevice( Device* /*dev*/ ){
}
void Manager::isAvailable( const QString& device ){
OProcess* l2ping = new OProcess();
l2ping->setName( device.latin1() );
*l2ping << "l2ping" << "-c1" << device;
- connect(l2ping, SIGNAL(processExited(OProcess* ) ),
+ connect(l2ping, SIGNAL(processExited(Opie::Core::OProcess* ) ),
this, SLOT(slotProcessExited(OProcess*) ) );
if (!l2ping->start() ) {
emit available( device, false );
delete l2ping;
}
@@ -57,15 +59,15 @@ void Manager::isAvailable( Device* /*dev*/ ){
}
void Manager::searchDevices( const QString& device ){
qWarning("search devices");
OProcess* hcitool = new OProcess();
hcitool->setName( device.isEmpty() ? "hci0" : device.latin1() );
*hcitool << "hcitool" << "scan";
- connect( hcitool, SIGNAL(processExited(OProcess*) ) ,
+ connect( hcitool, SIGNAL(processExited(Opie::Core::OProcess*) ) ,
this, SLOT(slotHCIExited(OProcess* ) ) );
- connect( hcitool, SIGNAL(receivedStdout(OProcess*, char*, int ) ),
+ connect( hcitool, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ),
this, SLOT(slotHCIOut(OProcess*, char*, int ) ) );
if (!hcitool->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
qWarning("could not start");
RemoteDevice::ValueList list;
emit foundDevices( device, list );
delete hcitool;
@@ -104,15 +106,15 @@ void Manager::removeServices( const QStringList& list){
}
void Manager::searchServices( const QString& remDevice ){
OProcess *m_sdp =new OProcess();
*m_sdp << "sdptool" << "browse" << remDevice;
m_sdp->setName( remDevice.latin1() );
qWarning("search Services for %s", remDevice.latin1() );
- connect(m_sdp, SIGNAL(processExited(OProcess*) ),
+ connect(m_sdp, SIGNAL(processExited(Opie::Core::OProcess*) ),
this, SLOT(slotSDPExited(OProcess* ) ) );
- connect(m_sdp, SIGNAL(receivedStdout(OProcess*, char*, int ) ),
+ connect(m_sdp, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ),
this, SLOT(slotSDPOut(OProcess*, char*, int) ) );
if (!m_sdp->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
qWarning("could not start sdptool" );
delete m_sdp;
Services::ValueList list;
emit foundServices( remDevice, list );
@@ -243,15 +245,15 @@ void Manager::connectTo( const QString& mac) {
void Manager::searchConnections() {
qWarning("searching connections?");
OProcess* proc = new OProcess();
m_hcitoolCon = QString::null;
- connect(proc, SIGNAL(processExited(OProcess*) ),
+ connect(proc, SIGNAL(processExited(Opie::Core::OProcess*) ),
this, SLOT(slotConnectionExited( OProcess*) ) );
- connect(proc, SIGNAL(receivedStdout(OProcess*, char*, int) ),
+ connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int) ),
this, SLOT(slotConnectionOutput(OProcess*, char*, int) ) );
*proc << "hcitool";
*proc << "con";
if (!proc->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
ConnectionState::ValueList list;
@@ -302,15 +304,15 @@ ConnectionState::ValueList Manager::parseConnections( const QString& out ) {
}
void Manager::signalStrength( const QString &mac ) {
OProcess* sig_proc = new OProcess();
- connect(sig_proc, SIGNAL(processExited(OProcess*) ),
+ connect(sig_proc, SIGNAL(processExited(Opie::Core::OProcess*) ),
this, SLOT(slotSignalStrengthExited( OProcess*) ) );
- connect(sig_proc, SIGNAL(receivedStdout(OProcess*, char*, int) ),
+ connect(sig_proc, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int) ),
this, SLOT(slotSignalStrengthOutput(OProcess*, char*, int) ) );
*sig_proc << "hcitool";
*sig_proc << "lq";
*sig_proc << mac;
sig_proc->setName( mac.latin1() );