NetworkManagerQt

bluetoothdevice.h
1 /*
2  SPDX-FileCopyrightText: 2011 Lamarque Souza <[email protected]>
3  SPDX-FileCopyrightText: 2011 Will Stephenson <[email protected]>
4  SPDX-FileCopyrightText: 2011-2013 Lamarque V. Souza <[email protected]>
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 
16 namespace NetworkManager
17 {
18 class BluetoothDevicePrivate;
19 
20 /**
21  * A bluetooth device interface
22  */
23 class NETWORKMANAGERQT_EXPORT BluetoothDevice : public ModemDevice
24 {
25  Q_OBJECT
26 
27  Q_PROPERTY(uint bluetoothCapabilities READ bluetoothCapabilities)
28  Q_PROPERTY(QString hardwareAddress READ hardwareAddress)
29  Q_PROPERTY(QString name READ name)
30 
31 public:
33  typedef QList<Ptr> List;
34  /**
35  * Capabilities of the Bluetooth device
36  */
37  enum Capability {
38  NoCapability = 0x0, /**< No special capability */
39  Dun = 0x1, /**< Dial Up Networking profile */
40  Pan = 0x2, /**< Personal Area Network profile */
41  };
42  Q_DECLARE_FLAGS(Capabilities, Capability)
43  Q_FLAG(Capabilities)
44  /**
45  * Creates a new BluetoothDevice object.
46  */
47  explicit BluetoothDevice(const QString &path, QObject *parent = nullptr);
48  /**
49  * Destroys a BluetoothDevice object.
50  */
51  ~BluetoothDevice() override;
52 
53  /**
54  * Retrieves the capabilities supported by this device.
55  *
56  * @return the capabilities of the device
57  * @see NetworkManager::BluetoothDevice::Capability
58  */
59  Capabilities bluetoothCapabilities() const;
60  /**
61  * The hardware address assigned to the bluetooth interface
62  */
63  QString hardwareAddress() const;
64  /**
65  * Name of the bluetooth interface
66  */
67  QString name() const;
68  /**
69  * The NetworkInterface type.
70  *
71  * @return the NetworkManager::Device::Type. This always returns NetworkManager::Device::Bluetooth
72  */
73  Type type() const override;
74 
75 Q_SIGNALS:
76  /**
77  * Emitted when the BT device @p name changes
78  */
79  void nameChanged(const QString &name);
80 
81 private:
82  Q_DECLARE_PRIVATE(BluetoothDevice)
83 };
84 }
85 #endif
Represents a generic modem device, generally defined by the modemCapabilities() it exposes and at the...
Definition: modemdevice.h:23
Capability
Capabilities of the Bluetooth device.
This class allows querying the underlying system to discover the available network interfaces and rea...
Definition: accesspoint.h:20
A bluetooth device interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Oct 3 2023 03:57:05 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.