[glib/gdbus-actions: 2/3] export GActionGroup via GDBusConnection



commit 2be17282c99ba615dff786c6de26c0951295d52d
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Sep 2 00:21:00 2010 +0200

    export GActionGroup via GDBusConnection

 gio/gdbusconnection.c |  574 ++++++++++++++++++++++++++++++++++++++++++++++---
 gio/gdbusconnection.h |   10 +
 gio/gio.symbols       |    2 +
 3 files changed, 558 insertions(+), 28 deletions(-)
---
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 8c3c317..35d1719 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -1,6 +1,7 @@
 /* GDBus - GLib D-Bus Library
  *
  * Copyright (C) 2008-2010 Red Hat, Inc.
+ * Copyright © 2010 Codethink Limited
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -17,7 +18,8 @@
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA 02111-1307, USA.
  *
- * Author: David Zeuthen <davidz redhat com>
+ * Authors: David Zeuthen <davidz redhat com>
+ *          Ryan Lortie <desrt desrt ca>
  */
 
 /*
@@ -298,9 +300,10 @@ struct _GDBusConnection
 
   /* Maps used for managing exported objects and subtrees */
   GHashTable *map_object_path_to_eo;  /* gchar* -> ExportedObject* */
-  GHashTable *map_id_to_ei;           /* guint  -> ExportedInterface* */
+  GHashTable *map_id_to_ei;           /* guint  -> ExportedInterface* for register_object() */
   GHashTable *map_object_path_to_es;  /* gchar* -> ExportedSubtree* */
   GHashTable *map_id_to_es;           /* guint  -> ExportedSubtree* */
+  GHashTable *map_id_to_ea;           /* guint  -> ExportedInterface* for export_actions() */
 
   /* Structure used for message filters */
   GPtrArray *filters;
@@ -844,6 +847,9 @@ g_dbus_connection_init (GDBusConnection *connection)
   connection->map_id_to_es = g_hash_table_new (g_direct_hash,
                                                g_direct_equal);
 
+  connection->map_id_to_ea = g_hash_table_new (g_direct_hash,
+                                               g_direct_equal);
+
   connection->main_context_at_construction = g_main_context_get_thread_default ();
   if (connection->main_context_at_construction != NULL)
     g_main_context_ref (connection->main_context_at_construction);
