1/*
2 SPDX-FileCopyrightText: 2011 Lamarque Souza <lamarque@kde.org>
3 SPDX-FileCopyrightText: 2011 Will Stephenson <wstephenson@kde.org>
4 SPDX-FileCopyrightText: 2011-2013 Lamarque V. Souza <lamarque@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#include "modemdevice.h"
10
11#ifndef NETWORKMANAGERQT_BLUETOOTH_DEVICE_H
12#define NETWORKMANAGERQT_BLUETOOTH_DEVICE_H
13
14#include <networkmanagerqt/networkmanagerqt_export.h>
15
16namespace NetworkManager
17{
18class BluetoothDevicePrivate;
19
20/*!
21 * \class NetworkManager::BluetoothDevice
22 * \inheaderfile NetworkManagerQt/BluetoothDevice
23 * \inmodule NetworkManagerQt
24 *
25 * \brief A bluetooth device interface.
26 */
27class NETWORKMANAGERQT_EXPORT BluetoothDevice : public ModemDevice
28{
29 Q_OBJECT
30
31 /*!
32 * \property NetworkManager::BluetoothDevice::bluetoothCapabilities
33 */
34 Q_PROPERTY(uint bluetoothCapabilities READ bluetoothCapabilities)
35
36 /*!
37 * \property NetworkManager::BluetoothDevice::hardwareAddress
38 */
39 Q_PROPERTY(QString hardwareAddress READ hardwareAddress)
40
41 /*!
42 * \property NetworkManager::BluetoothDevice::name
43 */
44 Q_PROPERTY(QString name READ name)
45
46public:
47 /*!
48 * \typedef NetworkManager::BluetoothDevice::Ptr
49 */
50 typedef QSharedPointer<BluetoothDevice> Ptr;
51 /*!
52 * \typedef NetworkManager::BluetoothDevice::List
53 */
54 typedef QList<Ptr> List;
55 /*!
56 *
57 * Capabilities of the Bluetooth device
58 *
59 * \value NoCapability
60 * No special capability
61 * \value Dun
62 * Dial Up Networking profile
63 * \value Pan
64 * Personal Area Network profile
65 */
66 enum Capability {
67 NoCapability = 0x0,
68 Dun = 0x1,
69 Pan = 0x2,
70 };
71 Q_DECLARE_FLAGS(Capabilities, Capability)
72 Q_FLAG(Capabilities)
73 /*!
74 * Creates a new BluetoothDevice object.
75 */
76 explicit BluetoothDevice(const QString &path, QObject *parent = nullptr);
77 /*!
78 * Destroys a BluetoothDevice object.
79 */
80 ~BluetoothDevice() override;
81
82 /*!
83 * Retrieves the capabilities supported by this device.
84 *
85 * \sa NetworkManager::BluetoothDevice::Capability
86 */
87 Capabilities bluetoothCapabilities() const;
88 /*!
89 * The hardware address assigned to the bluetooth interface
90 */
91 QString hardwareAddress() const;
92 /*!
93 * Name of the bluetooth interface
94 */
95 QString name() const;
96 /*!
97 * The NetworkInterface type.
98 *
99 * Returns the NetworkManager::Device::Type. This always returns NetworkManager::Device::Bluetooth
100 */
101 Type type() const override;
102
103Q_SIGNALS:
104 /*!
105 * Emitted when the BT device \a name changes
106 */
107 void nameChanged(const QString &name);
108
109private:
110 Q_DECLARE_PRIVATE(BluetoothDevice)
111};
112}
113#endif
114

source code of networkmanager-qt/src/bluetoothdevice.h