author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/net/opietooth/manager/bluebase.cpp | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 29030ab..b1cddd2 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp | |||
@@ -146,25 +146,25 @@ void BlueBase::writeConfig() | |||
146 | cfg.writeEntry( "enableAuthentification" , m_enableAuthentification ); | 146 | cfg.writeEntry( "enableAuthentification" , m_enableAuthentification ); |
147 | cfg.writeEntry( "enablePagescan" , m_enablePagescan ); | 147 | cfg.writeEntry( "enablePagescan" , m_enablePagescan ); |
148 | cfg.writeEntry( "enableInquiryscan" , m_enableInquiryscan ); | 148 | cfg.writeEntry( "enableInquiryscan" , m_enableInquiryscan ); |
149 | 149 | ||
150 | writeToHciConfig(); | 150 | writeToHciConfig(); |
151 | } | 151 | } |
152 | 152 | ||
153 | /** | 153 | /** |
154 | * Modify the hcid.conf file to our needs | 154 | * Modify the hcid.conf file to our needs |
155 | */ | 155 | */ |
156 | void BlueBase::writeToHciConfig() | 156 | void BlueBase::writeToHciConfig() |
157 | { | 157 | { |
158 | qWarning("writeToHciConfig"); | 158 | owarn << "writeToHciConfig" << oendl; |
159 | HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); | 159 | HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); |
160 | hciconf.load(); | 160 | hciconf.load(); |
161 | hciconf.setPinHelper( "/opt/QtPalmtop/bin/bluepin" ); | 161 | hciconf.setPinHelper( "/opt/QtPalmtop/bin/bluepin" ); |
162 | hciconf.setName( m_deviceName ); | 162 | hciconf.setName( m_deviceName ); |
163 | hciconf.setEncrypt( m_useEncryption ); | 163 | hciconf.setEncrypt( m_useEncryption ); |
164 | hciconf.setAuth( m_enableAuthentification ); | 164 | hciconf.setAuth( m_enableAuthentification ); |
165 | hciconf.setPscan( m_enablePagescan ); | 165 | hciconf.setPscan( m_enablePagescan ); |
166 | hciconf.setIscan( m_enableInquiryscan ); | 166 | hciconf.setIscan( m_enableInquiryscan ); |
167 | hciconf.save(); | 167 | hciconf.save(); |
168 | } | 168 | } |
169 | 169 | ||
170 | 170 | ||
@@ -358,81 +358,81 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin | |||
358 | * delete the PopupMenu otherwise it's the responsibility of | 358 | * delete the PopupMenu otherwise it's the responsibility of |
359 | * the PopupMenu to delete itself | 359 | * the PopupMenu to delete itself |
360 | * | 360 | * |
361 | */ | 361 | */ |
362 | else if ( ((BTListItem*)item)->type() == "service") | 362 | else if ( ((BTListItem*)item)->type() == "service") |
363 | { | 363 | { |
364 | BTServiceItem* service = (BTServiceItem*)item; | 364 | BTServiceItem* service = (BTServiceItem*)item; |
365 | QMap<int, QString> list = service->services().classIdList(); | 365 | QMap<int, QString> list = service->services().classIdList(); |
366 | QMap<int, QString>::Iterator it = list.begin(); | 366 | QMap<int, QString>::Iterator it = list.begin(); |
367 | QPopupMenu *popup =0l; | 367 | QPopupMenu *popup =0l; |
368 | if ( it != list.end() ) | 368 | if ( it != list.end() ) |
369 | { | 369 | { |
370 | qWarning("Searching id %d %s", it.key(), it.data().latin1() ); | 370 | owarn << "Searching id " << it.key() << " " << it.data().latin1() << "" << oendl; |
371 | popup = m_popHelper.find( it.key(), | 371 | popup = m_popHelper.find( it.key(), |
372 | service->services(), | 372 | service->services(), |
373 | (BTDeviceItem*)service->parent() ); | 373 | (BTDeviceItem*)service->parent() ); |
374 | } | 374 | } |
375 | else | 375 | else |
376 | { | 376 | { |
377 | qWarning("Empty"); | 377 | owarn << "Empty" << oendl; |
378 | } | 378 | } |
379 | 379 | ||
380 | if ( popup == 0l ) | 380 | if ( popup == 0l ) |
381 | { | 381 | { |
382 | qWarning("factory returned 0l"); | 382 | owarn << "factory returned 0l" << oendl; |
383 | popup = new QPopupMenu(); | 383 | popup = new QPopupMenu(); |
384 | } | 384 | } |
385 | int test1 = popup->insertItem( tr("Test1:"), 2); | 385 | int test1 = popup->insertItem( tr("Test1:"), 2); |
386 | 386 | ||
387 | ret = popup->exec( point ); | 387 | ret = popup->exec( point ); |
388 | qWarning("returned from exec() "); | 388 | owarn << "returned from exec() " << oendl; |
389 | if ( ret == -1 ) | 389 | if ( ret == -1 ) |
390 | { | 390 | { |
391 | ; | 391 | ; |
392 | } | 392 | } |
393 | else if ( ret == test1 ) | 393 | else if ( ret == test1 ) |
394 | { | 394 | { |
395 | ; | 395 | ; |
396 | } | 396 | } |
397 | delete popup; | 397 | delete popup; |
398 | } | 398 | } |
399 | delete menu; | 399 | delete menu; |
400 | } | 400 | } |
401 | 401 | ||
402 | 402 | ||
403 | /** | 403 | /** |
404 | * Search and display avail. services for a device (on expand from device listing) | 404 | * Search and display avail. services for a device (on expand from device listing) |
405 | * @param item the service item returned | 405 | * @param item the service item returned |
406 | */ | 406 | */ |
407 | void BlueBase::addServicesToDevice( BTDeviceItem * item ) | 407 | void BlueBase::addServicesToDevice( BTDeviceItem * item ) |
408 | { | 408 | { |
409 | qDebug("addServicesToDevice"); | 409 | odebug << "addServicesToDevice" << oendl; |
410 | // row of mac adress text(3) | 410 | // row of mac adress text(3) |
411 | RemoteDevice device = item->remoteDevice(); | 411 | RemoteDevice device = item->remoteDevice(); |
412 | m_deviceList.insert( item->mac() , item ); | 412 | m_deviceList.insert( item->mac() , item ); |
413 | // and some time later I get a signal foundServices( const QString& device, Services::ValueList ); back | 413 | // and some time later I get a signal foundServices( const QString& device, Services::ValueList ); back |
414 | m_localDevice->searchServices( device ); | 414 | m_localDevice->searchServices( device ); |
415 | } | 415 | } |
416 | 416 | ||
417 | 417 | ||
418 | /** | 418 | /** |
419 | * Overloaded. This one it the one that is | 419 | * Overloaded. This one it the one that is |
420 | ted to the foundServices signal | 420 | ted to the foundServices signal |
421 | * @param device the mac address of the remote device | 421 | * @param device the mac address of the remote device |
422 | * @param servicesList the list with the service the device has. | 422 | * @param servicesList the list with the service the device has. |
423 | */ | 423 | */ |
424 | void BlueBase::addServicesToDevice( const QString& device, Services::ValueList servicesList ) | 424 | void BlueBase::addServicesToDevice( const QString& device, Services::ValueList servicesList ) |
425 | { | 425 | { |
426 | qDebug("fill services list"); | 426 | odebug << "fill services list" << oendl; |
427 | 427 | ||
428 | QMap<QString,BTDeviceItem*>::Iterator it; | 428 | QMap<QString,BTDeviceItem*>::Iterator it; |
429 | BTDeviceItem* deviceItem = 0; | 429 | BTDeviceItem* deviceItem = 0; |
430 | 430 | ||
431 | // get the right devices which requested the search | 431 | // get the right devices which requested the search |
432 | it = m_deviceList.find( device ); | 432 | it = m_deviceList.find( device ); |
433 | if( it == m_deviceList.end() ) | 433 | if( it == m_deviceList.end() ) |
434 | return; | 434 | return; |
435 | deviceItem = it.data(); | 435 | deviceItem = it.data(); |
436 | 436 | ||
437 | // remove previous entries | 437 | // remove previous entries |
438 | QList<QListViewItem> tempList; | 438 | QList<QListViewItem> tempList; |
@@ -598,25 +598,25 @@ void BlueBase::deviceActive( const RemoteDevice &device ) | |||
598 | // We should have a BTDeviceItem there or where does it get added to the map -zecke | 598 | // We should have a BTDeviceItem there or where does it get added to the map -zecke |
599 | m_localDevice->isAvailable( device.mac() ); | 599 | m_localDevice->isAvailable( device.mac() ); |
600 | } | 600 | } |
601 | 601 | ||
602 | 602 | ||
603 | /** | 603 | /** |
604 | * The signal catcher. Set the avail. status on device. | 604 | * The signal catcher. Set the avail. status on device. |
605 | * @param device - the mac address | 605 | * @param device - the mac address |
606 | * @param connected - if it is avail. or not | 606 | * @param connected - if it is avail. or not |
607 | */ | 607 | */ |
608 | void BlueBase::deviceActive( const QString& device, bool connected ) | 608 | void BlueBase::deviceActive( const QString& device, bool connected ) |
609 | { | 609 | { |
610 | qDebug("deviceActive slot"); | 610 | odebug << "deviceActive slot" << oendl; |
611 | 611 | ||
612 | QMap<QString,BTDeviceItem*>::Iterator it; | 612 | QMap<QString,BTDeviceItem*>::Iterator it; |
613 | 613 | ||
614 | it = m_deviceList.find( device ); | 614 | it = m_deviceList.find( device ); |
615 | if( it == m_deviceList.end() ) | 615 | if( it == m_deviceList.end() ) |
616 | return; | 616 | return; |
617 | 617 | ||
618 | BTDeviceItem* deviceItem = it.data(); | 618 | BTDeviceItem* deviceItem = it.data(); |
619 | 619 | ||
620 | 620 | ||
621 | if ( connected ) | 621 | if ( connected ) |
622 | { | 622 | { |