libsolidcontrol
networkinterface.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 "networkinterface.h"
00022 #include "networkinterface_p.h"
00023
00024 #include "soliddefs_p.h"
00025 #include "ifaces/networkinterface.h"
00026
00027 Solid::Control::NetworkInterface::NetworkInterface(QObject *backendObject)
00028 : QObject(), d_ptr(new NetworkInterfacePrivate(this))
00029 {
00030 Q_D(NetworkInterface);
00031 d->setBackendObject(backendObject);
00032 }
00033
00034 Solid::Control::NetworkInterface::NetworkInterface(const NetworkInterface &other)
00035 : QObject(), d_ptr(new NetworkInterfacePrivate(this))
00036 {
00037 Q_D(NetworkInterface);
00038 d->setBackendObject(other.d_ptr->backendObject());
00039 }
00040
00041 Solid::Control::NetworkInterface::NetworkInterface(NetworkInterfacePrivate &dd, QObject *backendObject)
00042 : QObject(), d_ptr(&dd)
00043 {
00044 Q_UNUSED(backendObject);
00045 }
00046
00047 Solid::Control::NetworkInterface::NetworkInterface(NetworkInterfacePrivate &dd, const NetworkInterface &other)
00048 : d_ptr(&dd)
00049 {
00050 Q_UNUSED(other);
00051 }
00052
00053 Solid::Control::NetworkInterface::~NetworkInterface()
00054 {
00055 delete d_ptr;
00056 }
00057
00058 Solid::Control::NetworkInterface::Type Solid::Control::NetworkInterface::type() const
00059 {
00060 return UnknownType;
00061 }
00062
00063 QString Solid::Control::NetworkInterface::uni() const
00064 {
00065 Q_D(const NetworkInterface);
00066 return_SOLID_CALL(Ifaces::NetworkInterface *, d->backendObject(), QString(), uni());
00067 }
00068
00069 QString Solid::Control::NetworkInterface::interfaceName() const
00070 {
00071 Q_D(const NetworkInterface);
00072 return_SOLID_CALL(Ifaces::NetworkInterface *, d->backendObject(), QString(), interfaceName());
00073 }
00074
00075 QString Solid::Control::NetworkInterface::driver() const
00076 {
00077 Q_D(const NetworkInterface);
00078 return_SOLID_CALL(Ifaces::NetworkInterface *, d->backendObject(), QString(), driver());
00079 }
00080
00081 Solid::Control::IPv4Config Solid::Control::NetworkInterface::ipV4Config() const
00082 {
00083 Q_D(const NetworkInterface);
00084 return_SOLID_CALL(Ifaces::NetworkInterface *, d->backendObject(), Solid::Control::IPv4Config(), ipV4Config() );
00085 }
00086
00087 bool Solid::Control::NetworkInterface::isActive() const
00088 {
00089 Q_D(const NetworkInterface);
00090 return_SOLID_CALL(Ifaces::NetworkInterface *, d->backendObject(), false, isActive());
00091 }
00092
00093 Solid::Control::NetworkInterface::ConnectionState Solid::Control::NetworkInterface::connectionState() const
00094 {
00095 Q_D(const NetworkInterface);
00096 return_SOLID_CALL(Ifaces::NetworkInterface *, d->backendObject(), UnknownState, connectionState());
00097 }
00098
00099 int Solid::Control::NetworkInterface::designSpeed() const
00100 {
00101 Q_D(const NetworkInterface);
00102 return_SOLID_CALL(Ifaces::NetworkInterface *, d->backendObject(), 0, designSpeed());
00103 }
00104
00105 Solid::Control::NetworkInterface::Capabilities Solid::Control::NetworkInterface::capabilities() const
00106 {
00107 Q_D(const NetworkInterface);
00108 return_SOLID_CALL(Ifaces::NetworkInterface *, d->backendObject(), Capabilities(), capabilities());
00109 }
00110
00111 void Solid::Control::NetworkInterfacePrivate::setBackendObject(QObject *object)
00112 {
00113 FrontendObjectPrivate::setBackendObject(object);
00114
00115 if (object) {
00116 QObject::connect(object, SIGNAL(connectionStateChanged(int)),
00117 parent(), SIGNAL(connectionStateChanged(int)));
00118 }
00119 }
00120
00121
00122 #include "networkinterface.moc"