[glib] Add _with_closures alternative functions for those in GDBus that accept more than one callback.



commit 45e604d029980f90a7304b6311fc43cc0cc2ab69
Author: Tomeu Vizoso <tomeu vizoso collabora co uk>
Date:   Thu Jun 10 18:29:23 2010 +0200

    Add _with_closures alternative functions for those in GDBus that
    accept more than one callback.
    
    g_bus_own_name_with_closures
    g_bus_own_name_on_connection_with_closures
    g_bus_watch_name_with_closures
    g_bus_watch_name_on_connection_with_closures
    g_bus_watch_proxy_with_closures
    g_bus_watch_proxy_on_connection_with_closures
    
    https://bugzilla.gnome.org/show_bug.cgi?id=621092

 docs/reference/gio/gio-sections.txt |    6 +
 gio/gdbusnameowning.c               |  173 ++++++++++++++++++++++++++++++++++
 gio/gdbusnameowning.h               |   14 +++
 gio/gdbusnamewatching.c             |  149 +++++++++++++++++++++++++++++
 gio/gdbusnamewatching.h             |   11 ++
 gio/gdbusproxywatching.c            |  177 +++++++++++++++++++++++++++++++++++
 gio/gdbusproxywatching.h            |   19 ++++
 gio/gio.symbols                     |    6 +
 gio/pltcheck.sh                     |    2 +-
 9 files changed, 556 insertions(+), 1 deletions(-)
---
diff --git a/docs/reference/gio/gio-sections.txt b/docs/reference/gio/gio-sections.txt
index 319f812..e5531bb 100644
--- a/docs/reference/gio/gio-sections.txt
+++ b/docs/reference/gio/gio-sections.txt
@@ -2465,6 +2465,8 @@ GBusNameOwnerFlags
 g_bus_own_name
 g_bus_own_name_on_connection
 g_bus_unown_name
+g_bus_own_name_with_closures
+g_bus_own_name_on_connection_with_closures
 </SECTION>
 
 <SECTION>
@@ -2475,6 +2477,8 @@ GBusNameWatcherFlags
 g_bus_watch_name
 g_bus_watch_name_on_connection
 g_bus_unwatch_name
+g_bus_watch_name_with_closures
+g_bus_watch_name_on_connection_with_closures
 </SECTION>
 
 <SECTION>
@@ -2484,6 +2488,8 @@ GBusProxyVanishedCallback
 g_bus_watch_proxy
 g_bus_watch_proxy_on_connection
 g_bus_unwatch_proxy
+g_bus_watch_proxy_with_closures
+g_bus_watch_proxy_on_connection_with_closures
 </SECTION>
 
 <SECTION>
diff --git a/gio/gdbusnameowning.c b/gio/gdbusnameowning.c
index a20a344..576d144 100644
--- a/gio/gdbusnameowning.c
+++ b/gio/gdbusnameowning.c
@@ -628,6 +628,179 @@ g_bus_own_name (GBusType                  bus_type,
   return client->id;
 }
 
