add_and_activate_connection


Description:

public void add_and_activate_connection (Connection? @partial, Device device, string? specific_object, ClientAddActivateFn? callback)

Adds a new connection using the given details (if any) as a template, automatically filling in missing settings with the capabilities of the given device and specific object.

The new connection is then activated. Cannot be used for VPN connections at this time.

Note that the callback is invoked when NetworkManager has started activating the new connection, not when it finishes. You can used the returned ActiveConnection object (in particular, state) to track the activation to its completion.

Parameters:

this

a Client

device

the Device

specific_object

the object path of a connection-type-specific object this activation should use. This parameter is currently ignored for wired and mobile broadband connections, and the value of null should be used (ie, no specific object). For Wi-Fi or WiMAX connections, pass the object path of a AccessPoint or WimaxNsp owned by device, which you can get using get_path, and which will be used to complete the details of the newly added connection.

callback

the function to call when the call is done

partial

an Connection to add; the connection may be partially filled (or even null) and will be completed by NetworkManager using the given device and specific_object before being added

user_data

user data to pass to the callback function




2022 vala-language.org