aboutsummaryrefslogtreecommitdiff
path: root/libindicator
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-01-07 22:43:36 -0600
committerTed Gould <ted@gould.cx>2011-01-07 22:43:36 -0600
commit20f3cbb90f83169f0961939c62ecdefc463dd41d (patch)
tree5e4deda356a36318bd052e171e203f50c23d7c2a /libindicator
parent70bfa89bf97d62f03b04822aee4e03c56d1b4dfc (diff)
downloadlibayatana-indicator-20f3cbb90f83169f0961939c62ecdefc463dd41d.tar.gz
libayatana-indicator-20f3cbb90f83169f0961939c62ecdefc463dd41d.tar.bz2
libayatana-indicator-20f3cbb90f83169f0961939c62ecdefc463dd41d.zip
Adding in creating the interface info from the XML files
Diffstat (limited to 'libindicator')
-rw-r--r--libindicator/indicator-service-manager.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/libindicator/indicator-service-manager.c b/libindicator/indicator-service-manager.c
index b5457ff..5dbaf5c 100644
--- a/libindicator/indicator-service-manager.c
+++ b/libindicator/indicator-service-manager.c
@@ -80,6 +80,10 @@ enum {
#define PROP_NAME_S "name"
#define PROP_VERSION_S "version"
+/* GDBus Stuff */
+static GDBusNodeInfo * node_info = NULL;
+static GDBusInterfaceInfo * interface_info = NULL;
+
/* GObject Stuff */
#define INDICATOR_SERVICE_MANAGER_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATOR_SERVICE_MANAGER_TYPE, IndicatorServiceManagerPrivate))
@@ -146,6 +150,25 @@ indicator_service_manager_class_init (IndicatorServiceManagerClass *klass)
0, G_MAXUINT, 0,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /* Setting up the DBus interfaces */
+ if (node_info == NULL) {
+ GError * error = NULL;
+
+ node_info = g_dbus_node_info_new_for_xml(_indicator_service, &error);
+ if (error != NULL) {
+ g_error("Unable to parse Indicator Service Interface description: %s", error->message);
+ g_error_free(error);
+ }
+ }
+
+ if (interface_info == NULL) {
+ interface_info = g_dbus_node_info_lookup_interface(node_info, INDICATOR_SERVICE_INTERFACE);
+
+ if (interface_info == NULL) {
+ g_error("Unable to find interface '" INDICATOR_SERVICE_INTERFACE "'");
+ }
+ }
+
return;
}