1 | /* |
2 | SPDX-FileCopyrightText: 2011 Ilia Kats <ilia-kats@gmx.net> |
3 | SPDX-FileCopyrightText: 2011-2013 Lamarque Souza <lamarque@kde.org> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
6 | */ |
7 | |
8 | #ifndef NETWORKMANAGERQT_OLPCMESHDEVICE_H |
9 | #define NETWORKMANAGERQT_OLPCMESHDEVICE_H |
10 | |
11 | #include "device.h" |
12 | |
13 | #include <networkmanagerqt/networkmanagerqt_export.h> |
14 | |
15 | namespace NetworkManager |
16 | { |
17 | class OlpcMeshDevicePrivate; |
18 | |
19 | /*! |
20 | * \class NetworkManager::OlpcMeshDevice |
21 | * \inheaderfile NetworkManagerQt/OlpcMeshDevice |
22 | * \inmodule NetworkManagerQt |
23 | * |
24 | * \brief A OLPC mesh interface. |
25 | */ |
26 | class NETWORKMANAGERQT_EXPORT OlpcMeshDevice : public Device |
27 | { |
28 | Q_OBJECT |
29 | |
30 | public: |
31 | /*! |
32 | * \typedef NetworkManager::OlpcMeshDevice::Ptr |
33 | */ |
34 | typedef QSharedPointer<OlpcMeshDevice> Ptr; |
35 | /*! |
36 | * \typedef NetworkManager::OlpcMeshDevice::List |
37 | */ |
38 | typedef QList<Ptr> List; |
39 | /*! |
40 | * Creates a new OlpcMeshDevice object. |
41 | * |
42 | * \a path the DBus path of the device |
43 | */ |
44 | explicit OlpcMeshDevice(const QString &path, QObject *parent = nullptr); |
45 | /*! |
46 | * Destroys a OlpcMeshDevice object. |
47 | */ |
48 | ~OlpcMeshDevice() override; |
49 | /*! |
50 | * Return the type |
51 | */ |
52 | Type type() const override; |
53 | /*! |
54 | * Currently active channel. |
55 | */ |
56 | uint activeChannel() const; |
57 | /*! |
58 | * The hardware address currently used by the network interface |
59 | */ |
60 | QString hardwareAddress() const; |
61 | /*! |
62 | * The current companion device. |
63 | */ |
64 | Device::Ptr companionDevice() const; |
65 | |
66 | Q_SIGNALS: |
67 | /*! |
68 | * The active channel changed. |
69 | */ |
70 | void activeChannelChanged(uint); |
71 | /*! |
72 | * The companion changed. |
73 | */ |
74 | void companionChanged(const Device::Ptr &device); |
75 | /*! |
76 | * The device changed its hardware address |
77 | */ |
78 | void hardwareAddressChanged(const QString &); |
79 | |
80 | private: |
81 | Q_DECLARE_PRIVATE(OlpcMeshDevice) |
82 | }; |
83 | |
84 | } // namespace NetworkManager |
85 | #endif // NETWORKMANAGERQT_OLPCMESHDEVICE_H |
86 | |