[gupnp: 13/18] Remove _gi function variants



commit 228cebc15651f9e6720dcb5271d2a5feaf8efd6e
Author: Jens Georg <mail jensge org>
Date:   Fri Sep 30 13:42:49 2016 +0200

    Remove _gi function variants
    
    Signed-off-by: Jens Georg <mail jensge org>

 doc/gupnp-sections.txt         |    2 -
 libgupnp/gupnp-service-proxy.c |  124 ++++++----------------------------------
 libgupnp/gupnp-service-proxy.h |   32 +---------
 vala/GUPnP-1.2.metadata        |    4 -
 vala/gupnp-1.2-custom.vala     |    7 +-
 5 files changed, 24 insertions(+), 145 deletions(-)
---
diff --git a/doc/gupnp-sections.txt b/doc/gupnp-sections.txt
index e3b0e79..12f9c77 100644
--- a/doc/gupnp-sections.txt
+++ b/doc/gupnp-sections.txt
@@ -73,11 +73,9 @@ GUPnPServiceProxyActionCallback
 GUPnPServiceProxyNotifyCallback
 gupnp_service_proxy_send_action
 gupnp_service_proxy_send_action_valist
-gupnp_service_proxy_send_action_hash
 gupnp_service_proxy_send_action_list
 gupnp_service_proxy_begin_action
 gupnp_service_proxy_begin_action_valist
-gupnp_service_proxy_begin_action_hash
 gupnp_service_proxy_begin_action_list
 gupnp_service_proxy_end_action
 gupnp_service_proxy_end_action_valist
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 8e7157c..cf837ef 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -644,8 +644,8 @@ gupnp_service_proxy_send_action_valist (GUPnPServiceProxy *proxy,
 
         result = gupnp_service_proxy_end_action_hash (proxy,
                                                       handle,
-                                                      &local_error,
-                                                      out_hash);
+                                                      out_hash,
+                                                      &local_error);
 
         if (local_error == NULL) {
                 OUT_HASH_TABLE_TO_VAR_ARGS (out_hash, var_args_copy);
@@ -727,10 +727,9 @@ gupnp_service_proxy_send_action_hash (GUPnPServiceProxy *proxy,
 }
 
 /**
- * gupnp_service_proxy_send_action_list_gi: (rename-to gupnp_service_proxy_send_action_list)
+ * gupnp_service_proxy_send_action_list: (rename-to gupnp_service_proxy_send_action_list)
  * @proxy: (transfer none) : A #GUPnPServiceProxy
  * @action: An action
- * @error: The location where to store any error, or %NULL
  * @in_names: (element-type utf8) (transfer none): #GList of 'in' parameter
  * names (as strings)
  * @in_values: (element-type GValue) (transfer none): #GList of values (as
@@ -741,58 +740,23 @@ gupnp_service_proxy_send_action_hash (GUPnPServiceProxy *proxy,
  * that line up with @out_names
  * @out_values: (element-type GValue) (transfer full) (out): #GList of values
  * (as #GValue) that line up with @out_names and @out_types.
- *
- * The synchronous variant of #gupnp_service_proxy_begin_action_list and
- * #gupnp_service_proxy_end_action_list.
- *
- * Return value: %TRUE if sending the action was succesful.
- *
- **/
-gboolean
-gupnp_service_proxy_send_action_list_gi (GUPnPServiceProxy *proxy,
-                                         const char        *action,
-                                         GList             *in_names,
-                                         GList             *in_values,
-                                         GList             *out_names,
-                                         GList             *out_types,
-                                         GList            **out_values,
-                                         GError           **error)
-{
-    return gupnp_service_proxy_send_action_list (proxy, action, error, in_names, in_values, out_names, 
out_types, out_values);
-}
-
-/**
- * gupnp_service_proxy_send_action_list: (skip)
- * @proxy: A #GUPnPServiceProxy
- * @action: An action
  * @error: (allow-none): The location where to store any error, or %NULL
- * @in_names: (element-type utf8) (transfer none): #GList of 'in' parameter
- * names (as strings)
- * @in_values: (element-type GValue) (transfer none): #GList of values (as
- * #GValue) that line up with @in_names
- * @out_names: (element-type utf8) (transfer none): #GList of 'out' parameter
- * names (as strings)
- * @out_types: (element-type GType) (transfer none): #GList of types (as #GType)
- * that line up with @out_names
- * @out_values: (element-type GValue) (transfer full) (out): #GList of values
- * (as #GValue) that line up with @out_names and @out_types.
  *
  * The synchronous variant of #gupnp_service_proxy_begin_action_list and
  * #gupnp_service_proxy_end_action_list.
  *
  * Return value: %TRUE if sending the action was succesful.
  *
- * Since: 0.13.3
  **/
 gboolean
 gupnp_service_proxy_send_action_list (GUPnPServiceProxy *proxy,
                                       const char        *action,
-                                      GError           **error,
                                       GList             *in_names,
                                       GList             *in_values,
                                       GList             *out_names,
                                       GList             *out_types,
-                                      GList            **out_values)
+                                      GList            **out_values,
+                                      GError           **error)
 {
         GMainLoop *main_loop;
         GUPnPServiceProxyAction *handle;
@@ -823,10 +787,10 @@ gupnp_service_proxy_send_action_list (GUPnPServiceProxy *proxy,
 
         if (!gupnp_service_proxy_end_action_list (proxy,
                                                   handle,
-                                                  error,
                                                   out_names,
                                                   out_types,
-                                                  out_values))
+                                                  out_values,
+                                                  error))
                 return FALSE;
 
         return TRUE;
