File indexing completed on 2024-09-01 13:32:09
0001 /* 0002 SPDX-FileCopyrightText: 2011 Ilia Kats <ilia-kats@gmx.net> 0003 SPDX-FileCopyrightText: 2011-2013 Lamarque Souza <lamarque@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 */ 0007 0008 #ifndef NETWORKMANAGERQT_OLPCMESHDEVICE_H 0009 #define NETWORKMANAGERQT_OLPCMESHDEVICE_H 0010 0011 #include "device.h" 0012 0013 #include <networkmanagerqt/networkmanagerqt_export.h> 0014 0015 #include <QDBusObjectPath> 0016 0017 namespace NetworkManager 0018 { 0019 class OlpcMeshDevicePrivate; 0020 0021 /** 0022 * A OLPC mesh interface 0023 */ 0024 class NETWORKMANAGERQT_EXPORT OlpcMeshDevice : public Device 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 typedef QSharedPointer<OlpcMeshDevice> Ptr; 0030 typedef QList<Ptr> List; 0031 /** 0032 * Creates a new OlpcMeshDevice object. 0033 * 0034 * @param path the DBus path of the device 0035 */ 0036 explicit OlpcMeshDevice(const QString &path, QObject *parent = nullptr); 0037 /** 0038 * Destroys a OlpcMeshDevice object. 0039 */ 0040 ~OlpcMeshDevice() override; 0041 /** 0042 * Return the type 0043 */ 0044 Type type() const override; 0045 /** 0046 * Currently active channel. 0047 */ 0048 uint activeChannel() const; 0049 /** 0050 * The hardware address currently used by the network interface 0051 */ 0052 QString hardwareAddress() const; 0053 /** 0054 * The current companion device. 0055 */ 0056 Device::Ptr companionDevice() const; 0057 0058 Q_SIGNALS: 0059 /** 0060 * The active channel changed. 0061 */ 0062 void activeChannelChanged(uint); 0063 /** 0064 * The companion changed. 0065 */ 0066 void companionChanged(const Device::Ptr &device); 0067 /** 0068 * The device changed its hardware address 0069 */ 0070 void hardwareAddressChanged(const QString &); 0071 0072 private: 0073 Q_DECLARE_PRIVATE(OlpcMeshDevice) 0074 }; 0075 0076 } // namespace NetworkManager 0077 #endif // NETWORKMANAGERQT_OLPCMESHDEVICE_H