@@ -3561,8 +3567,10 @@ has_object_been_unregistered (GDBusConnection  *connection,
   ret = FALSE;
 
   CONNECTION_LOCK (connection);
-  if (registration_id != 0 && g_hash_table_lookup (connection->map_id_to_ei,
-                                                   GUINT_TO_POINTER (registration_id)) == NULL)
+  if (registration_id != 0 && (g_hash_table_lookup (connection->map_id_to_ei,
+                                                    GUINT_TO_POINTER (registration_id)) == NULL &&
+                               g_hash_table_lookup (connection->map_id_to_ea,
+                                                    GUINT_TO_POINTER (registration_id)) == NULL))
     {
       ret = TRUE;
     }
@@ -4483,6 +4491,48 @@ obj_message_func (GDBusConnection *connection,
   return handled;
 }
 
+/* finds an existing ExportedInterface for the named object_path and
+ * interface.  never returns %NULL.  you can tell if the returned
+ * ExportedInterface is new or old depending on if ->id has been set.
+ */
+static ExportedInterface *
+create_or_find_ei (GDBusConnection    *connection,
+                   const gchar        *object_path,
+                   GDBusInterfaceInfo *interface_info)
+{
+  ExportedInterface *ei;
+  ExportedObject *eo;
+
+  eo = g_hash_table_lookup (connection->map_object_path_to_eo, object_path);
+  if (eo == NULL)
+    {
+      eo = g_new0 (ExportedObject, 1);
+      eo->object_path = g_strdup (object_path);
+      eo->connection = connection;
+      eo->map_if_name_to_ei = g_hash_table_new_full (g_str_hash,
+                                                     g_str_equal,
+                                                     NULL,
+                                                     (GDestroyNotify) exported_interface_free);
+      g_hash_table_insert (connection->map_object_path_to_eo, eo->object_path, eo);
+    }
+
+  ei = g_hash_table_lookup (eo->map_if_name_to_ei, interface_info->name);
+
+  if (ei == NULL)
+    {
+      ei = g_new0 (ExportedInterface, 1);
+      ei->eo = eo;
+      ei->interface_info = g_dbus_interface_info_ref (interface_info);
+      ei->interface_name = g_strdup (interface_info->name);
+
+      ei->context = g_main_context_get_thread_default ();
+      if (ei->context != NULL)
+        g_main_context_ref (ei->context);
+    }
+
+  return ei;
+}
+
 /**
  * g_dbus_connection_register_object:
  * @connection: A #GDBusConnection.
@@ -4546,7 +4596,6 @@ g_dbus_connection_register_object (GDBusConnection            *connection,
                                    GDestroyNotify              user_data_free_func,
                                    GError                    **error)
 {
-  ExportedObject *eo;
   ExportedInterface *ei;
   guint ret;
 
@@ -4560,21 +4609,8 @@ g_dbus_connection_register_object (GDBusConnection            *connection,
 
   CONNECTION_LOCK (connection);
 
-  eo = g_hash_table_lookup (connection->map_object_path_to_eo, object_path);
-  if (eo == NULL)
-    {
-      eo = g_new0 (ExportedObject, 1);
-      eo->object_path = g_strdup (object_path);
-      eo->connection = connection;
-      eo->map_if_name_to_ei = g_hash_table_new_full (g_str_hash,
-                                                     g_str_equal,
-                                                     NULL,
-                                                     (GDestroyNotify) exported_interface_free);
-      g_hash_table_insert (connection->map_object_path_to_eo, eo->object_path, eo);
-    }
-
-  ei = g_hash_table_lookup (eo->map_if_name_to_ei, interface_info->name);
-  if (ei != NULL)
+  ei = create_or_find_ei (connection, object_path, interface_info);
+  if (ei->id != 0)
     {
       g_set_error (error,
                    G_IO_ERROR,
@@ -4585,19 +4621,12 @@ g_dbus_connection_register_object (GDBusConnection            *connection,
       goto out;
     }
 
-  ei = g_new0 (ExportedInterface, 1);
   ei->id = _global_registration_id++; /* TODO: overflow etc. */
-  ei->eo = eo;
   ei->user_data = user_data;
   ei->user_data_free_func = user_data_free_func;
   ei->vtable = _g_dbus_interface_vtable_copy (vtable);
-  ei->interface_info = g_dbus_interface_info_ref (interface_info);
-  ei->interface_name = g_strdup (interface_info->name);
-  ei->context = g_main_context_get_thread_default ();
-  if (ei->context != NULL)
-    g_main_context_ref (ei->context);
 
-  g_hash_table_insert (eo->map_if_name_to_ei,
+  g_hash_table_insert (ei->eo->map_if_name_to_ei,
                        (gpointer) ei->interface_name,
                        ei);
   g_hash_table_insert (connection->map_id_to_ei,
@@ -6271,3 +6300,492 @@ g_bus_get_finish (GAsyncResult  *res,
 }
 
 /* ---------------------------------------------------------------------------------------------------- */
+
+static GVariant *
+make_container (const GVariantType *type,
+                GVariant           *value)
+{
+  if (type)
+    value = g_variant_new_array (type, NULL, 0);
+
+  if (value)
+    value = g_variant_new_variant (value);
+
+  return g_variant_new_array (G_VARIANT_TYPE_VARIANT,
+                              &value, value != NULL);
+}
+
+static void
+describe_into_builder (GActionGroup    *actions,
+                       const gchar     *name,
+                       GVariantBuilder *builder)
+{
+  const GVariantType *type;
+  gboolean enabled;
+  GVariant *state;
+
+  type = g_action_group_get_parameter_type (actions, name);
+  enabled = g_action_group_get_enabled (actions, name);
+  state = g_action_group_get_state (actions, name);
+
+  g_variant_builder_add_value (builder, make_container (type, NULL));
+  g_variant_builder_add (builder, "b", enabled);
+  g_variant_builder_add_value (builder, make_container (NULL, state));
+
+  if (state != NULL)
+    g_variant_unref (state);
+}
+
+static void
+org_gtk_Actions_method_call (GDBusConnection       *connection,
+                             const gchar           *sender,
+                             const gchar           *object_path,
+                             const gchar           *interface_name,
+                             const gchar           *method_name,
+                             GVariant              *parameters,
+                             GDBusMethodInvocation *invocation,
+                             gpointer               user_data)
+{
+  GActionGroup *actions = user_data;
+
+  if (strcmp (method_name, "List") == 0)
+    {
+      GVariant *result;
+      gchar **list;
+
+      list = g_action_group_list_actions (actions);
+      result = g_variant_new ("(^as)", list);
+      g_dbus_method_invocation_return_value (invocation, result);
+      g_strfreev (list);
+    }
+
+  else if (strcmp (method_name, "Describe") == 0)
+    {
+      GVariantBuilder builder;
+      const gchar *name;
+
+      g_variant_get_child (parameters, 0, "s", &name);
+      g_variant_builder_init (&builder, G_VARIANT_TYPE ("(avbav)"));
+      describe_into_builder (actions, name, &builder);
+
+      g_dbus_method_invocation_return_value (invocation,
+                                             g_variant_builder_end (&builder));
+    }
+
+  else if (strcmp (method_name, "DescribeAll") == 0)
+    {
+      GVariantBuilder builder;
+      gchar **list;
+      gint i;
+
+      g_variant_builder_init (&builder, G_VARIANT_TYPE ("(a(savbav))"));
+      g_variant_builder_open (&builder, G_VARIANT_TYPE ("a(savbav)"));
+      list = g_action_group_list_actions (actions);
+
+      for (i = 0; list[i]; i++)
+        {
+          g_variant_builder_open (&builder, G_VARIANT_TYPE ("(savbav)"));
+          g_variant_builder_add (&builder, "s", list[i]);
+          describe_into_builder (actions, list[i], &builder);
+          g_variant_builder_close (&builder);
+        }
+      g_variant_builder_close (&builder);
+
+      g_dbus_method_invocation_return_value (invocation,
+                                             g_variant_builder_end (&builder));
+      g_strfreev (list);
+    }
+
+  else if (strcmp (method_name, "SetState") == 0)
+    {
+      GContextual *contextual = NULL;
+      const gchar *action_name;
+      GVariant *new_value;
+      GVariant *context;
+
+      g_variant_get (parameters,
+                     "(&sv a{sv})",
+                     &action_name,
+                     &new_value,
+                     &context);
+
+      if (G_IS_CONTEXTUAL (actions))
+        contextual = G_CONTEXTUAL (actions);
+
+      if (contextual)
+        g_contextual_push_context (contextual, context);
+
+      g_action_group_set_state (actions, action_name, new_value);
+
+      if (contextual)
+        g_contextual_pop_context (contextual, context);
+
+      g_dbus_method_invocation_return_value (invocation, NULL);
+
+      g_variant_unref (new_value);
+      g_variant_unref (context);
+    }
+
+  else if (strcmp (method_name, "Invoke") == 0)
+    {
+      GContextual *contextual = NULL;
+      const gchar *action_name;
+      GVariant *param_array;
+      GVariant *parameter;
+      GVariant *context;
+
+      g_variant_get (parameters,
+                     "(&s av@a{sv})",
+                     &action_name,
+                     &param_array,
+                     &context);
+
+      if (g_variant_n_children (param_array))
+        g_variant_get_child (param_array, 0, "v", &parameter);
+      else
+        parameter = NULL;
+
+      if (G_IS_CONTEXTUAL (actions))
+        contextual = G_CONTEXTUAL (actions);
+
+      if (contextual)
+        g_contextual_push_context (contextual, context);
+
+      g_action_group_activate (actions, action_name, parameter);
+
+      if (contextual)
+        g_contextual_pop_context (contextual, context);
+
+      g_dbus_method_invocation_return_value (invocation, NULL);
+
+      if (parameter)
+        g_variant_unref (parameter);
+
+      g_variant_unref (param_array);
+      g_variant_unref (context);
+    }
+
+  else
+    g_assert_not_reached ();
+}
+
+static const GDBusInterfaceVTable actions_vtable = {
+  org_gtk_Actions_method_call
+};
+
+static const GDBusArgInfo org_gtk_Actions_Common_arg_actions = {
+  -1, (gchar *) "actions", "as"
+};
+
+static const GDBusArgInfo * const org_gtk_Actions_Common_out_actions[] = {
+  &org_gtk_Actions_Common_arg_actions,
+  NULL
+};
+
+static const GDBusMethodInfo org_gtk_Actions_List = {
+  -1, (gchar *) "List", NULL,
+  (GDBusArgInfo **) org_gtk_Actions_Common_out_actions
+};
+
+static const GDBusArgInfo org_gtk_Actions_Common_arg_name = {
+  -1, (gchar *) "name", "s"
+};
+
+static const GDBusArgInfo * const org_gtk_Actions_Describe_in[] = {
+  &org_gtk_Actions_Common_arg_name,
+  NULL
+};
+
+static const GDBusArgInfo org_gtk_Actions_Common_arg_parameter_type = {
+  -1, (gchar *) "parameter-type", "av"
+};
+
+static const GDBusArgInfo org_gtk_Actions_Common_arg_enabled = {
+  -1, (gchar *) "enabled", "b"
+};
+
+static const GDBusArgInfo org_gtk_Actions_Describe_out_state = {
+  -1, (gchar *) "state", "av"
+};
+
+static const GDBusArgInfo * const org_gtk_Actions_Describe_out[] = {
+  &org_gtk_Actions_Common_arg_parameter_type,
+  &org_gtk_Actions_Common_arg_enabled,
+  &org_gtk_Actions_Describe_out_state,
+  NULL
+};
+
+static const GDBusMethodInfo org_gtk_Actions_Describe = {
+  -1, (gchar *) "Describe",
+ (GDBusArgInfo **) org_gtk_Actions_Describe_in,
+ (GDBusArgInfo **) org_gtk_Actions_Describe_out
+};
+
+static const GDBusArgInfo const org_gtk_Actions_Common_out_description = {
+  -1, (gchar *) "actions", "a(savbav)"
+};
+
+static const GDBusArgInfo * const org_gtk_Actions_Common_description[] = {
+  &org_gtk_Actions_Common_out_description,
+  NULL
+};
+
+static const GDBusMethodInfo org_gtk_Actions_DescribeAll = {
+  -1, (gchar *) "DescribeAll", NULL,
+  (GDBusArgInfo **) org_gtk_Actions_Common_description
+};
+
+static const GDBusArgInfo const org_gtk_Actions_Common_arg_state = {
+  -1, (gchar *) "state", "v"
+};
+
+static const GDBusArgInfo const org_gtk_Actions_Common_arg_context = {
+  -1, (gchar *) "context", "a{sv}"
+};
+
+static const GDBusArgInfo * const org_gtk_Actions_SetState_in[] = {
+  &org_gtk_Actions_Common_arg_name,
+  &org_gtk_Actions_Common_arg_state,
+  &org_gtk_Actions_Common_arg_context,
+  NULL
+};
+
+static const GDBusMethodInfo org_gtk_Actions_SetState = {
+  -1, (gchar *) "SetState",
+ (GDBusArgInfo **) org_gtk_Actions_SetState_in,
+};
+
+static const GDBusArgInfo const org_gtk_Actions_Invoke_in_parameter = {
+  -1, (gchar *) "parameter", "av"
+};
+
+static const GDBusArgInfo * const org_gtk_Actions_Invoke_in[] = {
+  &org_gtk_Actions_Common_arg_name,
+  &org_gtk_Actions_Invoke_in_parameter,
+  &org_gtk_Actions_Common_arg_context,
+  NULL
+};
+
+static const GDBusMethodInfo org_gtk_Actions_Invoke = {
+  -1, (gchar *) "Invoke",
+ (GDBusArgInfo **) org_gtk_Actions_Invoke_in,
+};
+
+static const GDBusMethodInfo * const org_gtk_Actions_methods[] = {
+  &org_gtk_Actions_List,
+  &org_gtk_Actions_Describe,
+  &org_gtk_Actions_DescribeAll,
+  &org_gtk_Actions_SetState,
+  &org_gtk_Actions_Invoke,
+  NULL
+};
+
+static const GDBusSignalInfo org_gtk_Actions_Added = {
+  -1, (gchar *) "Added",
+  (GDBusArgInfo **) org_gtk_Actions_Common_description
+};
+
+static const GDBusSignalInfo org_gtk_Actions_Removed = {
+  -1, (gchar *) "Removed",
+  (GDBusArgInfo **) &org_gtk_Actions_Common_out_actions
+};
+
+static const GDBusArgInfo * const org_gtk_Actions_EnabledChanged_args[] = {
+  &org_gtk_Actions_Common_arg_name,
+  &org_gtk_Actions_Common_arg_enabled,
+  NULL
+};
+
+static const GDBusSignalInfo org_gtk_Actions_EnabledChanged = {
+  -1, (gchar *) "EnabledChanged",
+  (GDBusArgInfo **) org_gtk_Actions_EnabledChanged_args
+};
+
+static const GDBusArgInfo * const org_gtk_Actions_StateChanged_args[] = {
+  &org_gtk_Actions_Common_arg_name,
+  &org_gtk_Actions_Common_arg_state,
+  NULL
+};
+
+static const GDBusSignalInfo org_gtk_Actions_StateChanged = {
+  -1, (gchar *) "StateChanged",
+  (GDBusArgInfo **) org_gtk_Actions_StateChanged_args
+};
+
+static const GDBusSignalInfo * const org_gtk_Actions_signals[] = {
+  &org_gtk_Actions_Removed,
+  &org_gtk_Actions_Added,
+  &org_gtk_Actions_EnabledChanged,
+  &org_gtk_Actions_StateChanged,
+  NULL
+};
+
+static const GDBusInterfaceInfo actions_interface = {
+  -1, (gchar *) "org.gtk.Actions",
+  (GDBusMethodInfo **) org_gtk_Actions_methods,
+  (GDBusSignalInfo **) org_gtk_Actions_signals
+};
+
+static void
+handle_added (GActionGroup *actions,
+              const gchar  *name,
+              gpointer      user_data)
+{
+  ExportedInterface *ei = user_data;
+  GVariantBuilder builder;
+
+  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(savbav)"));
+  g_variant_builder_open (&builder, G_VARIANT_TYPE ("(savbav)"));
+  g_variant_builder_add (&builder, "s", name);
+  describe_into_builder (actions, name, &builder);
+  g_variant_builder_close (&builder);
+
+  g_dbus_connection_emit_signal (ei->eo->connection, NULL,
+                                 ei->eo->object_path, "org.gtk.Actions",
+                                 "Added", g_variant_builder_end (&builder),
+                                 NULL);
+}
+
+static void
+handle_removed (GActionGroup *actions,
+                const gchar  *name,
+                gpointer      user_data)
+{
+  ExportedInterface *ei = user_data;
+  GVariantBuilder builder;
+
+  g_variant_builder_init (&builder, G_VARIANT_TYPE ("(as)"));
+  g_variant_builder_open (&builder, G_VARIANT_TYPE_STRING_ARRAY);
+  g_variant_builder_add (&builder, "s", name);
+  g_variant_builder_close (&builder);
+
+  g_dbus_connection_emit_signal (ei->eo->connection, NULL,
+                                 ei->eo->object_path, "org.gtk.Actions",
+                                 "Removed", g_variant_builder_end (&builder),
+                                 NULL);
+}
+
+static void
+handle_enabled (GActionGroup *actions,
+                const gchar  *name,
+                gboolean      enabled,
+                gpointer      user_data)
+{
+  ExportedInterface *ei = user_data;
+
+  g_dbus_connection_emit_signal (ei->eo->connection, NULL,
+                                 ei->eo->object_path, "org.gtk.Actions",
+                                 "EnabledChanged",
+                                 g_variant_new ("(sb)", name, enabled),
+                                 NULL);
+}
+
+static void
+handle_state (GActionGroup *actions,
+              const gchar  *name,
+              GVariant     *state,
+              gpointer      user_data)
+{
+  ExportedInterface *ei = user_data;
+
+  g_dbus_connection_emit_signal (ei->eo->connection, NULL,
+                                 ei->eo->object_path, "org.gtk.Actions",
+                                 "StateChanged",
+                                 g_variant_new ("(sv)", name, state),
+                                 NULL);
+}
+
+guint
+g_dbus_connection_export_actions (GDBusConnection  *connection,
+                                  const gchar      *object_path,
+                                  GActionGroup     *actions,
+                                  GError          **error)
+{
+  ExportedInterface *ei;
+  gint ret = 0;
+
+  CONNECTION_LOCK (connection);
+  ei = create_or_find_ei (connection, object_path,
+                          (GDBusInterfaceInfo *) &actions_interface);
+
+  if (ei->id)
+    {
+      if (ei->vtable == &actions_vtable)
+        g_set_error (error, G_IO_ERROR, G_IO_ERROR_EXISTS,
+                     _("Actions have already been exported at %s"),
+                     object_path);
+      else
+        g_set_error (error, G_IO_ERROR, G_IO_ERROR_EXISTS,
+                     _("An object is already exported for the interface %s at %s"),
+                     "org.gtk.Actions", object_path);
+      goto out;
+    }
+
+  ei->id = _global_registration_id++; /* TODO: overflow etc. */
+  ei->user_data = g_object_ref (actions);
+  ei->vtable = (GDBusInterfaceVTable *) &actions_vtable;
+
+  g_signal_connect (actions, "action-added",
+                    G_CALLBACK (handle_added), ei);
+  g_signal_connect (actions, "action-removed",
+                    G_CALLBACK (handle_removed), ei);
+  g_signal_connect (actions, "action-enabled-changed",
+                    G_CALLBACK (handle_enabled), ei);
+  g_signal_connect (actions, "action-state-changed",
+                    G_CALLBACK (handle_state), ei);
+
+  g_hash_table_insert (ei->eo->map_if_name_to_ei,
+                       (gpointer) ei->interface_name,
+                       ei);
+  g_hash_table_insert (connection->map_id_to_ea,
+                       GUINT_TO_POINTER (ei->id),
+                       ei);
+
+ out:
+  CONNECTION_UNLOCK (connection);
+
+  return ret;
+}
+
+gboolean
+g_dbus_connection_unexport_actions (GDBusConnection *connection,
+                                    guint            export_id)
+{
+  ExportedInterface *ei;
+  ExportedObject *eo;
+  gboolean ret;
+
+  g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), FALSE);
+
+  ret = FALSE;
+
+  CONNECTION_LOCK (connection);
+
+  ei = g_hash_table_lookup (connection->map_id_to_ea,
+                            GUINT_TO_POINTER (export_id));
+  if (ei == NULL)
+    goto out;
+
+  eo = ei->eo;
+
+  g_warn_if_fail (g_hash_table_remove (connection->map_id_to_ea, GUINT_TO_POINTER (ei->id)));
+  g_warn_if_fail (g_hash_table_remove (eo->map_if_name_to_ei, ei->interface_name));
+  /* unregister object path if we have no more exported interfaces */
+  if (g_hash_table_size (eo->map_if_name_to_ei) == 0)
+    g_warn_if_fail (g_hash_table_remove (connection->map_object_path_to_eo,
+                                         eo->object_path));
+
+  g_signal_handlers_disconnect_by_func (ei->user_data, handle_added, ei);
+  g_signal_handlers_disconnect_by_func (ei->user_data, handle_removed, ei);
+  g_signal_handlers_disconnect_by_func (ei->user_data, handle_enabled, ei);
+  g_signal_handlers_disconnect_by_func (ei->user_data, handle_state, ei);
+
+  ret = TRUE;
+
+ out:
+  CONNECTION_UNLOCK (connection);
+
+  return ret;
+}
+
+/* ---------------------------------------------------------------------------------------------------- */
diff --git a/gio/gdbusconnection.h b/gio/gdbusconnection.h
index d981787..6d2c83b 100644
--- a/gio/gdbusconnection.h
+++ b/gio/gdbusconnection.h
@@ -503,6 +503,16 @@ void  g_dbus_connection_remove_filter (GDBusConnection    *connection,
 
 /* ---------------------------------------------------------------------------------------------------- */
 
+guint    g_dbus_connection_export_actions (GDBusConnection  *connection,
+                                           const gchar      *object_path,
+                                           GActionGroup     *actions,
+                                           GError          **error);
+
+gboolean g_dbus_connection_unexport_actions (GDBusConnection *connection,
+                                             guint            export_id);
+
+/* ---------------------------------------------------------------------------------------------------- */
+
 
 G_END_DECLS
 
diff --git a/gio/gio.symbols b/gio/gio.symbols
index 3d1069e..13a2ce4 100644
--- a/gio/gio.symbols
+++ b/gio/gio.symbols
@@ -1638,6 +1638,8 @@ g_dbus_connection_register_object
 g_dbus_connection_unregister_object
 g_dbus_connection_register_subtree
 g_dbus_connection_unregister_subtree
+g_dbus_connection_export_actions
+g_dbus_connection_unexport_actions
 #endif
 #endif
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]