summaryrefslogtreecommitdiff
path: root/metawatch/metawatchscanner.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-05-08 18:04:31 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-05-08 18:04:31 +0200
commitccd19d2b7ee4184503ea46b98333b27a5613190e (patch)
treef78cc3f3c946d7a4f8167f72fb20703c65494d84 /metawatch/metawatchscanner.cpp
parent6003bf81107dd9be51589c074b74c5af82bfc8ab (diff)
downloadsowatch-ccd19d2b7ee4184503ea46b98333b27a5613190e.tar.gz
sowatch-ccd19d2b7ee4184503ea46b98333b27a5613190e.zip
big change: a new abstract BluetoothWatch class
Diffstat (limited to 'metawatch/metawatchscanner.cpp')
-rw-r--r--metawatch/metawatchscanner.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/metawatch/metawatchscanner.cpp b/metawatch/metawatchscanner.cpp
index e560195..3742092 100644
--- a/metawatch/metawatchscanner.cpp
+++ b/metawatch/metawatchscanner.cpp
@@ -7,23 +7,9 @@ QTM_USE_NAMESPACE
using namespace sowatch;
MetaWatchScanner::MetaWatchScanner(QObject *parent) :
- WatchScanner(parent),
- _agent(new QBluetoothServiceDiscoveryAgent(this))
+ BluetoothWatchScanner(parent)
{
- _agent->setUuidFilter(QBluetoothUuid::SerialPort);
- connect(_agent, SIGNAL(finished()), this, SIGNAL(finished()));
- connect(_agent, SIGNAL(serviceDiscovered(QBluetoothServiceInfo)),
- this, SLOT(handleDiscoveredService(QBluetoothServiceInfo)));
-}
-
-void MetaWatchScanner::start()
-{
- if (_agent->isActive()) {
- _agent->stop();
- }
- _agent->start();
- qDebug() << "started metawatch bluetooth scan";
- emit started();
+ setUuidFilter(QBluetoothUuid::SerialPort);
}
void MetaWatchScanner::handleDiscoveredService(const QBluetoothServiceInfo &info)