File indexing completed on 2024-04-21 04:00:00

0001 /*
0002     SPDX-FileCopyrightText: 2012-2013 Jan Grulich <jgrulich@redhat.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #ifndef NETWORKMANAGERQT_BLUETOOTH_SETTING_H
0008 #define NETWORKMANAGERQT_BLUETOOTH_SETTING_H
0009 
0010 #include "setting.h"
0011 #include <networkmanagerqt/networkmanagerqt_export.h>
0012 
0013 #include <QString>
0014 
0015 namespace NetworkManager
0016 {
0017 class BluetoothSettingPrivate;
0018 
0019 /**
0020  * Represents bluetooth setting
0021  */
0022 class NETWORKMANAGERQT_EXPORT BluetoothSetting : public Setting
0023 {
0024 public:
0025     typedef QSharedPointer<BluetoothSetting> Ptr;
0026     typedef QList<Ptr> List;
0027     enum ProfileType {
0028         Unknown = 0,
0029         Dun,
0030         Panu,
0031     };
0032 
0033     BluetoothSetting();
0034     explicit BluetoothSetting(const Ptr &other);
0035     ~BluetoothSetting() override;
0036 
0037     QString name() const override;
0038 
0039     void setBluetoothAddress(const QByteArray &address);
0040     QByteArray bluetoothAddress() const;
0041 
0042     void setProfileType(ProfileType type);
0043     ProfileType profileType() const;
0044 
0045     void fromMap(const QVariantMap &setting) override;
0046 
0047     QVariantMap toMap() const override;
0048 
0049 protected:
0050     BluetoothSettingPrivate *d_ptr;
0051 
0052 private:
0053     Q_DECLARE_PRIVATE(BluetoothSetting)
0054 };
0055 
0056 NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const BluetoothSetting &setting);
0057 
0058 }
0059 
0060 #endif // NETWORKMANAGERQT_SETTINGS_BLUETOOTH_H