+typedef struct {
+  GClosure *bus_acquired_closure;
+  GClosure *name_acquired_closure;
+  GClosure *name_lost_closure;
+} OwnNameData;
+
+static void
+own_with_closures_on_bus_acquired (GDBusConnection *connection,
+                                   const gchar     *name,
+                                   gpointer         user_data)
+{
+  OwnNameData *data = user_data;
+  GValue params[2] = { { 0, }, { 0, } };
+
+  g_value_init (&params[0], G_TYPE_DBUS_CONNECTION);
+  g_value_set_object (&params[0], connection);
+
+  g_value_init (&params[1], G_TYPE_STRING);
+  g_value_set_string (&params[1], name);
+
+  g_closure_invoke (data->bus_acquired_closure, NULL, 2, params, NULL);
+}
+
+static void
+own_with_closures_on_name_acquired (GDBusConnection *connection,
+                                    const gchar     *name,
+                                    gpointer         user_data)
+{
+  OwnNameData *data = user_data;
+  GValue params[2] = { { 0, }, { 0, } };
+
+  g_value_init (&params[0], G_TYPE_DBUS_CONNECTION);
+  g_value_set_object (&params[0], connection);
+
+  g_value_init (&params[1], G_TYPE_STRING);
+  g_value_set_string (&params[1], name);
+
+  g_closure_invoke (data->name_acquired_closure, NULL, 2, params, NULL);
+}
+
+static void
+own_with_closures_on_name_lost (GDBusConnection *connection,
+                                const gchar     *name,
+                                gpointer         user_data)
+{
+  OwnNameData *data = user_data;
+  GValue params[2] = { { 0, }, { 0, } };
+
+  g_value_init (&params[0], G_TYPE_DBUS_CONNECTION);
+  g_value_set_object (&params[0], connection);
+
+  g_value_init (&params[1], G_TYPE_STRING);
+  g_value_set_string (&params[1], name);
+
+  g_closure_invoke (data->name_lost_closure, NULL, 2, params, NULL);
+}
+
+static void
+bus_own_name_free_func (gpointer user_data)
+{
+  OwnNameData *data = user_data;
+
+  if (data->bus_acquired_closure != NULL)
+    g_closure_unref (data->bus_acquired_closure);
+
+  if (data->name_acquired_closure != NULL)
+    g_closure_unref (data->name_acquired_closure);
+
+  if (data->name_lost_closure != NULL)
+    g_closure_unref (data->name_lost_closure);
+
+  g_free (data);
+}
+
+/**
+ * g_bus_own_name_with_closures:
+ * @bus_type: The type of bus to own a name on.
+ * @name: The well-known name to own.
+ * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
+ * @bus_acquired_closure: (allow-none): #GClosure to invoke when connected to
+ * the bus of type @bus_type or %NULL.
+ * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is
+ * acquired or %NULL.
+ * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or
+ * %NULL.
+ *
+ * Version of g_bus_own_name() using closures instead of callbacks for
+ * easier binding in other languages.
+ *
+ * Returns: An identifier (never 0) that an be used with
+ * g_bus_unown_name() to stop owning the name.
+ *
+ * Rename to: g_bus_own_name
+ *
+ * Since: 2.26
+ */
+guint
+g_bus_own_name_with_closures (GBusType                  bus_type,
+                              const gchar              *name,
+                              GBusNameOwnerFlags        flags,
+                              GClosure                 *bus_acquired_closure,
+                              GClosure                 *name_acquired_closure,
+                              GClosure                 *name_lost_closure)
+{
+  OwnNameData *data;
+
+  data = g_new0 (OwnNameData, 1);
+
+  if (bus_acquired_closure != NULL)
+    data->bus_acquired_closure = g_closure_ref (bus_acquired_closure);
+
+  if (name_acquired_closure != NULL)
+    data->name_acquired_closure = g_closure_ref (name_acquired_closure);
+
+  if (name_lost_closure != NULL)
+    data->name_lost_closure = g_closure_ref (name_lost_closure);
+
+  return g_bus_own_name (bus_type,
+          name,
+          flags,
+          bus_acquired_closure != NULL ? own_with_closures_on_bus_acquired : NULL,
+          name_acquired_closure != NULL ? own_with_closures_on_name_acquired : NULL,
+          name_lost_closure != NULL ? own_with_closures_on_name_lost : NULL,
+          data,
+          bus_own_name_free_func);
+}
+
+/**
+ * g_bus_own_name_on_connection_with_closures:
+ * @connection: A #GDBusConnection that is not closed.
+ * @name: The well-known name to own.
+ * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
+ * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is
+ * acquired or %NULL.
+ * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or
+ * %NULL.
+ *
+ * Version of g_bus_own_name_on_connection() using closures instead of callbacks for
+ * easier binding in other languages.
+ *
+ * Returns: An identifier (never 0) that an be used with
+ * g_bus_unown_name() to stop owning the name.
+ *
+ * Rename to: g_bus_own_name_on_connection
+ *
+ * Since: 2.26
+ */
+guint
+g_bus_own_name_on_connection_with_closures (GDBusConnection          *connection,
+                                            const gchar              *name,
+                                            GBusNameOwnerFlags        flags,
+                                            GClosure                 *name_acquired_closure,
+                                            GClosure                 *name_lost_closure)
+{
+  OwnNameData *data;
+
+  data = g_new0 (OwnNameData, 1);
+
+  if (name_acquired_closure != NULL)
+    data->name_acquired_closure = g_closure_ref (name_acquired_closure);
+
+  if (name_lost_closure != NULL)
+    data->name_lost_closure = g_closure_ref (name_lost_closure);
+
+  return g_bus_own_name_on_connection (connection,
+          name,
+          flags,
+          name_acquired_closure != NULL ? own_with_closures_on_name_acquired : NULL,
+          name_lost_closure != NULL ? own_with_closures_on_name_lost : NULL,
+          data,
+          bus_own_name_free_func);
+}
+
 /**
  * g_bus_unown_name:
  * @owner_id: An identifier obtained from g_bus_own_name()
diff --git a/gio/gdbusnameowning.h b/gio/gdbusnameowning.h
index 85921bb..fc4b92c 100644
--- a/gio/gdbusnameowning.h
+++ b/gio/gdbusnameowning.h
@@ -91,6 +91,20 @@ guint g_bus_own_name_on_connection   (GDBusConnection          *connection,
                                       gpointer                  user_data,
                                       GDestroyNotify            user_data_free_func);
 
+guint g_bus_own_name_with_closures   (GBusType                  bus_type,
+                                      const gchar              *name,
+                                      GBusNameOwnerFlags        flags,
+                                      GClosure                 *bus_acquired_closure,
+                                      GClosure                 *name_acquired_closure,
+                                      GClosure                 *name_lost_closure);
+
+guint g_bus_own_name_on_connection_with_closures (
+                                      GDBusConnection          *connection,
+                                      const gchar              *name,
+                                      GBusNameOwnerFlags        flags,
+                                      GClosure                 *name_acquired_closure,
+                                      GClosure                 *name_lost_closure);
+
 void  g_bus_unown_name               (guint                     owner_id);
 
 G_END_DECLS
diff --git a/gio/gdbusnamewatching.c b/gio/gdbusnamewatching.c
index 8c0e7a5..cb087a8 100644
--- a/gio/gdbusnamewatching.c
+++ b/gio/gdbusnamewatching.c
@@ -650,6 +650,155 @@ guint g_bus_watch_name_on_connection (GDBusConnection          *connection,
   return client->id;
 }
 
+typedef struct {
+  GClosure *name_appeared_closure;
+  GClosure *name_vanished_closure;
+} WatchNameData;
+
+static void
+watch_with_closures_on_name_appeared (GDBusConnection *connection,
+                                      const gchar     *name,
+                                      const gchar     *name_owner,
+                                      gpointer         user_data)
+{
+  WatchNameData *data = user_data;
+  GValue params[3] = { { 0, }, { 0, }, { 0, } };
+
+  g_value_init (&params[0], G_TYPE_DBUS_CONNECTION);
+  g_value_set_object (&params[0], connection);
+
+  g_value_init (&params[1], G_TYPE_STRING);
+  g_value_set_string (&params[1], name);
+
+  g_value_init (&params[2], G_TYPE_STRING);
+  g_value_set_string (&params[2], name_owner);
+
+  g_closure_invoke (data->name_appeared_closure, NULL, 3, params, NULL);
+}
+
+static void
+watch_with_closures_on_name_vanished (GDBusConnection *connection,
+                                      const gchar     *name,
+                                      gpointer         user_data)
+{
+  WatchNameData *data = user_data;
+  GValue params[2] = { { 0, }, { 0, } };
+
+  g_value_init (&params[0], G_TYPE_DBUS_CONNECTION);
+  g_value_set_object (&params[0], connection);
+
+  g_value_init (&params[1], G_TYPE_STRING);
+  g_value_set_string (&params[1], name);
+
+  g_closure_invoke (data->name_vanished_closure, NULL, 2, params, NULL);
+}
+
+static void
+bus_watch_name_free_func (gpointer user_data)
+{
+  WatchNameData *data = user_data;
+
+  if (data->name_appeared_closure != NULL)
+    g_closure_unref (data->name_appeared_closure);
+
+  if (data->name_vanished_closure != NULL)
+    g_closure_unref (data->name_vanished_closure);
+
+  g_free (data);
+}
+
+/**
+ * g_bus_watch_name_with_closures:
+ * @bus_type: The type of bus to watch a name on.
+ * @name: The name (well-known or unique) to watch.
+ * @flags: Flags from the #GBusNameWatcherFlags enumeration.
+ * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known
+ * to exist or %NULL.
+ * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known
+ * to not exist or %NULL.
+ *
+ * Version of g_bus_watch_name() using closures instead of callbacks for
+ * easier binding in other languages.
+ *
+ * Returns: An identifier (never 0) that an be used with
+ * g_bus_unwatch_name() to stop watching the name.
+ *
+ * Rename to: g_bus_watch_name
+ *
+ * Since: 2.26
+ */
+guint
+g_bus_watch_name_with_closures (GBusType                 bus_type,
+                                const gchar             *name,
+                                GBusNameWatcherFlags     flags,
+                                GClosure                *name_appeared_closure,
+                                GClosure                *name_vanished_closure)
+{
+  WatchNameData *data;
+
+  data = g_new0 (WatchNameData, 1);
+
+  if (name_appeared_closure != NULL)
+    data->name_appeared_closure = g_closure_ref (name_appeared_closure);
+
+  if (name_vanished_closure != NULL)
+    data->name_vanished_closure = g_closure_ref (name_vanished_closure);
+
+  return g_bus_watch_name (bus_type,
+          name,
+          flags,
+          name_appeared_closure != NULL ? watch_with_closures_on_name_appeared : NULL,
+          name_vanished_closure != NULL ? watch_with_closures_on_name_vanished : NULL,
+          data,
+          bus_watch_name_free_func);
+}
+
+/**
+ * g_bus_watch_name_on_connection_with_closures:
+ * @connection: A #GDBusConnection that is not closed.
+ * @name: The name (well-known or unique) to watch.
+ * @flags: Flags from the #GBusNameWatcherFlags enumeration.
+ * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known
+ * to exist or %NULL.
+ * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known
+ * to not exist or %NULL.
+ *
+ * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for
+ * easier binding in other languages.
+ *
+ * Returns: An identifier (never 0) that an be used with
+ * g_bus_unwatch_name() to stop watching the name.
+ *
+ * Rename to: g_bus_watch_name_on_connection
+ *
+ * Since: 2.26
+ */
+guint g_bus_watch_name_on_connection_with_closures (
+                                      GDBusConnection          *connection,
+                                      const gchar              *name,
+                                      GBusNameWatcherFlags      flags,
+                                      GClosure                 *name_appeared_closure,
+                                      GClosure                 *name_vanished_closure)
+{
+  WatchNameData *data;
+
+  data = g_new0 (WatchNameData, 1);
+
+  if (name_appeared_closure != NULL)
+    data->name_appeared_closure = g_closure_ref (name_appeared_closure);
+
+  if (name_vanished_closure != NULL)
+    data->name_vanished_closure = g_closure_ref (name_vanished_closure);
+
+  return g_bus_watch_name_on_connection (connection,
+          name,
+          flags,
+          name_appeared_closure != NULL ? watch_with_closures_on_name_appeared : NULL,
+          name_vanished_closure != NULL ? watch_with_closures_on_name_vanished : NULL,
+          data,
+          bus_watch_name_free_func);
+}
+
 /**
  * g_bus_unwatch_name:
  * @watcher_id: An identifier obtained from g_bus_watch_name()
diff --git a/gio/gdbusnamewatching.h b/gio/gdbusnamewatching.h
index 5d410bc..3e3f75a 100644
--- a/gio/gdbusnamewatching.h
+++ b/gio/gdbusnamewatching.h
@@ -76,6 +76,17 @@ guint g_bus_watch_name_on_connection (GDBusConnection          *connection,
                                       GBusNameVanishedCallback  name_vanished_handler,
                                       gpointer                  user_data,
                                       GDestroyNotify            user_data_free_func);
+guint g_bus_watch_name_with_closures (GBusType                  bus_type,
+                                      const gchar              *name,
+                                      GBusNameWatcherFlags      flags,
+                                      GClosure                 *name_appeared_closure,
+                                      GClosure                 *name_vanished_closure);
+guint g_bus_watch_name_on_connection_with_closures (
+                                      GDBusConnection          *connection,
+                                      const gchar              *name,
+                                      GBusNameWatcherFlags      flags,
+                                      GClosure                 *name_appeared_closure,
+                                      GClosure                 *name_vanished_closure);
 void  g_bus_unwatch_name             (guint                     watcher_id);
 
 G_END_DECLS
diff --git a/gio/gdbusproxywatching.c b/gio/gdbusproxywatching.c
index 17ab078..48dabd4 100644
--- a/gio/gdbusproxywatching.c
+++ b/gio/gdbusproxywatching.c
@@ -445,6 +445,183 @@ g_bus_watch_proxy_on_connection (GDBusConnection           *connection,
   return client->id;
 }
 
+typedef struct {
+  GClosure *proxy_appeared_closure;
+  GClosure *proxy_vanished_closure;
+} WatchProxyData;
+
+static void
+watch_with_closures_on_proxy_appeared (GDBusConnection *connection,
+                                       const gchar     *name,
+                                       const gchar     *name_owner,
+                                       GDBusProxy      *proxy,
+                                       gpointer         user_data)
+{
+  WatchProxyData *data = user_data;
+  GValue params[4] = { { 0, }, { 0, }, { 0, }, { 0, } };
+
+  g_value_init (&params[0], G_TYPE_DBUS_CONNECTION);
+  g_value_set_object (&params[0], connection);
+
+  g_value_init (&params[1], G_TYPE_STRING);
+  g_value_set_string (&params[1], name);
+
+  g_value_init (&params[2], G_TYPE_STRING);
+  g_value_set_string (&params[2], name_owner);
+
+  g_value_init (&params[3], G_TYPE_DBUS_PROXY);
+  g_value_set_object (&params[3], proxy);
+
+  g_closure_invoke (data->proxy_appeared_closure, NULL, 4, params, NULL);
+}
+
+static void
+watch_with_closures_on_proxy_vanished (GDBusConnection *connection,
+                                       const gchar     *name,
+                                       gpointer         user_data)
+{
+  WatchProxyData *data = user_data;
+  GValue params[2] = { { 0, }, { 0, } };
+
+  g_value_init (&params[0], G_TYPE_DBUS_CONNECTION);
+  g_value_set_object (&params[0], connection);
+
+  g_value_init (&params[1], G_TYPE_STRING);
+  g_value_set_string (&params[1], name);
+
+  g_closure_invoke (data->proxy_vanished_closure, NULL, 2, params, NULL);
+}
+
+static void
+bus_watch_proxy_free_func (gpointer user_data)
+{
+  WatchProxyData *data = user_data;
+
+  if (data->proxy_appeared_closure != NULL)
+    g_closure_unref (data->proxy_appeared_closure);
+
+  if (data->proxy_vanished_closure != NULL)
+    g_closure_unref (data->proxy_vanished_closure);
+
+  g_free (data);
+}
+
+/**
+ * g_bus_watch_proxy_with_closures:
+ * @bus_type: The type of bus to watch a name on.
+ * @name: The name (well-known or unique) to watch.
+ * @flags: Flags from the #GBusNameWatcherFlags enumeration.
+ * @object_path: The object path of the remote object to watch.
+ * @interface_name: The D-Bus interface name for the proxy.
+ * @interface_type: The #GType for the kind of proxy to create. This must be a #GDBusProxy derived type.
+ * @proxy_flags: Flags from #GDBusProxyFlags to use when constructing the proxy.
+ * @proxy_appeared_closure: (allow-none): #GClosure to invoke when @name is
+ * known to exist and the requested proxy is available.
+ * @proxy_vanished_closure: (allow-none): #GClosure to invoke when @name is
+ * known to not exist and the previously created proxy is no longer available.
+ *
+ * Version of g_bus_watch_proxy() using closures instead of callbacks for
+ * easier binding in other languages.
+ *
+ * Returns: An identifier (never 0) that can be used with
+ * g_bus_unwatch_proxy() to stop watching the remote object.
+ *
+ * Rename to: g_bus_watch_proxy
+ *
+ * Since: 2.26
+ */
+guint
+g_bus_watch_proxy_with_closures (GBusType                   bus_type,
+                                 const gchar               *name,
+                                 GBusNameWatcherFlags       flags,
+                                 const gchar               *object_path,
+                                 const gchar               *interface_name,
+                                 GType                      interface_type,
+                                 GDBusProxyFlags            proxy_flags,
+                                 GClosure                  *proxy_appeared_closure,
+                                 GClosure                  *proxy_vanished_closure)
+{
+  WatchProxyData *data;
+
+  data = g_new0 (WatchProxyData, 1);
+
+  if (proxy_appeared_closure != NULL)
+    data->proxy_appeared_closure = g_closure_ref (proxy_appeared_closure);
+
+  if (proxy_vanished_closure != NULL)
+    data->proxy_vanished_closure = g_closure_ref (proxy_vanished_closure);
+
+  return g_bus_watch_proxy (bus_type,
+          name,
+          flags,
+          object_path,
+          interface_name,
+          interface_type,
+          proxy_flags,
+          proxy_appeared_closure != NULL ? watch_with_closures_on_proxy_appeared : NULL,
+          proxy_vanished_closure != NULL ? watch_with_closures_on_proxy_vanished : NULL,
+          data,
+          bus_watch_proxy_free_func);
+}
+
+/**
+ * g_bus_watch_proxy_on_connection_with_closures:
+ * @connection: A #GDBusConnection that is not closed.
+ * @name: The name (well-known or unique) to watch.
+ * @flags: Flags from the #GBusNameWatcherFlags enumeration.
+ * @object_path: The object path of the remote object to watch.
+ * @interface_name: The D-Bus interface name for the proxy.
+ * @interface_type: The #GType for the kind of proxy to create. This must be a #GDBusProxy derived type.
+ * @proxy_flags: Flags from #GDBusProxyFlags to use when constructing the proxy.
+ * @proxy_appeared_closure: (allow-none): #GClosure to invoke when @name is
+ * known to exist and the requested proxy is available.
+ * @proxy_vanished_closure: (allow-none): #GClosure to invoke when @name is
+ * known to not exist and the previously created proxy is no longer available.
+ *
+ * Version of g_bus_watch_proxy_on_connection() using closures instead of
+ * callbacks for easier binding in other languages.
+ *
+ * Returns: An identifier (never 0) that can be used with
+ * g_bus_unwatch_proxy() to stop watching the remote object.
+ *
+ * Rename to: g_bus_watch_proxy_on_connection
+ *
+ * Since: 2.26
+ */
+guint
+g_bus_watch_proxy_on_connection_with_closures (
+                                 GDBusConnection           *connection,
+                                 const gchar               *name,
+                                 GBusNameWatcherFlags       flags,
+                                 const gchar               *object_path,
+                                 const gchar               *interface_name,
+                                 GType                      interface_type,
+                                 GDBusProxyFlags            proxy_flags,
+                                 GClosure                  *proxy_appeared_closure,
+                                 GClosure                  *proxy_vanished_closure)
+{
+  WatchProxyData *data;
+
+  data = g_new0 (WatchProxyData, 1);
+
+  if (proxy_appeared_closure != NULL)
+    data->proxy_appeared_closure = g_closure_ref (proxy_appeared_closure);
+
+  if (proxy_vanished_closure != NULL)
+    data->proxy_vanished_closure = g_closure_ref (proxy_vanished_closure);
+
+  return g_bus_watch_proxy_on_connection (connection,
+          name,
+          flags,
+          object_path,
+          interface_name,
+          interface_type,
+          proxy_flags,
+          proxy_appeared_closure != NULL ? watch_with_closures_on_proxy_appeared : NULL,
+          proxy_vanished_closure != NULL ? watch_with_closures_on_proxy_vanished : NULL,
+          data,
+          bus_watch_proxy_free_func);
+}
 
 /**
  * g_bus_unwatch_proxy:
diff --git a/gio/gdbusproxywatching.h b/gio/gdbusproxywatching.h
index 3f9ccfb..5b3bebd 100644
--- a/gio/gdbusproxywatching.h
+++ b/gio/gdbusproxywatching.h
@@ -89,6 +89,25 @@ guint g_bus_watch_proxy_on_connection (GDBusConnection           *connection,
                                        GBusProxyVanishedCallback  proxy_vanished_handler,
                                        gpointer                   user_data,
                                        GDestroyNotify             user_data_free_func);
+guint g_bus_watch_proxy_with_closures (GBusType                   bus_type,
+                                       const gchar               *name,
+                                       GBusNameWatcherFlags       flags,
+                                       const gchar               *object_path,
+                                       const gchar               *interface_name,
+                                       GType                      interface_type,
+                                       GDBusProxyFlags            proxy_flags,
+                                       GClosure                  *proxy_appeared_closure,
+                                       GClosure                  *proxy_vanished_closure);
+guint g_bus_watch_proxy_on_connection_with_closures (
+                                       GDBusConnection           *connection,
+                                       const gchar               *name,
+                                       GBusNameWatcherFlags       flags,
+                                       const gchar               *object_path,
+                                       const gchar               *interface_name,
+                                       GType                      interface_type,
+                                       GDBusProxyFlags            proxy_flags,
+                                       GClosure                  *proxy_appeared_closure,
+                                       GClosure                  *proxy_vanished_closure);
 void  g_bus_unwatch_proxy             (guint                      watcher_id);
 
 G_END_DECLS
diff --git a/gio/gio.symbols b/gio/gio.symbols
index a366e22..ab63d7f 100644
--- a/gio/gio.symbols
+++ b/gio/gio.symbols
@@ -1673,6 +1673,8 @@ g_dbus_method_invocation_return_value
 g_bus_own_name
 g_bus_own_name_on_connection
 g_bus_unown_name
+g_bus_own_name_with_closures
+g_bus_own_name_on_connection_with_closures
 #endif
 #endif
 
@@ -1681,6 +1683,8 @@ g_bus_unown_name
 g_bus_watch_name
 g_bus_watch_name_on_connection
 g_bus_unwatch_name
+g_bus_watch_name_with_closures
+g_bus_watch_name_on_connection_with_closures
 #endif
 #endif
 
@@ -1713,6 +1717,8 @@ g_dbus_proxy_call_sync
 g_bus_watch_proxy
 g_bus_watch_proxy_on_connection
 g_bus_unwatch_proxy
+g_bus_watch_proxy_with_closures
+g_bus_watch_proxy_on_connection_with_closures
 #endif
 #endif
 
diff --git a/gio/pltcheck.sh b/gio/pltcheck.sh
index 474e37f..7b3a236 100755
--- a/gio/pltcheck.sh
+++ b/gio/pltcheck.sh
@@ -9,7 +9,7 @@ if ! which readelf 2>/dev/null >/dev/null; then
 	exit 0
 fi
 
-SKIP='\<g_access\|\<g_array_\|\<g_ascii\|\<g_list_\|\<g_assertion_message\|\<g_warn_message\|\<g_atomic\|\<g_bit_\|\<g_boxed\|\<g_build_filename\|\<g_byte_array\|\<g_checksum\|\<g_child_watch\|\<g_clear_error\|\<g_convert\|\<g_dir_\|\<g_enum_\|\<g_error_\|\<g_prefix_error\|\<g_file_error_quark\|\<g_file_get_contents\|\<g_file_set_contents\|\<g_file_test\|\<g_file_read_link\|\<g_filename_\|\<g_find_program_in_path\|\<g_flags_\|\<g_free\|\<g_get_\|\<g_getenv\|\<g_setenv\|\<g_hash_table_\|\<g_hostname_\|\<g_iconv\|\<g_idle_\|\<g_intern_static_string\|\<g_io_add_watch\|\<g_io_channel_\|\<g_io_create_watch\|\<g_key_file_\|\<g_listenv\|\<g_locale_to_utf8\|\<g_log\|\<g_main_context_\|\<g_main_current_source\|\<g_main_loop_\|\<g_malloc\|\<g_markup_\|\<g_mkdir_\|\<g_mkstemp\|\<g_module_\|\<g_object_\|\<g_once_\|\<g_param_spec_\|\<g_path_\|\<g_poll\|\<g_printerr\|\<g_propagate_error\|\<g_ptr_array_\|\<g_qsort_\|\<g_quark_\|\<g_queue_\|\<g_random_int_range\|\<g_realloc\|\<g_return_if_f
 ail\|\<g_set_error\|\<g_shell_\|\<g_signal_\|\<g_slice_\|\<g_slist_\|\<g_snprintf\|\<g_source_\|\<g_spawn_\|\<g_static_\|\<g_str\|\<g_thread_pool_\|\<g_time_val_add\|\<g_timeout_\|\<g_type_\|\<g_unlink\|\<g_uri_\|\<g_utf8_\|\<g_value_\|\<g_tree_\|\<g_variant_\|\<g_mapped_file_\|\<g_intern_string\>\|\<g_compute_checksum\|\<g_memdup\|\<g_print\|\<g_random_int\|\<g_propagate_prefixed_e\|\<g_thread_create_full\|\<g_int_hash\|\<g_file_open_tmp\|\<g_thread_self\|\<g_usleep\|\<g_dcgettext\|\<g_dgettext'
+SKIP='\<g_access\|\<g_array_\|\<g_ascii\|\<g_list_\|\<g_assertion_message\|\<g_warn_message\|\<g_atomic\|\<g_bit_\|\<g_boxed\|\<g_build_filename\|\<g_byte_array\|\<g_checksum\|\<g_child_watch\|\<g_clear_error\|\<g_convert\|\<g_dir_\|\<g_enum_\|\<g_error_\|\<g_prefix_error\|\<g_file_error_quark\|\<g_file_get_contents\|\<g_file_set_contents\|\<g_file_test\|\<g_file_read_link\|\<g_filename_\|\<g_find_program_in_path\|\<g_flags_\|\<g_free\|\<g_get_\|\<g_getenv\|\<g_setenv\|\<g_hash_table_\|\<g_hostname_\|\<g_iconv\|\<g_idle_\|\<g_intern_static_string\|\<g_io_add_watch\|\<g_io_channel_\|\<g_io_create_watch\|\<g_key_file_\|\<g_listenv\|\<g_locale_to_utf8\|\<g_log\|\<g_main_context_\|\<g_main_current_source\|\<g_main_loop_\|\<g_malloc\|\<g_markup_\|\<g_mkdir_\|\<g_mkstemp\|\<g_module_\|\<g_object_\|\<g_once_\|\<g_param_spec_\|\<g_path_\|\<g_poll\|\<g_printerr\|\<g_propagate_error\|\<g_ptr_array_\|\<g_qsort_\|\<g_quark_\|\<g_queue_\|\<g_random_int_range\|\<g_realloc\|\<g_return_if_f
 ail\|\<g_set_error\|\<g_shell_\|\<g_signal_\|\<g_slice_\|\<g_slist_\|\<g_snprintf\|\<g_source_\|\<g_spawn_\|\<g_static_\|\<g_str\|\<g_thread_pool_\|\<g_time_val_add\|\<g_timeout_\|\<g_type_\|\<g_unlink\|\<g_uri_\|\<g_utf8_\|\<g_value_\|\<g_tree_\|\<g_variant_\|\<g_mapped_file_\|\<g_intern_string\>\|\<g_compute_checksum\|\<g_memdup\|\<g_print\|\<g_random_int\|\<g_propagate_prefixed_e\|\<g_thread_create_full\|\<g_int_hash\|\<g_file_open_tmp\|\<g_thread_self\|\<g_usleep\|\<g_dcgettext\|\<g_dgettext\|\<g_closure'
 
 for so in .libs/lib*.so; do
 	echo Checking $so for local PLT entries



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