[gupnp] ServiceAction: Forward-port Action.return_success



commit 479c48f4272a4d07ceb90174143722e046ef25be
Author: Jens Georg <mail jensge org>
Date:   Mon Jan 3 18:09:55 2022 +0100

    ServiceAction: Forward-port Action.return_success

 examples/light-server.c         | 6 +++---
 libgupnp/gupnp-service-action.c | 6 ++++--
 libgupnp/gupnp-service.c        | 2 +-
 libgupnp/gupnp-service.h        | 2 +-
 tests/test-bugs.c               | 4 ++--
 5 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/examples/light-server.c b/examples/light-server.c
index 66f8566..246b4d6 100644
--- a/examples/light-server.c
+++ b/examples/light-server.c
@@ -69,7 +69,7 @@ set_target_cb (GUPnPService          *service,
   }
 
   /* Return success to the client */
-  gupnp_service_action_return (action);
+  gupnp_service_action_return_success (action);
 }
 
 /* GetTarget */
@@ -81,7 +81,7 @@ get_target_cb (G_GNUC_UNUSED GUPnPService *service,
   gupnp_service_action_set (action,
                             "RetTargetValue", G_TYPE_BOOLEAN, status,
                             NULL);
-  gupnp_service_action_return (action);
+  gupnp_service_action_return_success (action);
 }
 
 /* GetStatus */
@@ -93,7 +93,7 @@ get_status_cb (G_GNUC_UNUSED GUPnPService *service,
   gupnp_service_action_set (action,
                             "ResultStatus", G_TYPE_BOOLEAN, status,
                             NULL);
-  gupnp_service_action_return (action);
+  gupnp_service_action_return_success (action);
 }
 
 /*
diff --git a/libgupnp/gupnp-service-action.c b/libgupnp/gupnp-service-action.c
index ddd7091..4bcd032 100644
--- a/libgupnp/gupnp-service-action.c
+++ b/libgupnp/gupnp-service-action.c
@@ -473,13 +473,15 @@ gupnp_service_action_set_value (GUPnPServiceAction *action,
 }
 
 /**
- * gupnp_service_action_return:
+ * gupnp_service_action_return_success:
  * @action: A #GUPnPServiceAction
  *
  * Return succesfully.
+ *
+ * Since: 1.4.2
  **/
 void
-gupnp_service_action_return (GUPnPServiceAction *action)
+gupnp_service_action_return_success (GUPnPServiceAction *action)
 {
         g_return_if_fail (action != NULL);
 
diff --git a/libgupnp/gupnp-service.c b/libgupnp/gupnp-service.c
index 53811dd..a20f2e1 100644
--- a/libgupnp/gupnp-service.c
+++ b/libgupnp/gupnp-service.c
@@ -306,7 +306,7 @@ query_state_variable (GUPnPService       *service,
                 xmlFree (var_name);
         }
 
-        gupnp_service_action_return (action);
+        gupnp_service_action_return_success (action);
 }
 
 /* controlURL handler */
diff --git a/libgupnp/gupnp-service.h b/libgupnp/gupnp-service.h
index 088bf47..e0db942 100644
--- a/libgupnp/gupnp-service.h
+++ b/libgupnp/gupnp-service.h
@@ -99,7 +99,7 @@ gupnp_service_action_set_value    (GUPnPServiceAction *action,
                                    const GValue       *value);
 
 void
-gupnp_service_action_return       (GUPnPServiceAction *action);
+gupnp_service_action_return_success (GUPnPServiceAction *action);
 
 void
 gupnp_service_action_return_error (GUPnPServiceAction *action,
diff --git a/tests/test-bugs.c b/tests/test-bugs.c
index 19a13b4..563e758 100644
--- a/tests/test-bugs.c
+++ b/tests/test-bugs.c
@@ -88,7 +88,7 @@ test_bgo_696762_on_browse_call (G_GNUC_UNUSED GUPnPService *service,
     g_assert (node != NULL);
     g_assert_cmpstr ((const char *) node->name, ==, "SortCriteria");
     node = node->next;
-    gupnp_service_action_return (action);
+    gupnp_service_action_return_success (action);
 }
 
 static void
@@ -543,7 +543,7 @@ test_ggo_58_on_ping_call (GUPnPService *service,
                           GUPnPServiceAction *action,
                           gpointer user_data)
 {
-        gupnp_service_action_return (action);
+        gupnp_service_action_return_success (action);
 }
 
 static void


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