From 3c4e0db3a35b851398eac7c598009e42e3ea7843 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 30 Jul 2005 14:03:22 +0000 Subject: * hide generate init scripts from SVN * DBUS: implement introspection for Server object * fix avahi-daemon build (missing stdio.h inclusion) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@199 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-daemon/dbus-protocol.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'avahi-daemon/dbus-protocol.c') diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c index 4e67281..b5c3e9a 100644 --- a/avahi-daemon/dbus-protocol.c +++ b/avahi-daemon/dbus-protocol.c @@ -38,6 +38,9 @@ #include "dbus-protocol.h" #include "main.h" +/* Include generated introspection data */ +#include "server-introspect-xml.c" + typedef struct Server Server; typedef struct Client Client; typedef struct EntryGroupInfo EntryGroupInfo; @@ -873,7 +876,16 @@ static DBusHandlerResult msg_server_impl(DBusConnection *c, DBusMessage *m, void dbus_message_get_path(m), dbus_message_get_member(m)); - if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetHostName")) { + if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect")) { + + if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) { + avahi_log_warn("Error parsing Introspect message"); + goto fail; + } + + return respond_string(c, m, server_introspect_xml); + + } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetHostName")) { if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) { avahi_log_warn("Error parsing Server::GetHostName message"); -- cgit