summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager
authormickeyl <mickeyl>2005-07-09 16:05:57 (UTC)
committer mickeyl <mickeyl>2005-07-09 16:05:57 (UTC)
commit9b070d84b36c5dc764b6b4a8a3ca511d2e3d441f (patch) (unidiff)
tree9d42efed66329ad925f3079e2739d9a3a9ced880 /noncore/net/opietooth/manager
parent5dbfa604bcc5dd32401d862372af806bfe674e89 (diff)
downloadopie-9b070d84b36c5dc764b6b4a8a3ca511d2e3d441f.zip
opie-9b070d84b36c5dc764b6b4a8a3ca511d2e3d441f.tar.gz
opie-9b070d84b36c5dc764b6b4a8a3ca511d2e3d441f.tar.bz2
autopopulate services list, use odebug where appropriate instead of owarn
Diffstat (limited to 'noncore/net/opietooth/manager') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp44
-rw-r--r--noncore/net/opietooth/manager/bluebase.h9
2 files changed, 25 insertions, 28 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index af1cd23..0649514 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -61,3 +61,2 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
61{ 61{
62
63 m_localDevice = new Manager( "hci0" ); 62 m_localDevice = new Manager( "hci0" );
@@ -68,5 +67,3 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
68 connect( rfcommBindButton, SIGNAL( clicked() ), this, SLOT( rfcommDialog() ) ); 67 connect( rfcommBindButton, SIGNAL( clicked() ), this, SLOT( rfcommDialog() ) );
69 // not good since lib is async 68
70 // connect( devicesView, SIGNAL( expanded(QListViewItem*) ),
71 // this, SLOT( addServicesToDevice(QListViewItem*) ) );
72 connect( devicesView, SIGNAL( clicked(QListViewItem*)), 69 connect( devicesView, SIGNAL( clicked(QListViewItem*)),
@@ -84,3 +81,2 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
84 81
85
86 // let hold be rightButtonClicked() 82 // let hold be rightButtonClicked()
@@ -108,10 +104,8 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
108 devicesView->setRootIsDecorated(true); 104 devicesView->setRootIsDecorated(true);
109 105 m_iconLoader = new BTIconLoader();
110
111 writeToHciConfig(); 106 writeToHciConfig();
112 // search conncetions
113 addConnectedDevices(); 107 addConnectedDevices();
114 addSignalStrength();
115 m_iconLoader = new BTIconLoader();
116 readSavedDevices(); 108 readSavedDevices();
109 addServicesToDevices();
110 QTimer::singleShot( 3000, this, SLOT( addServicesToDevices() ) );
117} 111}
@@ -173,3 +167,3 @@ void BlueBase::writeToHciConfig()
173/** 167/**
174 * Read the list of allready known devices 168 * Read the list of already known devices
175 */ 169 */
@@ -187,3 +181,3 @@ void BlueBase::readSavedDevices()
187/** 181/**
188 * Write the list of allready known devices 182 * Write the list of already known devices
189 */ 183 */
@@ -297,5 +291,2 @@ void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices )
297 deviceActive( (*it) ); 291 deviceActive( (*it) );
298
299 // ggf auch hier?
300 addServicesToDevice( deviceItem );
301 } 292 }
@@ -400,2 +391,13 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
400 391
392void BlueBase::addServicesToDevices()
393{
394 odebug << "BlueBase::addServicesToDevices()" << oendl;
395 BTDeviceItem* item = (BTDeviceItem*) devicesView->firstChild();
396 while ( item )
397 {
398 addServicesToDevice( item );
399 item = (BTDeviceItem*) static_cast<QListViewItem*>( item )->nextSibling();
400 }
401}
402
401/** 403/**
@@ -406,3 +408,3 @@ void BlueBase::addServicesToDevice( BTDeviceItem * item )
406{ 408{
407 odebug << "addServicesToDevice" << oendl; 409 odebug << "BlueBase::addServicesToDevice" << oendl;
408 // row of mac adress text(3) 410 // row of mac adress text(3)
@@ -416,4 +418,2 @@ void BlueBase::addServicesToDevice( BTDeviceItem * item )
416/** 418/**
417 * Overloaded. This one it the one that is
418 ted to the foundServices signal
419 * @param device the mac address of the remote device 419 * @param device the mac address of the remote device
@@ -423,3 +423,3 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
423{ 423{
424 odebug << "fill services list" << oendl; 424 odebug << "BlueBase::fill services list" << oendl;
425 425
@@ -478,6 +478,2 @@ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList s
478 478
479
480
481
482
483void BlueBase::addSignalStrength() 479void BlueBase::addSignalStrength()
@@ -514,2 +510,3 @@ void BlueBase::addConnectedDevices()
514 m_localDevice->searchConnections(); 510 m_localDevice->searchConnections();
511 QTimer::singleShot( 5000, this, SLOT( addSignalStrength() ) );
515} 512}
@@ -617,3 +614,2 @@ void BlueBase::deviceActive( const QString& device, bool connected )
617 614
618
619 if ( connected ) 615 if ( connected )
diff --git a/noncore/net/opietooth/manager/bluebase.h b/noncore/net/opietooth/manager/bluebase.h
index a8ab3db..48883d2 100644
--- a/noncore/net/opietooth/manager/bluebase.h
+++ b/noncore/net/opietooth/manager/bluebase.h
@@ -42,4 +42,4 @@ namespace OpieTooth {
42 ~BlueBase(); 42 ~BlueBase();
43 43
44 static QString appName() { return QString::fromLatin1("bluetooth-manager"); } 44 static QString appName() { return QString::fromLatin1("bluetooth-manager"); }
45 45
@@ -50,4 +50,4 @@ namespace OpieTooth {
50 void startScan(); 50 void startScan();
51 51
52 52
53 private: 53 private:
@@ -84,2 +84,3 @@ namespace OpieTooth {
84 void addSearchedDevices( const QValueList<RemoteDevice> &newDevices ); 84 void addSearchedDevices( const QValueList<RemoteDevice> &newDevices );
85 void addServicesToDevices();
85 void addServicesToDevice( BTDeviceItem *item ); 86 void addServicesToDevice( BTDeviceItem *item );