activateConnection method

Activates a connection for device.

A specific connection may be specified, or else it is detected automatically.

Implementation

Future<NetworkManagerActiveConnection> activateConnection(
    {required NetworkManagerDevice device,
    NetworkManagerSettingsConnection? connection,
    NetworkManagerAccessPoint? accessPoint}) async {
  var result = await _manager!.callMethod(
      _managerInterfaceName,
      'ActivateConnection',
      [
        connection?._object.path ?? DBusObjectPath('/'),
        device._object.path,
        accessPoint?._object.path ?? DBusObjectPath('/'),
      ],
      replySignature: DBusSignature('o'));
  return _getActiveConnection(result.returnValues[0] as DBusObjectPath)!;
}