Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qbluetoothlocaldevice_p.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
6
8#ifndef QT_IOS_BLUETOOTH
9#include "dummy/dummy_helper_p.h"
10#endif
11
13
14QBluetoothLocalDevice::QBluetoothLocalDevice(QObject *parent) :
15 QObject(parent),
16 d_ptr(new QBluetoothLocalDevicePrivate(this, QBluetoothAddress()))
17{
18#if !defined(QT_IOS_BLUETOOTH)
19 printDummyWarning();
20#endif
21 registerQBluetoothLocalDeviceMetaType();
22}
23
24QBluetoothLocalDevice::QBluetoothLocalDevice(const QBluetoothAddress &address, QObject *parent) :
25 QObject(parent),
26 d_ptr(new QBluetoothLocalDevicePrivate(this, address))
27{
28 registerQBluetoothLocalDeviceMetaType();
29}
30
31QString QBluetoothLocalDevice::name() const
32{
33 return QString();
34}
35
36QBluetoothAddress QBluetoothLocalDevice::address() const
37{
38 return QBluetoothAddress();
39}
40
41void QBluetoothLocalDevice::powerOn()
42{
43}
44
45void QBluetoothLocalDevice::setHostMode(QBluetoothLocalDevice::HostMode mode)
46{
47 Q_UNUSED(mode);
48}
49
50QBluetoothLocalDevice::HostMode QBluetoothLocalDevice::hostMode() const
51{
52 return HostPoweredOff;
53}
54
55QList<QBluetoothAddress> QBluetoothLocalDevice::connectedDevices() const
56{
57 return QList<QBluetoothAddress>();
58}
59
60QList<QBluetoothHostInfo> QBluetoothLocalDevice::allDevices()
61{
62 QList<QBluetoothHostInfo> localDevices;
63 return localDevices;
64}
65
66void QBluetoothLocalDevice::requestPairing(const QBluetoothAddress &address, Pairing pairing)
67{
68 Q_UNUSED(address);
69 Q_UNUSED(pairing);
70 QMetaObject::invokeMethod(this, "errorOccurred", Qt::QueuedConnection,
71 Q_ARG(QBluetoothLocalDevice::Error,
72 QBluetoothLocalDevice::PairingError));
73}
74
75QBluetoothLocalDevice::Pairing QBluetoothLocalDevice::pairingStatus(
76 const QBluetoothAddress &address) const
77{
78 Q_UNUSED(address);
79 return Unpaired;
80}
81
82QT_END_NAMESPACE