Diffstat (limited to 'noncore/net/opietooth/lib/manager.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/lib/manager.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/net/opietooth/lib/manager.cc b/noncore/net/opietooth/lib/manager.cc index 40c1f0a..c454588 100644 --- a/noncore/net/opietooth/lib/manager.cc +++ b/noncore/net/opietooth/lib/manager.cc | |||
@@ -59,13 +59,13 @@ void Manager::searchDevices( const QString& device ){ | |||
59 | connect( hcitool, SIGNAL(processExited(OProcess*) ) , | 59 | connect( hcitool, SIGNAL(processExited(OProcess*) ) , |
60 | this, SLOT(slotHCIExited(OProcess* ) ) ); | 60 | this, SLOT(slotHCIExited(OProcess* ) ) ); |
61 | connect( hcitool, SIGNAL(receivedStdout(OProcess*, char*, int ) ), | 61 | connect( hcitool, SIGNAL(receivedStdout(OProcess*, char*, int ) ), |
62 | this, SLOT(slotHCIOut(OProcess*, char*, int ) ) ); | 62 | this, SLOT(slotHCIOut(OProcess*, char*, int ) ) ); |
63 | if (!hcitool->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { | 63 | if (!hcitool->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
64 | qWarning("could not start"); | 64 | qWarning("could not start"); |
65 | RemoteDevices::ValueList list; | 65 | RemoteDevice::ValueList list; |
66 | emit foundDevices( device, list ); | 66 | emit foundDevices( device, list ); |
67 | delete hcitool; | 67 | delete hcitool; |
68 | } | 68 | } |
69 | } | 69 | } |
70 | 70 | ||
71 | void Manager::searchDevices(Device* d ){ | 71 | void Manager::searchDevices(Device* d ){ |
@@ -109,13 +109,13 @@ void Manager::searchServices( const QString& remDevice ){ | |||
109 | if (!m_sdp->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { | 109 | if (!m_sdp->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
110 | delete m_sdp; | 110 | delete m_sdp; |
111 | Services::ValueList list; | 111 | Services::ValueList list; |
112 | emit foundServices( remDevice, list ); | 112 | emit foundServices( remDevice, list ); |
113 | } | 113 | } |
114 | } | 114 | } |
115 | void Manager::searchServices( const RemoteDevices& dev){ | 115 | void Manager::searchServices( const RemoteDevice& dev){ |
116 | searchServices( dev.mac() ); | 116 | searchServices( dev.mac() ); |
117 | } | 117 | } |
118 | QString Manager::toDevice( const QString& mac ){ | 118 | QString Manager::toDevice( const QString& mac ){ |
119 | 119 | ||
120 | } | 120 | } |
121 | QString Manager::toMac( const QString &device ){ | 121 | QString Manager::toMac( const QString &device ){ |
@@ -159,13 +159,13 @@ Services::ValueList Manager::parseSDPOutput( const QString& out ) { | |||
159 | Services::ValueList list; | 159 | Services::ValueList list; |
160 | return list; | 160 | return list; |
161 | } | 161 | } |
162 | 162 | ||
163 | void Manager::slotHCIExited(OProcess* proc ) { | 163 | void Manager::slotHCIExited(OProcess* proc ) { |
164 | qWarning("process exited"); | 164 | qWarning("process exited"); |
165 | RemoteDevices::ValueList list; | 165 | RemoteDevice::ValueList list; |
166 | if (proc->normalExit() ) { | 166 | if (proc->normalExit() ) { |
167 | qWarning("normalExit %s", proc->name() ); | 167 | qWarning("normalExit %s", proc->name() ); |
168 | QMap<QString, QString>::Iterator it = m_devices.find(proc->name() ); | 168 | QMap<QString, QString>::Iterator it = m_devices.find(proc->name() ); |
169 | if (it != m_devices.end() ) { | 169 | if (it != m_devices.end() ) { |
170 | qWarning("!= end ;)"); | 170 | qWarning("!= end ;)"); |
171 | list = parseHCIOutput( it.data() ); | 171 | list = parseHCIOutput( it.data() ); |
@@ -187,27 +187,27 @@ void Manager::slotHCIOut(OProcess* proc, char* ch, int len) { | |||
187 | string = it.data(); | 187 | string = it.data(); |
188 | } | 188 | } |
189 | string.append( str ); | 189 | string.append( str ); |
190 | 190 | ||
191 | m_devices.replace( proc->name(), string ); | 191 | m_devices.replace( proc->name(), string ); |
192 | } | 192 | } |
193 | RemoteDevices::ValueList Manager::parseHCIOutput(const QString& output ) { | 193 | RemoteDevice::ValueList Manager::parseHCIOutput(const QString& output ) { |
194 | qWarning("parseHCI %s", output.latin1() ); | 194 | qWarning("parseHCI %s", output.latin1() ); |
195 | RemoteDevices::ValueList list; | 195 | RemoteDevice::ValueList list; |
196 | QStringList strList = QStringList::split('\n', output ); | 196 | QStringList strList = QStringList::split('\n', output ); |
197 | QStringList::Iterator it; | 197 | QStringList::Iterator it; |
198 | QString str; | 198 | QString str; |
199 | for ( it = strList.begin(); it != strList.end(); ++it ) { | 199 | for ( it = strList.begin(); it != strList.end(); ++it ) { |
200 | str = (*it).stripWhiteSpace(); | 200 | str = (*it).stripWhiteSpace(); |
201 | qWarning("OpieTooth %s", str.latin1() ); | 201 | qWarning("OpieTooth %s", str.latin1() ); |
202 | int pos = str.findRev(':' ); | 202 | int pos = str.findRev(':' ); |
203 | if ( pos > 0 ) { | 203 | if ( pos > 0 ) { |
204 | QString mac = str.left(17 ); | 204 | QString mac = str.left(17 ); |
205 | str.remove( 0, 17 ); | 205 | str.remove( 0, 17 ); |
206 | qWarning("mac %s", mac.latin1() ); | 206 | qWarning("mac %s", mac.latin1() ); |
207 | qWarning("rest:%s", str.latin1() ); | 207 | qWarning("rest:%s", str.latin1() ); |
208 | RemoteDevices rem( mac , str.stripWhiteSpace() ); | 208 | RemoteDevice rem( mac , str.stripWhiteSpace() ); |
209 | list.append( rem ); | 209 | list.append( rem ); |
210 | } | 210 | } |
211 | } | 211 | } |
212 | return list; | 212 | return list; |
213 | } | 213 | } |