# dbus/call Call a D-Bus method and return a Future; `[await ...]` for the reply. ## Syntax
[dbus/call $conn $dest $path $iface $method ?$sig @args]
## Parameters - `$conn` — connection from `dbus/connect` - `$dest` — destination bus name, e.g. `"org.freedesktop.DBus"` - `$path` — object path, e.g. `"/org/freedesktop/DBus"` - `$iface` — interface name, e.g. `"org.freedesktop.DBus"` - `$method` — member name, e.g. `"ListNames"` - `$sig` — optional D-Bus type signature; required with more than one argument - `@args` — method arguments When `$sig` is omitted it is inferred from a single argument (string/keyword → `s`, bool → `b`, integral → `u`/`i`, float → `d`, vector → `a…`, map → `a{sv}`, `%Variant` → `v`). A leading string is read as a signature only when it validates and a value follows. ## Examples
set names [await [dbus/call $c "org.freedesktop.DBus" "/org/freedesktop/DBus" "org.freedesktop.DBus" "ListNames"]]
# → @{ "org.freedesktop.DBus" ":1.0" ... }

set sum [await [dbus/call $c "org.deft.test" "/org/deft/Test" "org.deft.Test" "Add" "ii" 2 3]]
# → 5
## Returns Future resolving to the reply body: no out-args → `nil`, one → that value, several → a vector. Error replies resolve to `%Err{:message "org.example.Error.Name: detail"}`; bad arguments or a closed connection also return `%Err`. ## See Also `dbus/send`, `dbus/register-name`, `await`