File indexing completed on 2024-07-21 03:45:23

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 namespace NetworkManager
0016 {
0017 class OlpcMeshDevicePrivate;
0018 
0019 /**
0020  * A OLPC mesh interface
0021  */
0022 class NETWORKMANAGERQT_EXPORT OlpcMeshDevice : public Device
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     typedef QSharedPointer<OlpcMeshDevice> Ptr;
0028     typedef QList<Ptr> List;
0029     /**
0030      * Creates a new OlpcMeshDevice object.
0031      *
0032      * @param path the DBus path of the device
0033      */
0034     explicit OlpcMeshDevice(const QString &path, QObject *parent = nullptr);
0035     /**
0036      * Destroys a OlpcMeshDevice object.
0037      */
0038     ~OlpcMeshDevice() override;
0039     /**
0040      * Return the type
0041      */
0042     Type type() const override;
0043     /**
0044      * Currently active channel.
0045      */
0046     uint activeChannel() const;
0047     /**
0048      * The hardware address currently used by the network interface
0049      */
0050     QString hardwareAddress() const;
0051     /**
0052      * The current companion device.
0053      */
0054     Device::Ptr companionDevice() const;
0055 
0056 Q_SIGNALS:
0057     /**
0058      * The active channel changed.
0059      */
0060     void activeChannelChanged(uint);
0061     /**
0062      * The companion changed.
0063      */
0064     void companionChanged(const Device::Ptr &device);
0065     /**
0066      * The device changed its hardware address
0067      */
0068     void hardwareAddressChanged(const QString &);
0069 
0070 private:
0071     Q_DECLARE_PRIVATE(OlpcMeshDevice)
0072 };
0073 
0074 } // namespace NetworkManager
0075 #endif // NETWORKMANAGERQT_OLPCMESHDEVICE_H