I want to call method RegisterAgent
with gdbus
but I can't find the proper syntax to do so.
Introspecting on /org/bluez
with this command
$ gdbus introspect --system --dest org.bluez --object-path /org/bluez --recurse
shows that method RegisterAgent
on interface org.bluez.AgentManager1
has the following signature:
RegisterAgent(in o agent,
in s capability);
but I can't find any example showing how to pass an object to a method in the gdbus reference documentation, nor in the numerous examples I've found on the Internet.
So I don't know how to pass an agent as first argument, for example I'd like to select KeyboardOnly
as agent, but how can this be done?
With dbus-send
, this gives:
dbus-send --print-reply --system --dest=org.bluez /org/bluez \
--type=method_call org.bluez.AgentManager1.RegisterAgent \
objpath:/org/bluez/agent1 string:KeyboardOnly
But I can't find how to do this with a gdbus call. Any idea?