not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / libs / solid / control / wirednetworkinterface.h
blob5a6fb72ffb340900c8d343aa0add95e8bf8fdfeb
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"
28 namespace Solid
30 namespace Control
32 class WiredNetworkInterfacePrivate;
34 /**
35 * This interface represents a wired Ethernet network interface
37 class SOLIDCONTROL_EXPORT WiredNetworkInterface : public NetworkInterface
39 Q_OBJECT
40 Q_DECLARE_PRIVATE(WiredNetworkInterface)
42 public:
43 /**
44 * Creates a new WiredNetworkInterface object.
46 * @param backendObject the network object provided by the backend
48 WiredNetworkInterface(QObject *backendObject = 0);
50 /**
51 * Constructs a copy of a network.
53 * @param network the network to copy
55 WiredNetworkInterface(const WiredNetworkInterface &network);
57 /**
58 * Destroys a WiredNetworkInterface object.
60 virtual ~WiredNetworkInterface();
62 /**
63 * The NetworkInterface type.
65 * @return the NetworkInterface::Type. This always returns NetworkInterface::Ieee8023
67 virtual NetworkInterface::Type type() const;
69 /**
70 * The hardware address assigned to the network interface
72 QString hardwareAddress() const;
74 /**
75 * Retrieves the effective bit rate currently attainable by this device.
77 * @return the bitrate in bit/s
79 int bitRate() const;
81 /**
82 * Indicates if the network interfaces sees a carrier.
84 * @return true if there's a carrier, false otherwise
86 bool carrier() const;
88 Q_SIGNALS:
89 /**
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);
96 /**
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);
101 protected:
103 * @internal
105 WiredNetworkInterface(WiredNetworkInterfacePrivate &dd, QObject *backendObject);
108 * @internal
110 WiredNetworkInterface(WiredNetworkInterfacePrivate &dd, const WiredNetworkInterface &network);
112 private Q_SLOTS:
113 void _k_destroyed(QObject *object);
114 private:
115 friend class NetworkInterface;
116 friend class NetworkInterfacePrivate;
118 } //Control
119 } //Solid
121 #endif //SOLID_CONTROL_WIREDNETWORKINTERFACE_H