@@ -1461,8 +1425,8 @@ gupnp_service_proxy_end_action_valist (GUPnPServiceProxy       *proxy,
         local_error = NULL;
         result = gupnp_service_proxy_end_action_hash (proxy,
                                                       action,
-                                                      &local_error,
-                                                      out_hash);
+                                                      out_hash,
+                                                      &local_error);
 
         if (local_error == NULL) {
                 OUT_HASH_TABLE_TO_VAR_ARGS (out_hash, var_args_copy);
@@ -1476,7 +1440,7 @@ gupnp_service_proxy_end_action_valist (GUPnPServiceProxy       *proxy,
 }
 
 /**
- * gupnp_service_proxy_end_action_list_gi: (rename-to gupnp_service_proxy_end_action_list)
+ * gupnp_service_proxy_end_action_list:
  * @proxy: A #GUPnPServiceProxy
  * @action: A #GUPnPServiceProxyAction handle
  * @error: The location where to store any error, or %NULL
@@ -1496,43 +1460,12 @@ gupnp_service_proxy_end_action_valist (GUPnPServiceProxy       *proxy,
  *
  **/
 gboolean
-gupnp_service_proxy_end_action_list_gi (GUPnPServiceProxy       *proxy,
-                                        GUPnPServiceProxyAction *action,
-                                        GList                   *out_names,
-                                        GList                   *out_types,
-                                        GList                  **out_values,
-                                        GError                 **error)
-{
-    return gupnp_service_proxy_end_action_list (proxy, action, error, out_names, out_types, out_values);
-}
-
-/**
- * gupnp_service_proxy_end_action_list: (skip)
- * @proxy: A #GUPnPServiceProxy
- * @action: A #GUPnPServiceProxyAction handle
- * @error: (allow-none): The location where to store any error, or %NULL
- * @out_names: (element-type utf8) (transfer none): #GList of 'out' parameter
- * names (as strings)
- * @out_types: (element-type GType) (transfer none): #GList of types (as #GType)
- * that line up with @out_names
- * @out_values: (element-type GValue) (transfer full) (out): #GList of values
- * (as #GValue) that line up with @out_names and @out_types.
- *
- * A variant of #gupnp_service_proxy_end_action that takes lists of
- * out-parameter names, types and place-holders for values. The returned list
- * in @out_values must be freed using #g_list_free and each element in it using
- * #g_value_unset and #g_slice_free.
- *
- * Returns: %TRUE on success.
- *
- **/
-gboolean
 gupnp_service_proxy_end_action_list (GUPnPServiceProxy       *proxy,
                                      GUPnPServiceProxyAction *action,
-                                     GError                 **error,
                                      GList                   *out_names,
                                      GList                   *out_types,
-                                     GList                  **out_values)
+                                     GList                  **out_values,
+                                     GError                 **error)
 {
         xmlDoc *response;
         xmlNode *params;
@@ -1588,7 +1521,7 @@ gupnp_service_proxy_end_action_list (GUPnPServiceProxy       *proxy,
 }
 
 /**
- * gupnp_service_proxy_end_action_hash_gi: (rename-to gupnp_service_proxy_end_action_hash)
+ * gupnp_service_proxy_end_action_hash:
  * @proxy: A #GUPnPServiceProxy
  * @action: A #GUPnPServiceProxyAction handle
  * @error: The location where to store any error, or %NULL
@@ -1602,32 +1535,11 @@ gupnp_service_proxy_end_action_list (GUPnPServiceProxy       *proxy,
  *
  **/
 gboolean
-gupnp_service_proxy_end_action_hash_gi (GUPnPServiceProxy       *proxy,
-                                        GUPnPServiceProxyAction *action,
-                                        GHashTable              *hash,
-                                        GError                 **error)
-{
-    return gupnp_service_proxy_end_action_hash (proxy, action, error, hash);
-}
-
-/**
- * gupnp_service_proxy_end_action_hash:
- * @proxy: A #GUPnPServiceProxy
- * @action: A #GUPnPServiceProxyAction handle
- * @error: The location where to store any error, or %NULL
- * @hash: (element-type utf8 GValue) (out caller-allocates) (transfer none): A #GHashTable of
- * out parameter name and initialised #GValue pairs
- *
- * See gupnp_service_proxy_end_action(); this version takes a #GHashTable for
- * runtime generated parameter lists.
- *
- * Return value: %TRUE on success.
- **/
-gboolean
-gupnp_service_proxy_end_action_hash (GUPnPServiceProxy       *proxy,
-                                     GUPnPServiceProxyAction *action,
-                                     GError                 **error,
-                                     GHashTable              *hash)
+gupnp_service_proxy_end_action_hash
+                                   (GUPnPServiceProxy              *proxy,
+                                    GUPnPServiceProxyAction        *action,
+                                    GHashTable                     *hash,
+                                    GError                        **error)
 {
         xmlDoc *response;
         xmlNode *params;
diff --git a/libgupnp/gupnp-service-proxy.h b/libgupnp/gupnp-service-proxy.h
index 37bcb87..8722812 100644
--- a/libgupnp/gupnp-service-proxy.h
+++ b/libgupnp/gupnp-service-proxy.h
@@ -146,22 +146,12 @@ gupnp_service_proxy_send_action_hash
 gboolean
 gupnp_service_proxy_send_action_list (GUPnPServiceProxy *proxy,
                                       const char        *action,
-                                      GError           **error,
                                       GList             *in_names,
                                       GList             *in_values,
                                       GList             *out_names,
                                       GList             *out_types,
-                                      GList            **out_values);
-
-gboolean
-gupnp_service_proxy_send_action_list_gi (GUPnPServiceProxy *proxy,
-                                         const char        *action,
-                                         GList             *in_names,
-                                         GList             *in_values,
-                                         GList             *out_names,
-                                         GList             *out_types,
-                                         GList            **out_values,
-                                         GError           **error);
+                                      GList            **out_values,
+                                      GError           **error);
 GUPnPServiceProxyAction *
 gupnp_service_proxy_begin_action   (GUPnPServiceProxy              *proxy,
                                     const char                     *action,
@@ -213,34 +203,18 @@ gboolean
 gupnp_service_proxy_end_action_list
                                   (GUPnPServiceProxy       *proxy,
                                    GUPnPServiceProxyAction *action,
-                                   GError                  **error,
-                                   GList                   *out_names,
-                                   GList                   *out_types,
-                                   GList                  **out_values);
-
-gboolean
-gupnp_service_proxy_end_action_list_gi
-                                  (GUPnPServiceProxy       *proxy,
-                                   GUPnPServiceProxyAction *action,
                                    GList                   *out_names,
                                    GList                   *out_types,
                                    GList                  **out_values,
                                    GError                  **error);
 
 gboolean
-gupnp_service_proxy_end_action_hash_gi
+gupnp_service_proxy_end_action_hash
                                    (GUPnPServiceProxy              *proxy,
                                     GUPnPServiceProxyAction        *action,
                                     GHashTable                     *hash,
                                     GError                        **error);
 
-gboolean
-gupnp_service_proxy_end_action_hash
-                                   (GUPnPServiceProxy              *proxy,
-                                    GUPnPServiceProxyAction        *action,
-                                    GError                        **error,
-                                    GHashTable                     *hash);
-
 void
 gupnp_service_proxy_cancel_action  (GUPnPServiceProxy              *proxy,
                                     GUPnPServiceProxyAction        *action);
diff --git a/vala/GUPnP-1.2.metadata b/vala/GUPnP-1.2.metadata
index a62caea..4d376b4 100644
--- a/vala/GUPnP-1.2.metadata
+++ b/vala/GUPnP-1.2.metadata
@@ -30,12 +30,8 @@ ServiceProxy
     .add_notify skip=false
     .begin_action skip=false
     .end_action_hash skip
-    .end_action_hash_gi skip
     .end_action_list skip
-    .end_action_list_gi skip
-    .send_action_hash skip
     .send_action_list skip
-    .send_action_list_gi skip
 WhiteList
     .entries skip
 ControlError skip
diff --git a/vala/gupnp-1.2-custom.vala b/vala/gupnp-1.2-custom.vala
index f8474fd..ab584c2 100644
--- a/vala/gupnp-1.2-custom.vala
+++ b/vala/gupnp-1.2-custom.vala
@@ -23,11 +23,10 @@
 public class GUPnP.ServiceProxy : GUPnP.ServiceInfo {
     public bool send_action (string action, ...) throws GLib.Error;
     public bool end_action (GUPnP.ServiceProxyAction action, ...) throws GLib.Error;
-    public bool end_action_hash (GUPnP.ServiceProxyAction action, [CCode (pos=-0.9)] GLib.HashTable<string, 
weak GLib.Value*> hash) throws GLib.Error;
-    public bool end_action_list (GUPnP.ServiceProxyAction action, [CCode (pos=-0.9)] GLib.List<string> 
out_names, [CCode (pos=-0.8)] GLib.List<GLib.Type?> out_types, [CCode (pos=-0.7)] out GLib.List<weak 
GLib.Value*> out_values) throws GLib.Error;
+    public bool end_action_hash (GUPnP.ServiceProxyAction action, GLib.HashTable<string, weak GLib.Value*> 
hash) throws GLib.Error;
+    public bool end_action_list (GUPnP.ServiceProxyAction action, GLib.List<string> out_names, 
GLib.List<GLib.Type?> out_types, out GLib.List<weak GLib.Value*> out_values) throws GLib.Error;
 
-    public bool send_action_hash (string action, [CCode (pos=-0.9)] GLib.HashTable<string, GLib.Value?> 
in_hash, [CCode (pos=-0.8)] GLib.HashTable<string, weak GLib.Value*> out_hash) throws GLib.Error;
-    public bool send_action_list (string action, [CCode (pos=-0.9)] GLib.List<string> in_names, [CCode 
(pos=-0.8)] GLib.List<weak GLib.Value?> in_values, [CCode (pos=-0.7)] GLib.List<string> out_names, [CCode 
(pos=-0.6)] GLib.List<GLib.Type?> out_types, [CCode (pos=-0.5)] out GLib.List<weak GLib.Value*> out_values) 
throws GLib.Error;
+    public bool send_action_list (string action, GLib.List<string> in_names, GLib.List<weak GLib.Value?> 
in_values, GLib.List<string> out_names, GLib.List<GLib.Type?> out_types, out GLib.List<weak GLib.Value*> 
out_values) throws GLib.Error;
 }
 
 public interface GUPnP.Acl : GLib.Object {


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