NetworkManagerQt

vlandevice.h
1/*
2 SPDX-FileCopyrightText: 2013 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_VLAN_DEVICE_H
8#define NETWORKMANAGERQT_VLAN_DEVICE_H
9
10#include "device.h"
11#include <networkmanagerqt/networkmanagerqt_export.h>
12
13namespace NetworkManager
14{
15class VlanDevicePrivate;
16
17/**
18 * A vlan device interface
19 */
20class NETWORKMANAGERQT_EXPORT VlanDevice : public Device
21{
22 Q_OBJECT
23 Q_PROPERTY(bool carrier READ carrier NOTIFY carrierChanged)
24 Q_PROPERTY(QString hwAddress READ hwAddress NOTIFY hwAddressChanged)
25 Q_PROPERTY(uint vlanId READ vlanId NOTIFY vlanIdChanged)
26 Q_PROPERTY(NetworkManager::Device::Ptr parent READ parent NOTIFY parentChanged)
27
28public:
30 typedef QList<Ptr> List;
31
32 explicit VlanDevice(const QString &path, QObject *parent = nullptr);
33 ~VlanDevice() override;
34
35 Type type() const override;
36
37 /**
38 * Indicates whether the physical carrier is found
39 */
40 bool carrier() const;
41 /**
42 * Hardware address of the device
43 */
44 QString hwAddress() const;
45 /**
46 * The parent device of this VLAN device
47 * @since 5.8.0
48 */
49 NetworkManager::Device::Ptr parent() const;
50 /**
51 * The VLAN ID of this VLAN interface
52 */
53 uint vlanId() const;
54
55Q_SIGNALS:
56 /**
57 * Emitted when the carrier of this device has changed
58 */
59 void carrierChanged(bool plugged);
60 /**
61 * Emitted when the hardware address of this device has changed
62 */
63 void hwAddressChanged(const QString &address);
64 /**
65 * Emitted when the parent device of this device has changed
66 */
67 void parentChanged(const QString &path);
68 /**
69 * Emitted when the VLAN ID of this device has changed
70 */
71 void vlanIdChanged(uint id);
72
73private:
74 Q_DECLARE_PRIVATE(VlanDevice)
75};
76
77}
78
79#endif
This class represents a common device interface.
Definition device.h:34
Type
Device type.
Definition device.h:191
A vlan device interface.
Definition vlandevice.h:21
void parentChanged(const QString &path)
Emitted when the parent device of this device has changed.
void vlanIdChanged(uint id)
Emitted when the VLAN ID of this device has changed.
void hwAddressChanged(const QString &address)
Emitted when the hardware address of this device has changed.
void carrierChanged(bool plugged)
Emitted when the carrier of this device has changed.
This class allows querying the underlying system to discover the available network interfaces and rea...
Definition accesspoint.h:21
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.