• NetworkManager
  • NetworkManager Class

    (nymeaserver::NetworkManager)

    Represents the dbus network-manager. More...

    Header: #include <NetworkManager>
    Inherits:

    Public Types

    enum NetworkManagerConnectivityState { NetworkManagerConnectivityStateUnknown, NetworkManagerConnectivityStateNone, NetworkManagerConnectivityStatePortal, NetworkManagerConnectivityStateLimited, NetworkManagerConnectivityStateFull }
    enum NetworkManagerError { NetworkManagerErrorNoError, NetworkManagerErrorUnknownError, NetworkManagerErrorWirelessNotAvailable, NetworkManagerErrorAccessPointNotFound, ..., NetworkManagerErrorNetworkManagerNotAvailable }
    enum NetworkManagerState { NetworkManagerStateUnknown, NetworkManagerStateAsleep, NetworkManagerStateDisconnected, NetworkManagerStateDisconnecting, ..., NetworkManagerStateConnectedGlobal }

    Public Functions

    NetworkManager(QObject * parent = 0)
    bool available()
    NetworkManagerError connectWifi(const QString & interface, const QString & ssid, const QString & password)
    NetworkManagerConnectivityState connectivityState() const
    bool enableNetworking(const bool & enabled)
    bool enableWireless(const bool & enabled)
    NetworkDevice * getNetworkDevice(const QString & interface)
    QList<NetworkDevice *> networkDevices() const
    bool networkingEnabled() const
    NetworkManagerState state() const
    QString stateString() const
    QString version() const
    bool wifiAvailable()
    QList<WiredNetworkDevice *> wiredNetworkDevices() const
    bool wirelessEnabled() const
    QList<WirelessNetworkDevice *> wirelessNetworkDevices() const

    Signals

    void connectivityStateChanged()
    void networkingEnabledChanged()
    void stateChanged()
    void versionChanged()
    void wiredDeviceAdded(WiredNetworkDevice * wiredDevice)
    void wiredDeviceChanged(WiredNetworkDevice * wiredDevice)
    void wiredDeviceRemoved(const QString & interface)
    void wirelessDeviceAdded(WirelessNetworkDevice * wirelessDevice)
    void wirelessDeviceChanged(WirelessNetworkDevice * wirelessDevice)
    void wirelessDeviceRemoved(const QString & interface)
    void wirelessEnabledChanged()

    Detailed Description

    Represents the dbus network-manager.

    Member Type Documentation

    enum NetworkManager::NetworkManagerConnectivityState

    ConstantValue
    nymeaserver::NetworkManager::NetworkManagerConnectivityStateUnknown0
    nymeaserver::NetworkManager::NetworkManagerConnectivityStateNone1
    nymeaserver::NetworkManager::NetworkManagerConnectivityStatePortal2
    nymeaserver::NetworkManager::NetworkManagerConnectivityStateLimited3
    nymeaserver::NetworkManager::NetworkManagerConnectivityStateFull4

    enum NetworkManager::NetworkManagerError

    ConstantValue
    nymeaserver::NetworkManager::NetworkManagerErrorNoError0
    nymeaserver::NetworkManager::NetworkManagerErrorUnknownError1
    nymeaserver::NetworkManager::NetworkManagerErrorWirelessNotAvailable2
    nymeaserver::NetworkManager::NetworkManagerErrorAccessPointNotFound3
    nymeaserver::NetworkManager::NetworkManagerErrorNetworkInterfaceNotFound4
    nymeaserver::NetworkManager::NetworkManagerErrorInvalidNetworkDeviceType5
    nymeaserver::NetworkManager::NetworkManagerErrorWirelessNetworkingDisabled6
    nymeaserver::NetworkManager::NetworkManagerErrorWirelessConnectionFailed7
    nymeaserver::NetworkManager::NetworkManagerErrorNetworkingDisabled8
    nymeaserver::NetworkManager::NetworkManagerErrorNetworkManagerNotAvailable9

    enum NetworkManager::NetworkManagerState

    ConstantValue
    nymeaserver::NetworkManager::NetworkManagerStateUnknown0
    nymeaserver::NetworkManager::NetworkManagerStateAsleep10
    nymeaserver::NetworkManager::NetworkManagerStateDisconnected20
    nymeaserver::NetworkManager::NetworkManagerStateDisconnecting30
    nymeaserver::NetworkManager::NetworkManagerStateConnecting40
    nymeaserver::NetworkManager::NetworkManagerStateConnectedLocal50
    nymeaserver::NetworkManager::NetworkManagerStateConnectedSite60
    nymeaserver::NetworkManager::NetworkManagerStateConnectedGlobal70

    Member Function Documentation

    NetworkManager::NetworkManager(QObject * parent = 0)

    Constructs a new NetworkManager object with the given parent.

    bool NetworkManager::available()

    Returns true if the network-manager is available on this system.

    NetworkManagerError NetworkManager::connectWifi(const QString & interface, const QString & ssid, const QString & password)

    Connect the given interface to a wifi network with the given ssid and password. Returns the NetworkManagerError to inform about the result.

    See also NetworkManagerError.

    NetworkManagerConnectivityState NetworkManager::connectivityState() const

    Returns the current connectivity state of this NetworkManager.

    See also NetworkManagerConnectivityState.

    [signal] void NetworkManager::connectivityStateChanged()

    This signal will be emitted when the connectivity state of this WiredNetworkDevice has changed.

    See also NetworkManagerConnectivityState.

    bool NetworkManager::enableNetworking(const bool & enabled)

    Returns true if the networking of this NetworkManager could be enabled.

    bool NetworkManager::enableWireless(const bool & enabled)

    Returns true if the wireless networking of this NetworkManager could be set to enabled.

    NetworkDevice * NetworkManager::getNetworkDevice(const QString & interface)

    Returns the NetworkDevice with the given interface from this NetworkManager. If there is no such interface returns Q_NULLPTR.

    QList<NetworkDevice *> NetworkManager::networkDevices() const

    Returns the list of NetworkDevices from this NetworkManager.

    bool NetworkManager::networkingEnabled() const

    Returns true if the networking of this NetworkManager is enabled.

    [signal] void NetworkManager::networkingEnabledChanged()

    This signal will be emitted when the networking of this WiredNetworkDevice has changed.

    See also networkingEnabled().

    NetworkManagerState NetworkManager::state() const

    Returns the state of this NetworkManager.

    See also NetworkManagerState.

    [signal] void NetworkManager::stateChanged()

    This signal will be emitted when the state of this WiredNetworkDevice has changed.

    See also NetworkManagerState.

    QString NetworkManager::stateString() const

    Returns the human readable string of the current state of this NetworkManager.

    See also NetworkManagerState.

    QString NetworkManager::version() const

    Returns the version of the running NetworkManager.

    [signal] void NetworkManager::versionChanged()

    This signal will be emitted when the version of this WiredNetworkDevice has changed.

    bool NetworkManager::wifiAvailable()

    Returns true if wifi is available on this system.

    [signal] void NetworkManager::wiredDeviceAdded(WiredNetworkDevice * wiredDevice)

    This signal will be emitted when a new wiredDevice was added to this NetworkManager.

    See also WiredNetworkDevice.

    [signal] void NetworkManager::wiredDeviceChanged(WiredNetworkDevice * wiredDevice)

    This signal will be emitted when the given wiredDevice has changed.

    See also WiredNetworkDevice.

    [signal] void NetworkManager::wiredDeviceRemoved(const QString & interface)

    This signal will be emitted when the WiredNetworkDevice with the given interface was removed from this NetworkManager.

    See also WiredNetworkDevice.

    QList<WiredNetworkDevice *> NetworkManager::wiredNetworkDevices() const

    Returns the list of WiredNetworkDevices from this NetworkManager.

    [signal] void NetworkManager::wirelessDeviceAdded(WirelessNetworkDevice * wirelessDevice)

    This signal will be emitted when a new wirelessDevice was added to this NetworkManager.

    See also WirelessNetworkDevice.

    [signal] void NetworkManager::wirelessDeviceChanged(WirelessNetworkDevice * wirelessDevice)

    This signal will be emitted when the given wirelessDevice has changed.

    See also WirelessNetworkDevice.

    [signal] void NetworkManager::wirelessDeviceRemoved(const QString & interface)

    This signal will be emitted when the WirelessNetworkDevice with the given interface was removed from this NetworkManager.

    See also WirelessNetworkDevice.

    bool NetworkManager::wirelessEnabled() const

    Returns true if the wireless networking of this NetworkManager is enabled.

    [signal] void NetworkManager::wirelessEnabledChanged()

    This signal will be emitted when the wireless networking of this WiredNetworkDevice has changed.

    See also wirelessEnabled().

    QList<WirelessNetworkDevice *> NetworkManager::wirelessNetworkDevices() const

    Returns the list of WirelessNetworkDevices from this NetworkManager.