gstr = g_string_new(DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE);
- g_string_append_printf(gstr, "<node name=\"%s\">\n", path);
+ g_string_append_printf(gstr,
+ "<node name=\"%s\">\n"
+ "\t<interface name=\"org.freedesktop.DBus.Introspectable\">\n"
+ "\t\t<method name=\"Introspect\">\n"
+ "\t\t\t<arg name=\"xml_data\" type=\"s\" direction=\"out\"/>\n"
+ "\t\t</method>\n"
+ "\t</interface>\n", path);
for (list = data->interfaces; list; list = list->next) {
struct interface_data *iface = list->data;
{
GSList *list;
+ if (!name)
+ return NULL;
+
for (list = interfaces; list; list = list->next) {
struct interface_data *iface = list->data;
if (!strcmp(name, iface->name))
if (!slash)
goto done;
- *slash = '\0';
+ if (slash == parent_path && parent_path[1] != '\0')
+ parent_path[1] = '\0';
+ else
+ *slash = '\0';
+
if (!strlen(parent_path))
goto done;
}
iface = find_interface(data->interfaces, interface);
-
if (!iface) {
error("dbus_connection_emit_signal: %s does not implement %s",
path, interface);