I'm trying to interact with the Notification service through DBus in getting it to send a notification by manually sending in messages to its destination. I will make a call to the Notify method of the interface org.freedesktop.Notifications which has the following signature:
.Notify method susssasa{sv}i u -
I'm stuck on the part where I have to provide array of type string and variant. But according to the manpage of dbus-send
<contents> ::= <item> | <container> [ <item> | <container>...]
<item> ::= <type>:<value>
<container> ::= <array> | <dict> | <variant>
<array> ::= array:<type>:<value>[,<value>...]
<dict> ::= dict:<type>:<type>:<key>,<value>[,<key>,<value>...]
<variant> ::= variant:<type>:<value>
<type> ::= string | int16 | uint16 | int32 | uint32 | int64 | uint64 | double | byte | boolean | objpath
<array> accepts a <type> and not a <container> to which <variant> belongs. So I get an error.
$ dbus-send --session --print-reply --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.Notify \
string:'me' \
uint32:0 \
string:"hello world" \
string:"" \
string:"" \
dict:string:variant:'urgency',byte:1
dbus-send: Unknown type "variant"
What is the syntax for signature of a{sv}?