not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / libs / solid / control / ifaces / networkinterface.h
blob7885e36f3829032ddcdcb7c504da20e6e05bf6f3
1 /* This file is part of the KDE project
2 Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
20 #ifndef SOLID_CONTROL_IFACES_NETWORKINTERFACE_H
21 #define SOLID_CONTROL_IFACES_NETWORKINTERFACE_H
23 #include "../solid_control_export.h"
24 #include "../networkinterface.h"
25 #include <QtCore/QObject>
26 #include <QtCore/QList>
28 namespace Solid
30 namespace Control
32 namespace Ifaces
34 /**
35 * Represents a generic network interface as seen by the networking subsystem.
37 * For specialized interfaces @see Solid::Control::Ifaces::WiredNetworkInterface and @see
38 * Solid::Control::Ifaces::WirelessNetworkInterface
40 class SOLIDCONTROLIFACES_EXPORT NetworkInterface
42 public:
43 /**
44 * Destroys a NetworkInterface object.
46 virtual ~NetworkInterface();
48 /**
49 * Retrieves the Unique Network Identifier (UNI) of the Network.
50 * This identifier is unique for each network and network interface in the system.
52 * @returns the Unique Network Identifier of the current network
54 virtual QString uni() const = 0;
55 /**
56 * The system name for the network interface
58 virtual QString interfaceName() const = 0;
60 /**
61 * Handle for the system driver controlling this network interface
63 virtual QString driver() const = 0;
65 /**
66 * Access the network configuration for this object
68 virtual Solid::Control::IPv4Config ipV4Config() const = 0;
70 /**
71 * Retrieves the activation status of this network interface.
73 * @return true if this network interface is active, false otherwise
75 virtual bool isActive() const = 0;
76 /**
77 * Retrieves the current state of the network connection held by this device.
78 * It's a high level view of the connection. It's user oriented so technically
79 * it provides states coming from different layers.
81 * @return the current connection state
82 * @see Solid::Control::NetworkInterface::ConnectionState
84 virtual Solid::Control::NetworkInterface::ConnectionState connectionState() const = 0;
85 /**
86 * Retrieves the maximum speed as reported by the device. Note that it's a design
87 * related information and that the device might not reach this maximum.
89 * @return the device maximum speed
91 virtual int designSpeed() const = 0;
93 /**
94 * Retrieves the capabilities supported by this device.
96 * @return the capabilities of the device
97 * @see Solid::Control::NetworkInterface::Capabilities
99 virtual Solid::Control::NetworkInterface::Capabilities capabilities() const = 0;
101 protected:
102 //Q_SIGNALS:
104 * This signal is emitted when the settings of this network have changed.
106 virtual void ipDetailsChanged() = 0;
109 * This signal is emitted when the device's connection state changed.
110 * For example, if the device was disconnected and started to activate
112 * @param state the new state of the connection
113 * @see Solid::Control::NetworkInterface::ConnectionState
115 virtual void connectionStateChanged(int state) = 0;
117 } //Ifaces
118 } //Control
119 } //Solid
121 Q_DECLARE_INTERFACE(Solid::Control::Ifaces::NetworkInterface, "org.kde.Solid.Control.Ifaces.NetworkInterface/0.1")
123 #endif