/usr/include/solid/control/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 218 | /* This file is part of the KDE project
Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
Copyright (C) 2006-2007 Kevin Ottens <ervin@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_CONTROL_NETWORKMANAGER
#define SOLID_CONTROL_NETWORKMANAGER
#include <QtCore/QObject>
#include <QtCore/QVariant>
#include <solid/networking.h>
#include "solid_control_export.h"
#include "networkinterface.h"
namespace Solid
{
namespace Control
{
namespace Ifaces
{
class NetworkManager;
}
class Network;
typedef QList<NetworkInterface*> NetworkInterfaceList;
/**
* This class allow to query the underlying system 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.
*
* It's the unique entry point for network management. Applications should use
* it to find network interfaces, or to be notified about network related changes.
*
* Note that it's implemented as a singleton and encapsulates the backend logic.
*/
namespace NetworkManager
{
/**
* Get the manager connection state
*/
SOLIDCONTROL_EXPORT Solid::Networking::Status status();
/**
* Retrieves the list of all the network interfaces in the system.
* It includes both hardware and virtual devices.
*
* @return the list of network interfaces available in this system
*/
SOLIDCONTROL_EXPORT NetworkInterfaceList networkInterfaces();
/**
* Find a new NetworkInterface object given its UNI. This pointer is owned by the Solid
* infrastructure.
*
* @param uni the identifier of the network interface to find
* @returns a valid NetworkInterface object if there's a device having the given UNI, an invalid one otherwise
*/
SOLIDCONTROL_EXPORT NetworkInterface * findNetworkInterface(const QString &uni);
/**
* Retrieves the status of networking (as a whole) in the system.
* This is distinct from whether the system's networking is online or offline.
* To check that, see @ref NetworkStatus.
*
* @return true if this networking is enabled, false otherwise
*/
SOLIDCONTROL_EXPORT bool isNetworkingEnabled();
/**
* Retrieves the activation status of wireless networking in the system.
*
* @return true if this wireless networking is enabled, false otherwise
*/
SOLIDCONTROL_EXPORT bool isWirelessEnabled();
/**
* Retrieves the activation status of wwan (mobile broadband) networking in the system.
*
* @return true if this wwan networking is enabled, false otherwise
*/
SOLIDCONTROL_EXPORT bool isWwanEnabled();
/**
* 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
*/
SOLIDCONTROL_EXPORT bool isWwanHardwareEnabled();
/**
* Activates or deactivates wwan (mobile broadband) networking.
*
* @param enabled true to activate wwan networking, false otherwise
*/
SOLIDCONTROL_EXPORT void setWwanEnabled(bool enabled);
/**
* Activates or deactivates networking (as a whole).
*
* @param enabled true to activate networking, false otherwise
*/
SOLIDCONTROL_EXPORT void setNetworkingEnabled(bool enabled);
/**
* 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
*/
SOLIDCONTROL_EXPORT bool isWirelessHardwareEnabled();
/**
* Activates or deactivates wireless networking.
*
* @param enabled true to activate wireless networking, false otherwise
*/
SOLIDCONTROL_EXPORT void setWirelessEnabled(bool enabled);
/**
* @param deviceUni unique identifier of the network interface to be activated
* @param connectionUni unique identifier for the connection to be activated
* @param connectionParameters can be used to specify extra parameters not specific to the NetworkInterface or the connection, eg which AP to use when several present with same ESSID in range (because ESSID no guarantee that the AP is part of the network you want to join!)
*
*/
SOLIDCONTROL_EXPORT void activateConnection(const QString & deviceUni, const QString & connectionUni,
const QVariantMap & connectionParameters );
/**
* Deactivate this network interface, if active
* @param activeConnectionUni identifer of the connection to deactivate
*/
SOLIDCONTROL_EXPORT void deactivateConnection(const QString & activeConnectionUni);
/**
* Access the list of any active connections
*/
QStringList SOLIDCONTROL_EXPORT activeConnections();
/**
* Retrieves the interface types supported by this network manager.
*
* @return the interface types supported by the network manager
*
* @since 4.3
*/
SOLIDCONTROL_EXPORT Solid::Control::NetworkInterface::Types supportedInterfaceTypes();
class SOLIDCONTROL_EXPORT Notifier : public QObject
{
Q_OBJECT
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();
};
SOLIDCONTROL_EXPORT Notifier *notifier();
}
} // Control
} // Solid
#endif
|