Pages
API Documentation
On this page

NetworkManager::ActiveConnection Class

An active connection. More...

  • Header: #include <NetworkManagerQt/ActiveConnection>
  • CMake: find_package(KF6 REQUIRED COMPONENTS NetworkManagerQt)
    target_link_libraries(mytarget PRIVATE KF6::NetworkManagerQt)
  • Inherits: QObject
  • Inherited By: NetworkManager::VpnConnection

List of all members, including inherited members

Public Types

Public Functions

Signals

Protected Functions

Detailed Description

Member Type Documentation

ActiveConnection::List

ActiveConnection::Ptr

enum ActiveConnection::Reason

Constant Value Description
NetworkManager::ActiveConnection::UknownReason 0 The reason for the active connection state change is unknown
NetworkManager::ActiveConnection::None 1 No reason was given for the active connection state change
NetworkManager::ActiveConnection::UserDisconnected 2 The active connection changed state because the user disconnected it
NetworkManager::ActiveConnection::DeviceDisconnected 3 The active connection changed state because the device it was using was disconnected
NetworkManager::ActiveConnection::ServiceStopped 4 The service providing the VPN connection was stopped
NetworkManager::ActiveConnection::IpConfigInvalid 5 The IP config of the active connection was invalid
NetworkManager::ActiveConnection::ConnectTimeout 6 The connection attempt to the VPN service timed out
NetworkManager::ActiveConnection::ServiceStartTimeout 7 A timeout occurred while starting the service providing the VPN connection
NetworkManager::ActiveConnection::ServiceStartFailed 8 Starting the service providing the VPN connection failed
NetworkManager::ActiveConnection::NoSecrets 9 Necessary secrets for the connection were not provided
NetworkManager::ActiveConnection::LoginFailed 10 Authentication to the server failed
NetworkManager::ActiveConnection::ConnectionRemoved 11 The connection was deleted from settings
NetworkManager::ActiveConnection::DependencyFailed 12 Master connection of this connection failed to activate
NetworkManager::ActiveConnection::DeviceRealizeFailed 13 Could not create the software device link
NetworkManager::ActiveConnection::DeviceRemoved 14 The device this connection depended on disappeared

enum ActiveConnection::State

Enum describing possible active connection states

Constant Value Description
NetworkManager::ActiveConnection::Unknown 0 The active connection is in an unknown state
NetworkManager::ActiveConnection::Activating 1 The connection is activating
NetworkManager::ActiveConnection::Activated 2 The connection is activated
NetworkManager::ActiveConnection::Deactivating 3 The connection is being torn down and cleaned up
NetworkManager::ActiveConnection::Deactivated 4 The connection is no longer active

Member Function Documentation

[explicit protected] ActiveConnection::ActiveConnection(NetworkManager::ActiveConnectionPrivate &dd, QObject *parent = nullptr)

[explicit] ActiveConnection::ActiveConnection(const QString &path, QObject *parent = nullptr)

Creates a new ActiveConnection object.

path the DBus path of the device

[override virtual noexcept] ActiveConnection::~ActiveConnection()

Destroys an ActiveConnection object.

Connection::Ptr ActiveConnection::connection() const

Returns a valid NetworkManager::Connection object

[signal] void ActiveConnection::connectionChanged(const NetworkManager::Connection::Ptr &connection)

This signal is emitted when the connection path has changed

bool ActiveConnection::default4() const

Whether this connection has the default IPv4 route

bool ActiveConnection::default6() const

Whether this connection has the default IPv6 route

[signal] void ActiveConnection::default4Changed(bool isDefault)

The state of the default IPv4 route changed

[signal] void ActiveConnection::default6Changed(bool isDefault)

The state of the default IPv6 route changed

QStringList ActiveConnection::devices() const

List of devices UNIs which are part of this connection.

[signal] void ActiveConnection::devicesChanged()

The list of devices changed.

Dhcp4Config::Ptr ActiveConnection::dhcp4Config() const

The Dhcp4Config object describing the DHCP options returned by the DHCP server (assuming the connection used DHCP). Only valid when the connection is in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED state

[signal] void ActiveConnection::dhcp4ConfigChanged()

Emitted when the DHCP configuration for IPv4 of this network has changed.

Dhcp6Config::Ptr ActiveConnection::dhcp6Config() const

The Dhcp6Config object describing the DHCP options returned by the DHCP server (assuming the connection used DHCP). Only valid when the connection is in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED state

[signal] void ActiveConnection::dhcp6ConfigChanged()

Emitted when the DHCP configuration for IPv6 of this network has changed.

QString ActiveConnection::id() const

The Id of the connection

[signal] void ActiveConnection::idChanged(const QString &id)

The id changed

NetworkManager::IpConfig ActiveConnection::ipV4Config() const

The Ip4Config object describing the configuration of the connection. Only valid when the connection is in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED state

[signal] void ActiveConnection::ipV4ConfigChanged()

Emitted when the IPv4 configuration of this network has changed.

NetworkManager::IpConfig ActiveConnection::ipV6Config() const

The Ip6Config object describing the configuration of the connection. Only valid when the connection is in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED state

[signal] void ActiveConnection::ipV6ConfigChanged()

Emitted when the IPv6 configuration of this network has changed.

bool ActiveConnection::isValid() const

Returns true is this object holds a valid connection

QString ActiveConnection::master() const

Returns the uni of master device if the connection is a slave.

[signal] void ActiveConnection::masterChanged(const QString &uni)

The master device changed.

QString ActiveConnection::path() const

Return path of the connection object

QString ActiveConnection::specificObject() const

The path of the specific object associated with the connection.

[signal] void ActiveConnection::specificObjectChanged(const QString &path)

The path to the specific object changed

NetworkManager::ActiveConnection::State ActiveConnection::state() const

The current state of the connection

[signal] void ActiveConnection::stateChanged(NetworkManager::ActiveConnection::State state)

The state changed

[signal] void ActiveConnection::stateChangedReason(NetworkManager::ActiveConnection::State state, NetworkManager::ActiveConnection::Reason reason)

The state changed because of reason reason (never emitted in runtime NM < 1.8.0)

NetworkManager::ConnectionSettings::ConnectionType ActiveConnection::type() const

The type of the connection

[signal] void ActiveConnection::typeChanged(NetworkManager::ConnectionSettings::ConnectionType type)

The type changed

QString ActiveConnection::uuid() const

The UUID of the connection.

[signal] void ActiveConnection::uuidChanged(const QString &uuid)

The uuid changed.

bool ActiveConnection::vpn() const

Whether this is a VPN connection

[signal] void ActiveConnection::vpnChanged(bool isVpn)

The VPN property changed.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.