Diffstat (limited to 'noncore/net/opietooth/lib/manager.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/lib/manager.cc | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/noncore/net/opietooth/lib/manager.cc b/noncore/net/opietooth/lib/manager.cc index fcd21f6..177c94e 100644 --- a/noncore/net/opietooth/lib/manager.cc +++ b/noncore/net/opietooth/lib/manager.cc @@ -1,8 +1,11 @@ + + #include <opie/oprocess.h> +#include "parser.h" #include "manager.h" using namespace OpieTooth; Manager::Manager( const QString& dev ) @@ -10,13 +13,13 @@ Manager::Manager( const QString& dev ) { qWarning("created"); m_device = dev; m_hcitool = 0; m_sdp = 0; } -Manager::Manager( Device* dev ) +Manager::Manager( Device* /*dev*/ ) : QObject() { m_hcitool = 0; m_sdp = 0; } Manager::Manager() @@ -29,13 +32,13 @@ Manager::~Manager(){ delete m_hcitool; delete m_sdp; } void Manager::setDevice( const QString& dev ){ m_device = dev; } -void Manager::setDevice( Device* dev ){ +void Manager::setDevice( Device* /*dev*/ ){ } void Manager::isAvailable( const QString& device ){ OProcess* l2ping = new OProcess(); l2ping->setName( device.latin1() ); *l2ping << "l2ping" << "-c1" << device; @@ -44,13 +47,14 @@ void Manager::isAvailable( const QString& device ){ if (!l2ping->start() ) { emit available( device, false ); delete l2ping; } } -void Manager::isAvailable( Device* dev ){ + +void Manager::isAvailable( Device* /*dev*/ ){ } void Manager::searchDevices( const QString& device ){ qWarning("search devices"); OProcess* hcitool = new OProcess(); @@ -65,13 +69,13 @@ void Manager::searchDevices( const QString& device ){ RemoteDevice::ValueList list; emit foundDevices( device, list ); delete hcitool; } } -void Manager::searchDevices(Device* d ){ +void Manager::searchDevices(Device* /*d*/ ){ } void Manager::addService(const QString& name ){ OProcess proc; proc << "sdptool" << "add" << name; @@ -112,17 +116,17 @@ void Manager::searchServices( const QString& remDevice ){ emit foundServices( remDevice, list ); } } void Manager::searchServices( const RemoteDevice& dev){ searchServices( dev.mac() ); } -QString Manager::toDevice( const QString& mac ){ - +QString Manager::toDevice( const QString& /*mac*/ ){ + return QString::null; } -QString Manager::toMac( const QString &device ){ - +QString Manager::toMac( const QString &/*device*/ ){ + return QString::null; } void Manager::slotProcessExited(OProcess* proc ) { bool conn= false; if (proc->normalExit() && proc->exitStatus() == 0 ) conn = true; @@ -154,12 +158,14 @@ void Manager::slotSDPExited( OProcess* proc) } emit foundServices( proc->name(), list ); delete proc; } Services::ValueList Manager::parseSDPOutput( const QString& out ) { Services::ValueList list; + Parser parser( out ); + list = parser.services(); return list; } void Manager::slotHCIExited(OProcess* proc ) { qWarning("process exited"); RemoteDevice::ValueList list; |