aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--libindicate/listener.c31
2 files changed, 34 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 15e4110..ca46ff9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,11 +50,13 @@ AM_GCONF_SOURCE_2
GLIB_REQUIRED_VERSION=2.18
GIO_REQUIRED_VERSION=2.18
GDK_PIXBUF_REQUIRED_VERSION=2.12
+XML_REQUIRED_VERSION=2.6
PKG_CHECK_MODULES(LIBINDICATE, glib-2.0 >= $GLIB_REQUIRED_VERSION
gio-2.0 >= $GIO_REQUIRED_VERSION
gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED_VERSION
- dbus-glib-1 >= $DBUS_REQUIRED_VERSION)
+ dbus-glib-1 >= $DBUS_REQUIRED_VERSION
+ libxml-2.0 >= $XML_REQUIRED_VERSION)
AC_SUBST(LIBINDICATE_CFLAGS)
AC_SUBST(LIBINDICATE_LIBS)
diff --git a/libindicate/listener.c b/libindicate/listener.c
index d181a5e..b647f0a 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);
+
+}