[systemd-devel] XML for Systemd DBus?
Giacinto Cifelli
gciofono at gmail.com
Wed Aug 9 17:03:09 UTC 2023
hey,
On Wed, Aug 9, 2023 at 5:58 PM Elsie Hupp <xdg at elsiehupp.com> wrote:
>
> Note: I am on elementaryOS 6.0.
>
> I am trying to generate a vala interface from the Systemd DBus interface, following the example here to get the XML to feed into `vala-dbus-binding-tool`:
>
> https://wiki.gnome.org/Projects/Vala/DBusClientSamples
>
> But I am getting the following error:
>
> ```bash
> $ dbus-send --print-reply --type=method_call --dest=org.freedesktop.systemd1 objectpath org.freedesktop.DBus.Introspectable.Introspect
> dbus[208973]: arguments to dbus_message_new_method_call() were incorrect, assertion "_dbus_check_is_valid_path (path)" failed in file ../../../dbus/dbus-message.c line 1366.
> This is normally a bug in some application using the D-Bus library.
>
the _objectpath_ needs to be an actual path, like '/' (without quotes):
$ dbus-send --print-reply --type=method_call
--dest=org.freedesktop.systemd1 /
org.freedesktop.DBus.Introspectable.Introspect
method return time=1691600348.597554 sender=:1.1 ->
destination=:1.1897 serial=8426 reply_serial=2
string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object
Introspection 1.0//EN"
"https://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping"/>
<method name="GetMachineId">
<arg type="s" name="machine_uuid" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="xml_data" type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" direction="in" type="s"/>
<arg name="property_name" direction="in" type="s"/>
<arg name="value" direction="out" type="v"/>
</method>
<method name="GetAll">
<arg name="interface_name" direction="in" type="s"/>
<arg name="props" direction="out" type="a{sv}"/>
</method>
<method name="Set">
<arg name="interface_name" direction="in" type="s"/>
<arg name="property_name" direction="in" type="s"/>
<arg name="value" direction="in" type="v"/>
</method>
<signal name="PropertiesChanged">
<arg type="s" name="interface_name"/>
<arg type="a{sv}" name="changed_properties"/>
<arg type="as" name="invalidated_properties"/>
</signal>
</interface>
<node name="org"/>
</node>
"
you can check the paths with tools like d-feet what is actually there,
and also the answers to these queries.
For systemd1 the list seems to be rather long, not sure what you want
to achieve there...
Giacinto
>
> I did several web searches of the error messages, and none of them were particularly helpful.
>
> How do I get the XML for the Systemd DBus interface? Is there a way I can work around this error, or is there a copy available somewhere online?
More information about the systemd-devel
mailing list