libsolidcontrol
wirednetworkinterface.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "wirednetworkinterface.h"
00022 #include "wirednetworkinterface_p.h"
00023
00024 #include "soliddefs_p.h"
00025 #include "ifaces/wirednetworkinterface.h"
00026
00027 Solid::Control::WiredNetworkInterface::WiredNetworkInterface(QObject *backendObject)
00028 : NetworkInterface(*new WiredNetworkInterfacePrivate(this), backendObject)
00029 {
00030 Q_D(WiredNetworkInterface);
00031 d->setBackendObject(backendObject);
00032 }
00033
00034 Solid::Control::WiredNetworkInterface::WiredNetworkInterface(const WiredNetworkInterface &networkinterface)
00035 : NetworkInterface(*new WiredNetworkInterfacePrivate(this), networkinterface)
00036 {
00037 Q_D(WiredNetworkInterface);
00038 d->setBackendObject(networkinterface.d_ptr->backendObject());
00039 }
00040
00041 Solid::Control::WiredNetworkInterface::WiredNetworkInterface(WiredNetworkInterfacePrivate &dd, QObject *backendObject)
00042 : NetworkInterface(dd, backendObject)
00043 {
00044 }
00045
00046 Solid::Control::WiredNetworkInterface::WiredNetworkInterface(WiredNetworkInterfacePrivate &dd, const WiredNetworkInterface &network)
00047 : NetworkInterface(dd, network.d_ptr->backendObject())
00048 {
00049 }
00050
00051 Solid::Control::WiredNetworkInterface::~WiredNetworkInterface()
00052 {
00053
00054 }
00055
00056 Solid::Control::NetworkInterface::Type Solid::Control::WiredNetworkInterface::type() const
00057 {
00058 return Ieee8023;
00059 }
00060
00061 QString Solid::Control::WiredNetworkInterface::hardwareAddress() const
00062 {
00063 Q_D(const WiredNetworkInterface);
00064 return_SOLID_CALL(Ifaces::WiredNetworkInterface *, d->backendObject(), QString(), hardwareAddress());
00065 }
00066
00067 int Solid::Control::WiredNetworkInterface::bitRate() const
00068 {
00069 Q_D(const WiredNetworkInterface);
00070 return_SOLID_CALL(Ifaces::WiredNetworkInterface *, d->backendObject(), 0, bitRate());
00071 }
00072
00073 bool Solid::Control::WiredNetworkInterface::carrier() const
00074 {
00075 Q_D(const WiredNetworkInterface);
00076 return_SOLID_CALL(Ifaces::WiredNetworkInterface *, d->backendObject(), false, carrier());
00077 }
00078
00079 void Solid::Control::WiredNetworkInterfacePrivate::setBackendObject(QObject *object)
00080 {
00081 NetworkInterfacePrivate::setBackendObject(object);
00082
00083 if (object) {
00084 QObject::connect(object, SIGNAL(bitRateChanged(int)),
00085 parent(), SIGNAL(bitRateChanged(int)));
00086 QObject::connect(object, SIGNAL(carrierChanged(bool)),
00087 parent(), SIGNAL(carrierChanged(bool)));
00088 }
00089 }
00090
00091 void Solid::Control::WiredNetworkInterface::_k_destroyed(QObject *object)
00092 {
00093 Q_UNUSED(object);
00094
00095 }
00096 #include "wirednetworkinterface.moc"