activate_connection


Description:

public void activate_connection (Connection? connection, Device? device, string? specific_object, ClientActivateFn? callback)

Starts a connection to a particular network using the configuration settings from connection and the network device device .

Certain connection types also take a "specific object" which is the object path of a connection- specific object, like an AccessPoint for Wi-Fi connections, or an WimaxNsp for WiMAX connections, to which you wish to connect. If the specific object is not given, NetworkManager can, in some cases, automatically determine which network to connect to given the settings in connection.

If connection is not given for a device-based activation, NetworkManager picks the best available connection for the device and activates it.

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

connection

an Connection

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

user_data

user data to pass to the callback function