aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-10-14 12:11:41 -0500
committerTed Gould <ted@gould.cx>2010-10-14 12:11:41 -0500
commite80a7c4d027837c6d67fd4de52914b32b0bc30d4 (patch)
tree5b1e09fa5a33cd04b445742bf5fd690cc8c810c8
parent0db52d9f483d8d63024c3dc83d1cb5709c4b3f81 (diff)
downloadlibdbusmenu-e80a7c4d027837c6d67fd4de52914b32b0bc30d4.tar.gz
libdbusmenu-e80a7c4d027837c6d67fd4de52914b32b0bc30d4.tar.bz2
libdbusmenu-e80a7c4d027837c6d67fd4de52914b32b0bc30d4.zip
Filling out the vtable
-rw-r--r--libdbusmenu-glib/server.c39
1 files changed, 38 insertions, 1 deletions
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index 3a45f62..df57994 100644
--- a/libdbusmenu-glib/server.c
+++ b/libdbusmenu-glib/server.c
@@ -106,6 +106,21 @@ static void set_property (GObject * obj, guint id, const GValue * value, GParamS
static void get_property (GObject * obj, guint id, GValue * value, GParamSpec * pspec);
static void register_object (DbusmenuServer * server);
static void bus_got_cb (GObject * obj, GAsyncResult * result, gpointer user_data);
+static void bus_method_call (GDBusConnection * connection,
+ const gchar * sender,
+ const gchar * path,
+ const gchar * interface,
+ const gchar * method,
+ GVariant * params,
+ GDBusMethodInvocation * invocation,
+ gpointer user_data);
+static GVariant * bus_get_prop (GDBusConnection * connection,
+ const gchar * sender,
+ const gchar * path,
+ const gchar * interface,
+ const gchar * property,
+ GError ** error,
+ gpointer user_data);
static void menuitem_property_changed (DbusmenuMenuitem * mi, gchar * property, GValue * value, DbusmenuServer * server);
static void menuitem_child_added (DbusmenuMenuitem * parent, DbusmenuMenuitem * child, guint pos, DbusmenuServer * server);
static void menuitem_child_removed (DbusmenuMenuitem * parent, DbusmenuMenuitem * child, DbusmenuServer * server);
@@ -116,7 +131,11 @@ static GQuark error_quark (void);
/* Globals */
static GDBusNodeInfo * dbusmenu_node_info = NULL;
static GDBusInterfaceInfo * dbusmenu_interface_info = NULL;
-static const GDBusInterfaceVTable dbusmenu_interface_table = {0};
+static const GDBusInterfaceVTable dbusmenu_interface_table = {
+ method_call: bus_method_call,
+ get_property: bus_get_prop,
+ set_property: NULL /* No properties that can be set */
+};
G_DEFINE_TYPE (DbusmenuServer, dbusmenu_server, G_TYPE_OBJECT);
@@ -445,6 +464,24 @@ bus_got_cb (GObject * obj, GAsyncResult * result, gpointer user_data)
return;
}
+/* Function for the GDBus vtable to handle all method calls and dish
+ them out the appropriate functions */
+static void
+bus_method_call (GDBusConnection * connection, const gchar * sender, const gchar * path, const gchar * interface, const gchar * method, GVariant * params, GDBusMethodInvocation * invocation, gpointer user_data)
+{
+
+ return;
+}
+
+/* For the GDBus vtable but we only have one property so it's pretty
+ simple. */
+static GVariant *
+bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar * path, const gchar * interface, const gchar * property, GError ** error, gpointer user_data)
+{
+
+ return NULL;
+}
+
/* Handle actually signalling in the idle loop. This way we collect all
the updates. */
static gboolean