From ce664599c72dcb80f9e0427a2a49fc3c26fb79c8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sun, 12 Apr 2009 21:41:48 -0500 Subject: Proto-pseudo-code for the introspection functions that are going to be needed --- libindicate/listener.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'libindicate/listener.c') diff --git a/libindicate/listener.c b/libindicate/listener.c index 0646e81..8ae3973 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -1046,3 +1046,34 @@ indicate_listener_indicator_get_gtype (void) return our_type; } +static const gchar * _introspector_path[] = ["", "org", "freedesktop", "indicate", NULL]; +static const gchar * _introspector_interface = "org.freedesktop.indicator"; + +void +introspect_this (gchar * xml, IndicateServer * server) +{ + if (xml != NULL) { + /* Parse the XML */ + + /* Check for root being "node" */ + + const gchar * nodename = NULL; + const gchar * nameval = NULL; + if (_introspector_path[server->introspect_level] == NULL) { + /* We're looking for our interface */ + nodename = "interface"; + nameval = _introspector_interface; + } else { + /* We're looking for our next node */ + nodename = "node"; + nameval = _introspector_path[server->introspect_level]; + } + + } else { + server->introspect_level = 0; + } + + dbus_proxy_create(); + dbus_proxy_call(intropsect_this); + +} -- cgit v1.2.3