• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libsolidcontrol

wirednetworkinterface.cpp

Go to the documentation of this file.
00001 /*  This file is part of the KDE project
00002     Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
00003     Copyright (C) 2007 Kevin Ottens <ervin@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License version 2 as published by the Free Software Foundation.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
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     // nothing to do yet
00095 }
00096 #include "wirednetworkinterface.moc"

libsolidcontrol

Skip menu "libsolidcontrol"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal