1 | /* |
2 | SPDX-FileCopyrightText: 2012-2013 Jan Grulich <jgrulich@redhat.com> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
5 | */ |
6 | |
7 | #ifndef NETWORKMANAGERQT_BLUETOOTH_SETTING_H |
8 | #define NETWORKMANAGERQT_BLUETOOTH_SETTING_H |
9 | |
10 | #include "setting.h" |
11 | #include <networkmanagerqt/networkmanagerqt_export.h> |
12 | |
13 | #include <QString> |
14 | |
15 | namespace NetworkManager |
16 | { |
17 | class BluetoothSettingPrivate; |
18 | |
19 | /*! |
20 | * \class NetworkManager::BluetoothSetting |
21 | * \inheaderfile NetworkManagerQt/BluetoothSetting |
22 | * \inmodule NetworkManagerQt |
23 | * |
24 | * \brief Represents bluetooth setting. |
25 | */ |
26 | class NETWORKMANAGERQT_EXPORT BluetoothSetting : public Setting |
27 | { |
28 | public: |
29 | /*! |
30 | * \typedef NetworkManager::BluetoothSetting::Ptr |
31 | */ |
32 | typedef QSharedPointer<BluetoothSetting> Ptr; |
33 | /*! |
34 | * \typedef NetworkManager::BluetoothSetting::List |
35 | */ |
36 | typedef QList<Ptr> List; |
37 | /*! |
38 | * |
39 | * \value Unknown |
40 | * \value Dun |
41 | * \value Panu |
42 | */ |
43 | enum ProfileType { |
44 | Unknown = 0, |
45 | Dun, |
46 | Panu, |
47 | }; |
48 | |
49 | /*! |
50 | */ |
51 | BluetoothSetting(); |
52 | /*! |
53 | */ |
54 | explicit BluetoothSetting(const Ptr &other); |
55 | ~BluetoothSetting() override; |
56 | |
57 | QString name() const override; |
58 | |
59 | /*! |
60 | */ |
61 | void setBluetoothAddress(const QByteArray &address); |
62 | /*! |
63 | */ |
64 | QByteArray bluetoothAddress() const; |
65 | |
66 | /*! |
67 | */ |
68 | void setProfileType(ProfileType type); |
69 | /*! |
70 | */ |
71 | ProfileType profileType() const; |
72 | |
73 | void fromMap(const QVariantMap &setting) override; |
74 | |
75 | QVariantMap toMap() const override; |
76 | |
77 | protected: |
78 | BluetoothSettingPrivate *d_ptr; |
79 | |
80 | private: |
81 | Q_DECLARE_PRIVATE(BluetoothSetting) |
82 | }; |
83 | |
84 | NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const BluetoothSetting &setting); |
85 | |
86 | } |
87 | |
88 | #endif // NETWORKMANAGERQT_SETTINGS_BLUETOOTH_H |
89 | |