add_and_activate_connection2
Description:
public async ActiveConnection add_and_activate_connection2 (Connection? @partial, Device? device, string? specific_object, Variant options, Cancellable? cancellable, out Variant? out_result) throws Error
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 asynchronously activated as with activate_connection_async. 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.
This is identical to add_and_activate_connection_async but
takes a further options
parameter. Currently, the following options are supported by the daemon: * "persist": A string describing
how the connection should be stored. The default is "disk", but it can be modified to "memory" (until the daemon quits) or "volatile" (will
be deleted on disconnect). * "bind-activation": Bind the connection lifetime to something. The default is "none", meaning an explicit
disconnect is needed. The value "dbus-client" means the connection will automatically be deactivated when the calling D-Bus client disappears
from the system bus.
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 (i.e., no specific object). For
Wi-Fi or WiMAX connections, pass the object path of a AccessPoint or
WimaxNsp owned by |
options |
a Variant containing a dictionary with options, or null |
cancellable |
a Cancellable, or null |
callback |
callback to be called when the activation has started |
partial |
an Connection to add; the connection may be partially filled (or even
null) and will be completed by NetworkManager using the given |
user_data |
caller-specific data passed to |