NetworkManagerQt

fakenetwork/wirelessdevice.h
1/*
2 SPDX-FileCopyrightText: 2014 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_FAKE_NETWORK_WIRELESS_DEVICE_H
8#define NETWORKMANAGERQT_FAKE_NETWORK_WIRELESS_DEVICE_H
9
10#include <QObject>
11
12#include <QDBusObjectPath>
13
14#include "../device.h"
15#include "../generictypes.h"
16
17#include "accesspoint.h"
18#include "device.h"
19
20class WirelessDevice : public Device
21{
23 Q_CLASSINFO("D-Bus Interface", "org.kde.fakenetwork.Device.Wireless")
24public:
25 explicit WirelessDevice(QObject *parent = nullptr);
26 ~WirelessDevice() override;
27
28 Q_PROPERTY(QList<QDBusObjectPath> AccessPoints READ accessPoints)
29 Q_PROPERTY(QDBusObjectPath ActiveAccessPoint READ activeAccessPoint)
30 Q_PROPERTY(uint Bitrate READ bitrate)
31 Q_PROPERTY(QString HwAddress READ hwAddress)
32 Q_PROPERTY(uint Mode READ mode)
33 Q_PROPERTY(QString PermHwAddress READ permHwAddress)
34 Q_PROPERTY(uint WirelessCapabilities READ wirelessCapabilities)
35
36 QList<QDBusObjectPath> accessPoints() const;
37 QDBusObjectPath activeAccessPoint() const;
38 uint bitrate() const;
39 QString hwAddress() const;
40 uint mode() const;
41 QString permHwAddress() const;
42 uint wirelessCapabilities() const;
43
44 /* Not part of DBus interface */
45 void addAccessPoint(AccessPoint *accessPoint);
46 void removeAccessPoint(AccessPoint *accessPoint);
47 void setActiveAccessPoint(const QString &activeAccessPoint);
48 void setBitrate(uint bitrate);
49 void setHwAddress(const QString &hwAddress);
50 void setMode(uint mode);
51 void setPermHwAddress(const QString &permHwAddress);
52 void setState(uint state) override;
53 void setWirelessCapabilities(uint capabilities);
54
55public Q_SLOTS:
56 Q_SCRIPTABLE QList<QDBusObjectPath> GetAccessPoints();
57 Q_SCRIPTABLE QList<QDBusObjectPath> GetAllAccessPoints();
58 Q_SCRIPTABLE void RequestScan(const QVariantMap &options);
59
61 Q_SCRIPTABLE void AccessPointAdded(const QDBusObjectPath &access_point);
62 Q_SCRIPTABLE void AccessPointRemoved(const QDBusObjectPath &access_point);
63 Q_SCRIPTABLE void PropertiesChanged(const QVariantMap &properties);
64
65private:
66 QMap<QDBusObjectPath, AccessPoint *> m_accessPoints;
67 QDBusObjectPath m_activeAccessPoint;
68 uint m_bitrate;
69 QString m_hwAddress;
70 uint m_mode;
71 QString m_permHwAddress;
72 uint m_wirelessCapabilities;
73
74 /* Not part of DBus interface */
75 int m_accessPointCounter;
76};
77
78#endif
Q_CLASSINFO(Name, Value)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:21 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.