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
#include "wirednetworkinterface.h"
22
#include "wirednetworkinterface_p.h"
24
#include "soliddefs_p.h"
25
#include "ifaces/wirednetworkinterface.h"
27
Solid::Control::WiredNetworkInterface::WiredNetworkInterface(QObject *backendObject)
28
: NetworkInterface(*new WiredNetworkInterfacePrivate(this), backendObject)
30
Q_D(WiredNetworkInterface);
31
d->setBackendObject(backendObject);
34
Solid::Control::WiredNetworkInterface::WiredNetworkInterface(const WiredNetworkInterface &networkinterface)
35
: NetworkInterface(*new WiredNetworkInterfacePrivate(this), networkinterface)
37
Q_D(WiredNetworkInterface);
38
d->setBackendObject(networkinterface.d_ptr->backendObject());
41
Solid::Control::WiredNetworkInterface::WiredNetworkInterface(WiredNetworkInterfacePrivate &dd, QObject *backendObject)
42
: NetworkInterface(dd, backendObject)
46
Solid::Control::WiredNetworkInterface::WiredNetworkInterface(WiredNetworkInterfacePrivate &dd, const WiredNetworkInterface &network)
47
: NetworkInterface(dd, network.d_ptr->backendObject())
51
Solid::Control::WiredNetworkInterface::~WiredNetworkInterface()
56
Solid::Control::NetworkInterface::Type Solid::Control::WiredNetworkInterface::type() const
61
QString Solid::Control::WiredNetworkInterface::hardwareAddress() const
63
Q_D(const WiredNetworkInterface);
64
return_SOLID_CALL(Ifaces::WiredNetworkInterface *, d->backendObject(), QString(), hardwareAddress());
67
int Solid::Control::WiredNetworkInterface::bitRate() const
69
Q_D(const WiredNetworkInterface);
70
return_SOLID_CALL(Ifaces::WiredNetworkInterface *, d->backendObject(), 0, bitRate());
73
bool Solid::Control::WiredNetworkInterface::carrier() const
75
Q_D(const WiredNetworkInterface);
76
return_SOLID_CALL(Ifaces::WiredNetworkInterface *, d->backendObject(), false, carrier());
79
void Solid::Control::WiredNetworkInterfacePrivate::setBackendObject(QObject *object)
81
NetworkInterfacePrivate::setBackendObject(object);
84
QObject::connect(object, SIGNAL(bitRateChanged(int)),
85
parent(), SIGNAL(bitRateChanged(int)));
86
QObject::connect(object, SIGNAL(carrierChanged(bool)),
87
parent(), SIGNAL(carrierChanged(bool)));
91
void Solid::Control::WiredNetworkInterface::_k_destroyed(QObject *object)
96
#include "wirednetworkinterface.moc"