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) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/manager.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/opietooth/lib/manager.cc b/noncore/net/opietooth/lib/manager.cc
index c454588..fcd21f6 100644
--- a/noncore/net/opietooth/lib/manager.cc
+++ b/noncore/net/opietooth/lib/manager.cc
@@ -26,37 +26,37 @@ Manager::Manager()
m_sdp = 0;
}
Manager::~Manager(){
delete m_hcitool;
delete m_sdp;
}
void Manager::setDevice( const QString& dev ){
m_device = dev;
}
void Manager::setDevice( Device* dev ){
}
-void Manager::isConnected( const QString& device ){
+void Manager::isAvailable( const QString& device ){
OProcess* l2ping = new OProcess();
l2ping->setName( device.latin1() );
*l2ping << "l2ping" << "-c1" << device;
connect(l2ping, SIGNAL(processExited(OProcess* ) ),
this, SLOT(slotProcessExited(OProcess*) ) );
if (!l2ping->start() ) {
- emit connected( device, false );
+ emit available( device, false );
delete l2ping;
}
}
-void Manager::isConnected( Device* dev ){
+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*) ) ,
this, SLOT(slotHCIExited(OProcess* ) ) );
connect( hcitool, SIGNAL(receivedStdout(OProcess*, char*, int ) ),
this, SLOT(slotHCIOut(OProcess*, char*, int ) ) );
@@ -118,25 +118,25 @@ void Manager::searchServices( const RemoteDevice& dev){
QString Manager::toDevice( const QString& mac ){
}
QString Manager::toMac( const QString &device ){
}
void Manager::slotProcessExited(OProcess* proc ) {
bool conn= false;
if (proc->normalExit() && proc->exitStatus() == 0 )
conn = true;
QString name = QString::fromLatin1(proc->name() );
- emit connected( name, conn );
+ emit available( name, conn );
delete proc;
}
void Manager::slotSDPOut(OProcess* proc, char* ch, int len)
{
QCString str(ch, len+1 );
QMap<QString, QString>::Iterator it;
it = m_out.find(proc->name() );
if ( it != m_out.end() ) {
QString string = it.data();
string.append( str );
m_out.replace( proc->name(), string );
}