author | harlekin <harlekin> | 2002-06-20 18:37:19 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-06-20 18:37:19 (UTC) |
commit | e3b199e4b3ad71cb8d046e33e792402250a8faec (patch) (unidiff) | |
tree | 22bf9a5d7295819e09bd89adee8fff90a4fdfbdc | |
parent | 6b3a0f610d311ee6b1b44a3f20350b9ce63ba368 (diff) | |
download | opie-e3b199e4b3ad71cb8d046e33e792402250a8faec.zip opie-e3b199e4b3ad71cb8d046e33e792402250a8faec.tar.gz opie-e3b199e4b3ad71cb8d046e33e792402250a8faec.tar.bz2 |
available instead of connected - better naming
-rw-r--r-- | noncore/net/opietooth/lib/manager.cc | 8 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/manager.h | 6 |
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 | |||
@@ -32,25 +32,25 @@ Manager::~Manager(){ | |||
32 | void Manager::setDevice( const QString& dev ){ | 32 | void Manager::setDevice( const QString& dev ){ |
33 | m_device = dev; | 33 | m_device = dev; |
34 | } | 34 | } |
35 | void Manager::setDevice( Device* dev ){ | 35 | void Manager::setDevice( Device* dev ){ |
36 | 36 | ||
37 | } | 37 | } |
38 | void Manager::isConnected( const QString& device ){ | 38 | void Manager::isAvailable( const QString& device ){ |
39 | OProcess* l2ping = new OProcess(); | 39 | OProcess* l2ping = new OProcess(); |
40 | l2ping->setName( device.latin1() ); | 40 | l2ping->setName( device.latin1() ); |
41 | *l2ping << "l2ping" << "-c1" << device; | 41 | *l2ping << "l2ping" << "-c1" << device; |
42 | connect(l2ping, SIGNAL(processExited(OProcess* ) ), | 42 | connect(l2ping, SIGNAL(processExited(OProcess* ) ), |
43 | this, SLOT(slotProcessExited(OProcess*) ) ); | 43 | this, SLOT(slotProcessExited(OProcess*) ) ); |
44 | if (!l2ping->start() ) { | 44 | if (!l2ping->start() ) { |
45 | emit connected( device, false ); | 45 | emit available( device, false ); |
46 | delete l2ping; | 46 | delete l2ping; |
47 | } | 47 | } |
48 | 48 | ||
49 | } | 49 | } |
50 | void Manager::isConnected( Device* dev ){ | 50 | void Manager::isAvailable( Device* dev ){ |
51 | 51 | ||
52 | 52 | ||
53 | } | 53 | } |
54 | void Manager::searchDevices( const QString& device ){ | 54 | void Manager::searchDevices( const QString& device ){ |
55 | qWarning("search devices"); | 55 | qWarning("search devices"); |
56 | OProcess* hcitool = new OProcess(); | 56 | OProcess* hcitool = new OProcess(); |
@@ -124,13 +124,13 @@ QString Manager::toMac( const QString &device ){ | |||
124 | void Manager::slotProcessExited(OProcess* proc ) { | 124 | void Manager::slotProcessExited(OProcess* proc ) { |
125 | bool conn= false; | 125 | bool conn= false; |
126 | if (proc->normalExit() && proc->exitStatus() == 0 ) | 126 | if (proc->normalExit() && proc->exitStatus() == 0 ) |
127 | conn = true; | 127 | conn = true; |
128 | 128 | ||
129 | QString name = QString::fromLatin1(proc->name() ); | 129 | QString name = QString::fromLatin1(proc->name() ); |
130 | emit connected( name, conn ); | 130 | emit available( name, conn ); |
131 | delete proc; | 131 | delete proc; |
132 | } | 132 | } |
133 | void Manager::slotSDPOut(OProcess* proc, char* ch, int len) | 133 | void Manager::slotSDPOut(OProcess* proc, char* ch, int len) |
134 | { | 134 | { |
135 | QCString str(ch, len+1 ); | 135 | QCString str(ch, len+1 ); |
136 | QMap<QString, QString>::Iterator it; | 136 | QMap<QString, QString>::Iterator it; |
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 | |||
@@ -50,17 +50,17 @@ Q_OBJECT | |||
50 | * is asynchron | 50 | * is asynchron |
51 | * If device is empty it will take the currently managed | 51 | * If device is empty it will take the currently managed |
52 | * device and see if it's up | 52 | * device and see if it's up |
53 | * for Remote devices it will ping and see. | 53 | * for Remote devices it will ping and see. |
54 | * @param either mac or hciX | 54 | * @param either mac or hciX |
55 | */ | 55 | */ |
56 | void isConnected(const QString& device= QString::null ); | 56 | void isAvailable(const QString& device= QString::null ); |
57 | /** | 57 | /** |
58 | * same as above | 58 | * same as above |
59 | */ | 59 | */ |
60 | void isConnected(Device *dev ); | 60 | void isAvailable(Device *dev ); |
61 | 61 | ||
62 | /** this searchs for devices reachable from the | 62 | /** this searchs for devices reachable from the |
63 | * currently managed device | 63 | * currently managed device |
64 | * or from device if @param device is not empty | 64 | * or from device if @param device is not empty |
65 | */ | 65 | */ |
66 | void searchDevices(const QString& device= QString::null ); | 66 | void searchDevices(const QString& device= QString::null ); |
@@ -102,13 +102,13 @@ Q_OBJECT | |||
102 | /*static*/ QString toDevice( const QString& mac ); | 102 | /*static*/ QString toDevice( const QString& mac ); |
103 | /*static*/ QString toMac( const QString &device ); | 103 | /*static*/ QString toMac( const QString &device ); |
104 | 104 | ||
105 | signals: | 105 | signals: |
106 | // device either mac or dev name | 106 | // device either mac or dev name |
107 | // the first device is the device which you access | 107 | // the first device is the device which you access |
108 | void connected( const QString& device, bool connected ); | 108 | void available( const QString& device, bool connected ); |
109 | void addedService( const QString& service, bool added ); | 109 | void addedService( const QString& service, bool added ); |
110 | void removedService( const QString& service, bool removed ); | 110 | void removedService( const QString& service, bool removed ); |
111 | void foundServices( const QString& device, Services::ValueList ); | 111 | void foundServices( const QString& device, Services::ValueList ); |
112 | void foundDevices( const QString& device, RemoteDevice::ValueList ); | 112 | void foundDevices( const QString& device, RemoteDevice::ValueList ); |
113 | 113 | ||
114 | private slots: | 114 | private slots: |