summaryrefslogtreecommitdiffstats
path: root/avahi-daemon/dbus-protocol.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-07-30 14:03:22 +0000
committerLennart Poettering <lennart@poettering.net>2005-07-30 14:03:22 +0000
commit3c4e0db3a35b851398eac7c598009e42e3ea7843 (patch)
tree07c39a10d0e53a46437b71fda31331af5c369f88 /avahi-daemon/dbus-protocol.c
parent5b5d01cabfcca8cd50d053aa56714cb0eb2f611e (diff)
* 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
Diffstat (limited to 'avahi-daemon/dbus-protocol.c')
-rw-r--r--avahi-daemon/dbus-protocol.c14
1 files changed, 13 insertions, 1 deletions
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");