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

libsolidcontrol

networkinterface.h

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 #ifndef SOLID_CONTROL_NETWORKINTERFACE_H
00022 #define SOLID_CONTROL_NETWORKINTERFACE_H
00023 
00024 #include <QtCore/QObject>
00025 #include <QtCore/QStringList>
00026 #include <QtNetwork/QNetworkAddressEntry>
00027 
00028 #include "solid_control_export.h"
00029 
00030 #include "networkipv4config.h"
00031 
00032 namespace Solid
00033 {
00034 namespace Control
00035 {
00036     class NetworkInterfacePrivate;
00037 
00041     class SOLIDCONTROL_EXPORT NetworkInterface : public QObject
00042     {
00043     Q_OBJECT
00044     Q_ENUMS(ConnectionState Capability Type)
00045     Q_FLAGS(Capabilities)
00046     Q_DECLARE_PRIVATE(NetworkInterface)
00047 
00048     public:
00049         // == NM ActivationStage
00056         enum ConnectionState{ UnknownState, Unmanaged, Unavailable, Disconnected, Preparing,
00057                               Configuring, NeedAuth, IPConfig, Activated, Failed };
00064         enum Capability { IsManageable = 0x1, SupportsCarrierDetect = 0x2 };
00072         enum Type { UnknownType, Ieee8023, Ieee80211, Serial, Gsm, Cdma };
00073 
00074         Q_DECLARE_FLAGS(Capabilities, Capability)
00075 
00076         
00081         explicit NetworkInterface(QObject *backendObject);
00082 
00088         NetworkInterface(const NetworkInterface &network);
00089 
00093         virtual ~NetworkInterface();
00094 
00101         virtual Type type() const;
00102 
00109         QString uni() const;
00110 
00114         QString interfaceName() const;
00115 
00119         QString driver() const;
00120 
00121         Solid::Control::IPv4Config ipV4Config() const;
00127         bool isActive() const;
00128 
00137         ConnectionState connectionState() const;
00138 
00146         int designSpeed() const;
00147 
00153         Capabilities capabilities() const;
00154 
00155     Q_SIGNALS:
00159         void ipDetailsChanged();
00160 
00167         void linkUpChanged(bool linkActivated);
00168 
00176         void connectionStateChanged(int state);
00177 
00178     protected:
00182         NetworkInterface(NetworkInterfacePrivate &dd, QObject *backendObject);
00183 
00187         NetworkInterface(NetworkInterfacePrivate &dd, const NetworkInterface &network);
00188 
00189         NetworkInterfacePrivate *d_ptr;
00190 
00191     private:
00192     //HACK: to make NetworkList polymorphic (containing both wired and wireless networks, I used Network * here - Will.
00193     };
00194     typedef QList<NetworkInterface *> NetworkInterfaceList;
00195 
00196 
00197 } //Control
00198 } //Solid
00199 
00200 Q_DECLARE_OPERATORS_FOR_FLAGS(Solid::Control::NetworkInterface::Capabilities)
00201 
00202 #endif //SOLID_CONTROL_NETWORKINTERFACE_H
00203 

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