summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothserviceinfo_qnx.cpp
diff options
context:
space:
mode:
authorFabian Bumberger <fbumberger@rim.com>2012-11-27 12:59:09 +0100
committerAlex <ablasche@gmail.com>2012-11-27 22:24:44 +0100
commit18f203d55e1eccf73e8a78640372d6d1a991731b (patch)
tree0f4156126422586a350f81765d135ef6f420688b /src/bluetooth/qbluetoothserviceinfo_qnx.cpp
parent36976cb4f5d894beb4689af054e0456b7c7a154f (diff)
Refactoring service info
Change-Id: Ide804f02b68e5bcf811969ed5cfad9c03e8bdbf2 Reviewed-by: Alex <ablasche@gmail.com>
Diffstat (limited to 'src/bluetooth/qbluetoothserviceinfo_qnx.cpp')
-rw-r--r--src/bluetooth/qbluetoothserviceinfo_qnx.cpp33
1 files changed, 10 insertions, 23 deletions
diff --git a/src/bluetooth/qbluetoothserviceinfo_qnx.cpp b/src/bluetooth/qbluetoothserviceinfo_qnx.cpp
index be8f01db..d5784ebd 100644
--- a/src/bluetooth/qbluetoothserviceinfo_qnx.cpp
+++ b/src/bluetooth/qbluetoothserviceinfo_qnx.cpp
@@ -47,41 +47,29 @@
QTBLUETOOTH_BEGIN_NAMESPACE
-bool QBluetoothServiceInfo::isRegistered() const
+QBluetoothServiceInfoPrivate::QBluetoothServiceInfoPrivate()
+: registered(false)
{
- Q_D(const QBluetoothServiceInfo);
-
- return d->registered;
}
-bool QBluetoothServiceInfo::registerService() const
+QBluetoothServiceInfoPrivate::~QBluetoothServiceInfoPrivate()
{
- Q_D(const QBluetoothServiceInfo);
-
- if (!this->isComplete())
- return false;
-
- return d->registerService();
+ ppsUnregisterControl(0);
}
-bool QBluetoothServiceInfo::unregisterService() const
+bool QBluetoothServiceInfoPrivate::isRegistered() const
{
- Q_D(const QBluetoothServiceInfo);
+ return registered;
+}
- if (!d->registered)
+bool QBluetoothServiceInfoPrivate::unregisterService() const
+{
+ if (!registered)
return false;
return false;
}
-QBluetoothServiceInfoPrivate::QBluetoothServiceInfoPrivate()
-: registered(false)
-{
-}
-
-QBluetoothServiceInfoPrivate::~QBluetoothServiceInfoPrivate()
-{
-}
void QBluetoothServiceInfoPrivate::setRegisteredAttribute(quint16 attributeId, const QVariant &value) const
{
@@ -111,7 +99,6 @@ bool QBluetoothServiceInfoPrivate::registerService() const
ppsSendControlMessage("register_server", 0x1101, QBluetoothUuid(QStringLiteral("00000000-1111-2222-3334-444444444443")), QString(), 0);
registered = true;
- ppsUnregisterControl(0);
return true;
}