summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Noël <corentin.noel@collabora.com>2020-10-15 11:11:10 +0200
committerCorentin Noël <corentin.noel@collabora.com>2020-10-15 11:11:10 +0200
commitb6fea0f06a0f30c5aa43bd1381071a763caf0e16 (patch)
tree8d614246bffc0eef3de4056ff571d91db04a0236
parent49ae0af51acca55e32f3d63d3d87aadaed6dacd4 (diff)
downloadlibrest-tintou/annotations-fixes.tar.gz
Add several missing annotationstintou/annotations-fixes
Most of them are taken from the Vala overrides: https://gitlab.gnome.org/GNOME/vala/-/blob/master/vapi/metadata/Rest-0.7.metadata
-rw-r--r--rest/rest-params.c9
-rw-r--r--rest/rest-proxy-call.c18
2 files changed, 19 insertions, 8 deletions
diff --git a/rest/rest-params.c b/rest/rest-params.c
index 369215b..f246cc2 100644
--- a/rest/rest-params.c
+++ b/rest/rest-params.c
@@ -79,7 +79,7 @@ rest_params_free (RestParams *params)
/**
* rest_params_add:
* @params: a valid #RestParams
- * @param: a valid #RestParam
+ * @param: (transfer full): a valid #RestParam
*
* Add @param to @params.
**/
@@ -101,7 +101,8 @@ rest_params_add (RestParams *params, RestParam *param)
*
* Return the #RestParam called @name, or %NULL if it doesn't exist.
*
- * Returns: a #RestParam or %NULL if the name doesn't exist
+ * Returns: (transfer none) (nullable): a #RestParam or %NULL if the name
+ * doesn't exist
**/
RestParam *
rest_params_get (RestParams *params, const char *name)
@@ -224,8 +225,8 @@ rest_params_iter_init (RestParamsIter *iter, RestParams *params)
/**
* rest_params_iter_next:
* @iter: an initialized #RestParamsIter
- * @name: a location to store the name, or %NULL
- * @param: a location to store the #RestParam, or %NULL
+ * @name: (out) (optional): a location to store the name, or %NULL
+ * @param: (out) (optional): a location to store the #RestParam, or %NULL
*
* Advances @iter and retrieves the name and/or parameter that are now pointed
* at as a result of this advancement. If FALSE is returned, @name and @param
diff --git a/rest/rest-proxy-call.c b/rest/rest-proxy-call.c
index 72c8261..2ab722f 100644
--- a/rest/rest-proxy-call.c
+++ b/rest/rest-proxy-call.c
@@ -414,6 +414,15 @@ rest_proxy_call_add_param (RestProxyCall *call,
rest_params_add (priv->params, param);
}
+/**
+ * rest_proxy_call_add_param_full:
+ * @call: The #RestProxyCall
+ * @param: (transfer full): A #RestParam
+ *
+ * Add a query parameter @param to the call.
+ * If a parameter with this name already exists, the new value will replace the
+ * old.
+ */
void
rest_proxy_call_add_param_full (RestProxyCall *call, RestParam *param)
{
@@ -475,8 +484,9 @@ rest_proxy_call_add_params_from_valist (RestProxyCall *call,
*
* Get the value of the parameter called @name.
*
- * Returns: The parameter value, or %NULL if it does not exist. This string is
- * owned by the #RestProxyCall and should not be freed.
+ * Returns: (transfer none) (nullable): The parameter value, or %NULL if it does
+ * not exist. This string is owned by the #RestProxyCall and should not be
+ * freed.
*/
RestParam *
rest_proxy_call_lookup_param (RestProxyCall *call,
@@ -1274,8 +1284,8 @@ rest_proxy_call_lookup_response_header (RestProxyCall *call,
* rest_proxy_call_get_response_headers:
* @call: The #RestProxyCall
*
- * Returns: (transfer container): pointer to a hash table of
- * headers. This hash table must not be changed. You should call
+ * Returns: (transfer container) (element-type utf8 utf8): pointer to a hash
+ * table of headers. This hash table must not be changed. You should call
* g_hash_table_unref() when you have finished with it.
*/
GHashTable *