author | zecke <zecke> | 2002-06-23 19:25:49 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-23 19:25:49 (UTC) |
commit | 7c4524d0ff6d329c1f5f76fa2e7a727e553d51c8 (patch) (side-by-side diff) | |
tree | 08c4b8268c71e568096ad154b0fecb20df76e25b /noncore/net/opietooth/lib/manager.cc | |
parent | 616f8cef3111756cac0240be10aea38d4f38ad8e (diff) | |
download | opie-7c4524d0ff6d329c1f5f76fa2e7a727e553d51c8.zip opie-7c4524d0ff6d329c1f5f76fa2e7a727e553d51c8.tar.gz opie-7c4524d0ff6d329c1f5f76fa2e7a727e553d51c8.tar.bz2 |
Fix Service/Profile parser
Diffstat (limited to 'noncore/net/opietooth/lib/manager.cc') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/lib/manager.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/noncore/net/opietooth/lib/manager.cc b/noncore/net/opietooth/lib/manager.cc index 177c94e..23506b3 100644 --- a/noncore/net/opietooth/lib/manager.cc +++ b/noncore/net/opietooth/lib/manager.cc @@ -105,13 +105,15 @@ void Manager::removeServices( const QStringList& list){ void Manager::searchServices( const QString& remDevice ){ OProcess *m_sdp =new OProcess(); *m_sdp << "sdptool" << "browse" << remDevice; m_sdp->setName( remDevice.latin1() ); + qWarning("search Services for %s", remDevice.latin1() ); connect(m_sdp, SIGNAL(processExited(OProcess*) ), this, SLOT(slotSDPExited(OProcess* ) ) ); connect(m_sdp, SIGNAL(receivedStdout(OProcess*, char*, int ) ), this, SLOT(slotSDPOut(OProcess*, char*, int) ) ); if (!m_sdp->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { + qWarning("could not start sdptool" ); delete m_sdp; Services::ValueList list; emit foundServices( remDevice, list ); } @@ -136,23 +138,27 @@ void Manager::slotProcessExited(OProcess* proc ) { } void Manager::slotSDPOut(OProcess* proc, char* ch, int len) { QCString str(ch, len+1 ); + qWarning("SDP:%s", str.data() ); QMap<QString, QString>::Iterator it; it = m_out.find(proc->name() ); + QString string; if ( it != m_out.end() ) { - QString string = it.data(); + string = it.data(); + } string.append( str ); m_out.replace( proc->name(), string ); - } } void Manager::slotSDPExited( OProcess* proc) { + qWarning("proc name %s", proc->name() ); Services::ValueList list; if (proc->normalExit() ) { QMap<QString, QString>::Iterator it = m_out.find( proc->name() ); if ( it != m_out.end() ) { + qWarning("found process" ); list = parseSDPOutput( it.data() ); m_out.remove( it ); } } @@ -160,8 +166,9 @@ void Manager::slotSDPExited( OProcess* proc) delete proc; } Services::ValueList Manager::parseSDPOutput( const QString& out ) { Services::ValueList list; + qWarning("parsing output" ); Parser parser( out ); list = parser.services(); return list; } |