summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-06-20 18:37:19 (UTC)
committer harlekin <harlekin>2002-06-20 18:37:19 (UTC)
commite3b199e4b3ad71cb8d046e33e792402250a8faec (patch) (side-by-side diff)
tree22bf9a5d7295819e09bd89adee8fff90a4fdfbdc
parent6b3a0f610d311ee6b1b44a3f20350b9ce63ba368 (diff)
downloadopie-e3b199e4b3ad71cb8d046e33e792402250a8faec.zip
opie-e3b199e4b3ad71cb8d046e33e792402250a8faec.tar.gz
opie-e3b199e4b3ad71cb8d046e33e792402250a8faec.tar.bz2
available instead of connected - better naming
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/manager.cc8
-rw-r--r--noncore/net/opietooth/lib/manager.h6
2 files changed, 7 insertions, 7 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
@@ -30,29 +30,29 @@ Manager::~Manager(){
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";
@@ -122,17 +122,17 @@ 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() ) {
diff --git a/noncore/net/opietooth/lib/manager.h b/noncore/net/opietooth/lib/manager.h
index aba70f7..415ec72 100644
--- a/noncore/net/opietooth/lib/manager.h
+++ b/noncore/net/opietooth/lib/manager.h
@@ -48,21 +48,21 @@ Q_OBJECT
/**
* Wether or not a device is connected. The function
* is asynchron
* If device is empty it will take the currently managed
* device and see if it's up
* for Remote devices it will ping and see.
* @param either mac or hciX
*/
- void isConnected(const QString& device= QString::null );
+ void isAvailable(const QString& device= QString::null );
/**
* same as above
*/
- void isConnected(Device *dev );
+ void isAvailable(Device *dev );
/** this searchs for devices reachable from the
* currently managed device
* or from device if @param device is not empty
*/
void searchDevices(const QString& device= QString::null );
/** same as above
*
@@ -100,17 +100,17 @@ Q_OBJECT
*/
void searchServices( const RemoteDevice& );
/*static*/ QString toDevice( const QString& mac );
/*static*/ QString toMac( const QString &device );
signals:
// device either mac or dev name
// the first device is the device which you access
- void connected( const QString& device, bool connected );
+ void available( const QString& device, bool connected );
void addedService( const QString& service, bool added );
void removedService( const QString& service, bool removed );
void foundServices( const QString& device, Services::ValueList );
void foundDevices( const QString& device, RemoteDevice::ValueList );
private slots:
void slotProcessExited(OProcess* );
void slotSDPExited(OProcess*);