/usr/include/solid/control/ifaces/networkmanager.h is in kde-workspace-dev 4:4.8.4-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | /* This file is part of the KDE project
Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef SOLID_IFACES_NETWORKMANAGER
#define SOLID_IFACES_NETWORKMANAGER
#include <QtCore/QObject>
#include <QtCore/QStringList>
#include <solid/networking.h>
#include "../solid_control_export.h"
#include "../networkmanager.h"
namespace Solid
{
namespace Control
{
namespace Ifaces
{
/**
* This class specifies the interface a backend will have to implement in
* order to be used in the system.
*
* A network manager allow to query the underlying platform to discover the
* available network interfaces and reachable network. It has also the
* responsibility to notify when a network interface or a network appear or disappear.
*/
class SOLIDCONTROLIFACES_EXPORT NetworkManager : public QObject
{
Q_OBJECT
public:
/**
* Constructs a NetworkManager.
*
* @param parent the parent object
*/
NetworkManager(QObject * parent = 0);
/**
* Destructs a NetworkManager object.
*/
virtual ~NetworkManager();
/**
* Get the manager connection state
*/
virtual Solid::Networking::Status status() const = 0;
/**
* Retrieves the list of all the network interfaces Unique Network Identifiers (UNIs)
* in the system. It includes both hardware and virtual devices.
*
* @return the list of network interfaces available in this system
*/
virtual QStringList networkInterfaces() const = 0;
/**
* Instantiates a new NetworkInterface object from this backend given its UNI.
*
* @param uni the identifier of the network interface instantiated
* @returns a new NetworkInterface object if there's a device having the given UNI, 0 otherwise
*/
virtual QObject *createNetworkInterface(const QString &uni) = 0;
/**
* Retrieves the activation status of networking (as a whole) in the system.
*
* @return true if this networking is enabled, false otherwise
*/
virtual bool isNetworkingEnabled() const = 0;
/**
* Retrieves the activation status of wireless networking in the system.
*
* @return true if this wireless networking is enabled, false otherwise
*/
virtual bool isWirelessEnabled() const = 0;
/**
* Retrieves the status of wireless hardware in the system. This is typically
* controlled by a physical switch so there is no way to set this in software.
*
* @since KDE 4.1
* @return true if this wireless networking is enabled, false otherwise
*/
virtual bool isWirelessHardwareEnabled() const = 0;
/**
* Retrieves the activation status of wwan (mobile broadband) networking in the system.
*
* @return true if this wwan networking is enabled, false otherwise
*/
virtual bool isWwanEnabled() const = 0;
/**
* Retrieves the status of wwan (mobile broadband) hardware in the system.
*
* @since KDE 4.7
* @return true if this wwan networking is enabled, false otherwise
*/
virtual bool isWwanHardwareEnabled() const = 0;
virtual void activateConnection(const QString & interfaceUni, const QString & connectionUni, const QVariantMap & connectionParameters ) = 0;
virtual void deactivateConnection(const QString & activeConnection) = 0;
/**
* Access the list of active connection UNIs
*/
virtual QStringList activeConnections() const = 0;
/**
* Retrieves the interface types supported by this network manager.
*
* @return the interface types supported by the network manager
* @see Solid::Control::NetworkManager::SupportedInterfaceType
*
* @since 4.3
*/
virtual Solid::Control::NetworkInterface::Types supportedInterfaceTypes() const = 0;
public Q_SLOTS:
/**
* Activates or deactivates networking (as a whole).
*
* @param enabled true to activate networking, false otherwise
*/
virtual void setNetworkingEnabled(bool enabled) = 0;
/**
* Activates or deactivates wireless networking.
*
* @param enabled true to activate wireless networking, false otherwise
*/
virtual void setWirelessEnabled(bool enabled) = 0;
/**
* Activates or deactivates wwan (mobile broadband) networking.
*
* @param enabled true to activate wwan (mobile broadband) networking, false otherwise
*/
virtual void setWwanEnabled(bool enabled) = 0;
Q_SIGNALS:
/**
* This signal is emitted when the system's connection state changes
*/
void statusChanged(Solid::Networking::Status status);
/**
* This signal is emitted when a new network interface is available.
*
* @param uni the network interface identifier
*/
void networkInterfaceAdded(const QString & uni);
/**
* This signal is emitted when a network interface is not available anymore.
*
* @param uni the network interface identifier
*/
void networkInterfaceRemoved(const QString & uni);
/**
* This signal is emitted when the status of the wireless changed
*/
void wirelessEnabledChanged(bool enabled);
/**
* This signal is emitted when the status of the wireless hardware changed
*/
void wirelessHardwareEnabledChanged(bool enabled);
/**
* This signal is emitted when the status of the wwan (mobile broadband) changed
*/
void wwanEnabledChanged(bool enabled);
/**
* This signal is emitted when the status of the wwan (mobile broadband) hardware changed
*/
void wwanHardwareEnabledChanged(bool enabled);
/**
* This signal is emitted when the status of overall networking changed
*/
void networkingEnabledChanged(bool enabled);
/**
* This signal is emitted when the set of active connections changes
*/
void activeConnectionsChanged();
};
} // Ifaces
} // Control
} // Solid
Q_DECLARE_INTERFACE(Solid::Control::Ifaces::NetworkManager, "org.kde.Solid.Control.Ifaces.NetworkManager/0.1")
#endif
|