diff options
author | Thomas Haller <thaller@redhat.com> | 2020-06-29 09:52:28 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-07-03 10:34:26 +0200 |
commit | e3bbd267c3c2c39991a012057da80e52dd43ae16 (patch) | |
tree | b95b19100c437c96c36c6a204557c4dd30b0b4ef | |
parent | 460afe6d502f2a8f158739c176302fd7fa072913 (diff) | |
download | NetworkManager-e3bbd267c3c2c39991a012057da80e52dd43ae16.tar.gz |
cloud-setup: add gtk-doc comment for nm_http_client_get_finish()
NMHttpClient guarantees that the returned response is %NUL terminated after the
returned length of the buffer. That guarantee is important and should be documented.
-rw-r--r-- | clients/cloud-setup/nm-http-client.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clients/cloud-setup/nm-http-client.c b/clients/cloud-setup/nm-http-client.c index 946ed8ce93..76db6c6ff7 100644 --- a/clients/cloud-setup/nm-http-client.c +++ b/clients/cloud-setup/nm-http-client.c @@ -351,6 +351,21 @@ nm_http_client_get (NMHttpClient *self, } } +/** + * nm_http_client_get_finish: + * @self: the #NMHttpClient instance + * @result: the #GAsyncResult which to complete. + * @out_response_code: (allow-none) (out): the HTTP response code or -1 on other error. + * @out_response_data: (allow-none) (transfer full): the HTTP response data, if any. + * The GBytes buffer is guaranteed to have a trailing NUL character *after* the + * returned buffer size. That means, you can always trust that the buffer is NUL terminated + * and that there is one additional hidden byte after the data. + * Also, the returned buffer is allocated just for you. While GBytes is immutable, you are + * allowed to modify the buffer as it's not used by anybody else. + * @error: the error + * + * Returns: %TRUE on success. + */ gboolean nm_http_client_get_finish (NMHttpClient *self, GAsyncResult *result, |