libsolidcontrol
Solid::Control::NetworkManager Namespace Reference
Detailed Description
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.
Classes | |
class | Notifier |
Functions | |
void | activateConnection (const QString &deviceUni, const QString &connectionUni, const QVariantMap &connectionParameters) |
void | deactivateConnection (const QString &activeConnectionUni) |
Solid::Control::NetworkInterface * | findNetworkInterface (const QString &uni) |
bool | isNetworkingEnabled () |
bool | isWirelessEnabled () |
bool | isWirelessHardwareEnabled () |
Solid::Control::NetworkInterfaceList | networkInterfaces () |
Solid::Control::NetworkManager::Notifier * | notifier () |
void | setNetworkingEnabled (bool enabled) |
void | setWirelessEnabled (bool enabled) |
Solid::Networking::Status | status () |
Function Documentation
SOLIDCONTROL_EXPORT void Solid::Control::NetworkManager::activateConnection | ( | const QString & | deviceUni, | |
const QString & | connectionUni, | |||
const QVariantMap & | connectionParameters | |||
) |
- Parameters:
-
deviceUni unique identifier of the network interface to be activated
- Parameters:
-
connectionUni unique identifier for the connection to be activated 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!)
Definition at line 247 of file networkmanager.cpp.
SOLIDCONTROL_EXPORT void Solid::Control::NetworkManager::deactivateConnection | ( | const QString & | activeConnectionUni | ) |
Deactivate this network interface, if active.
- Parameters:
-
activeConnectionUni identifer of the connection to deactivate
Definition at line 253 of file networkmanager.cpp.
SOLIDCONTROL_EXPORT NetworkInterface * Solid::Control::NetworkManager::findNetworkInterface | ( | const QString & | uni | ) |
Find a new NetworkInterface object given its UNI.
This pointer is owned by the Solid infrastructure.
- Parameters:
-
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
Definition at line 158 of file networkmanager.cpp.
SOLIDCONTROL_EXPORT bool Solid::Control::NetworkManager::isNetworkingEnabled | ( | ) |
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 NetworkStatus.
- Returns:
- true if this networking is enabled, false otherwise
Definition at line 110 of file networkmanager.cpp.
SOLIDCONTROL_EXPORT bool Solid::Control::NetworkManager::isWirelessEnabled | ( | ) |
Retrieves the activation status of wireless networking in the system.
- Returns:
- true if this wireless networking is enabled, false otherwise
Definition at line 115 of file networkmanager.cpp.
SOLIDCONTROL_EXPORT bool Solid::Control::NetworkManager::isWirelessHardwareEnabled | ( | ) |
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
- Returns:
- true if this wireless networking is enabled, false otherwise
Definition at line 120 of file networkmanager.cpp.
SOLIDCONTROL_EXPORT NetworkInterfaceList Solid::Control::NetworkManager::networkInterfaces | ( | ) |
Retrieves the list of all the network interfaces in the system.
It includes both hardware and virtual devices.
- Returns:
- the list of network interfaces available in this system
Definition at line 105 of file networkmanager.cpp.
SOLIDCONTROL_EXPORT Notifier * Solid::Control::NetworkManager::notifier | ( | ) |
Definition at line 163 of file networkmanager.cpp.
SOLIDCONTROL_EXPORT void Solid::Control::NetworkManager::setNetworkingEnabled | ( | bool | enabled | ) |
Activates or deactivates networking (as a whole).
- Parameters:
-
enabled true to activate networking, false otherwise
Definition at line 125 of file networkmanager.cpp.
SOLIDCONTROL_EXPORT void Solid::Control::NetworkManager::setWirelessEnabled | ( | bool | enabled | ) |
Activates or deactivates wireless networking.
- Parameters:
-
enabled true to activate wireless networking, false otherwise
Definition at line 130 of file networkmanager.cpp.
SOLIDCONTROL_EXPORT Solid::Networking::Status Solid::Control::NetworkManager::status | ( | ) |