callMethod method
Future<DBusMethodSuccessResponse>
callMethod({
- String? destination,
- required DBusObjectPath path,
- String? interface,
- required String name,
- Iterable<
DBusValue> values = const [], - DBusSignature? replySignature,
- bool noReplyExpected = false,
- bool noAutoStart = false,
- bool allowInteractiveAuthorization = false,
Invokes a method on a D-Bus object. Throws DBusMethodResponseException if the remote side returns an error.
If replySignature
is provided this causes this method to throw a
DBusReplySignatureException if the result is successful but the returned
values do not match the provided signature.
Throws DBusServiceUnknownException if destination
is not a provided service.
Throws DBusUnknownObjectException if no object is provided at path
.
Throws DBusUnknownInterfaceException if interface
is not provided by this object.
Throws DBusUnknownMethodException if the method with name
is not available.
Throws DBusInvalidArgsException if values
aren't correct.
Implementation
Future<DBusMethodSuccessResponse> callMethod(
{String? destination,
required DBusObjectPath path,
String? interface,
required String name,
Iterable<DBusValue> values = const [],
DBusSignature? replySignature,
bool noReplyExpected = false,
bool noAutoStart = false,
bool allowInteractiveAuthorization = false}) async {
await _connect();
return await _callMethod(
destination: destination != null ? DBusBusName(destination) : null,
path: path,
interface: interface != null ? DBusInterfaceName(interface) : null,
name: DBusMemberName(name),
values: values,
replySignature: replySignature,
noReplyExpected: noReplyExpected,
noAutoStart: noAutoStart,
allowInteractiveAuthorization: allowInteractiveAuthorization);
}