1 /* This file is part of the KDE project
2 Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
3 Copyright (C) 2007 Kevin Ottens <ervin@kde.org>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
21 #ifndef SOLID_CONTROL_WIREDNETWORKINTERFACE_H
22 #define SOLID_CONTROL_WIREDNETWORKINTERFACE_H
24 #include "solid_control_export.h"
26 #include "networkinterface.h"
32 class WiredNetworkInterfacePrivate
;
35 * This interface represents a wired Ethernet network interface
37 class SOLIDCONTROL_EXPORT WiredNetworkInterface
: public NetworkInterface
40 Q_DECLARE_PRIVATE(WiredNetworkInterface
)
44 * Creates a new WiredNetworkInterface object.
46 * @param backendObject the network object provided by the backend
48 WiredNetworkInterface(QObject
*backendObject
= 0);
51 * Constructs a copy of a network.
53 * @param network the network to copy
55 WiredNetworkInterface(const WiredNetworkInterface
&network
);
58 * Destroys a WiredNetworkInterface object.
60 virtual ~WiredNetworkInterface();
63 * The NetworkInterface type.
65 * @return the NetworkInterface::Type. This always returns NetworkInterface::Ieee8023
67 virtual NetworkInterface::Type
type() const;
70 * The hardware address assigned to the network interface
72 QString
hardwareAddress() const;
75 * Retrieves the effective bit rate currently attainable by this device.
77 * @return the bitrate in bit/s
82 * Indicates if the network interfaces sees a carrier.
84 * @return true if there's a carrier, false otherwise
90 * This signal is emitted when the bitrate of this network has changed.
92 * @param bitrate the new bitrate value for this network
94 void bitRateChanged(int bitRate
);
97 * This signal indicates if the physical carrier changed state (eg if the network cable was
98 * plugged or unplugged)
100 void carrierChanged(bool plugged
);
105 WiredNetworkInterface(WiredNetworkInterfacePrivate
&dd
, QObject
*backendObject
);
110 WiredNetworkInterface(WiredNetworkInterfacePrivate
&dd
, const WiredNetworkInterface
&network
);
113 void _k_destroyed(QObject
*object
);
115 friend class NetworkInterface
;
116 friend class NetworkInterfacePrivate
;
121 #endif //SOLID_CONTROL_WIREDNETWORKINTERFACE_H