[PATCH v3 13/18] gweb: Document 'struct _GWebResult'.
Grant Erickson <[email protected]> Thu, 20 Mar 2025 16:39:04 -0700
| Newsgroups | dev.linux.lists.connman |
|---|---|
| Message-ID | <725a07ae93fe427cab9068c69ce7a6e8bfccb53e.1742513884.git.gerickson@nuovations.com> |
Add documentation to the remainder of the 'struct _GWebResult' data
members and to the overall structure.
---
gweb/gweb.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gweb/gweb.c b/gweb/gweb.c
index b0f2077a176a..ace3ac4dcb69 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -56,12 +56,44 @@ enum chunk_state {
CHUNK_DATA,
};
+/**
+ * The opaque structure presented to GWeb clients on received data or
+ * request closures.
+ *
+ * @private
+ */
struct _GWebResult {
+ /**
+ * HTTP status code on success.
+ */
guint16 status;
+
+ /**
+ * HTTP body content on success; otherwise, NULL.
+ */
const guint8 *buffer;
+
+ /**
+ * HTTP body length on success; otherwise, 0.
+ */
gsize length;
+
+ /**
+ * Boolean indicating whether the HTTP response uses HTTP/1.1
+ * chunked transfer encoding.
+ */
bool use_chunk;
+
+ /**
+ * An optional pointer to a null-terminated C string containing
+ * the last HTTP header name added as part of a header key/value
+ * pair.
+ */
gchar *last_key;
+
+ /**
+ * HTTP headers, on success, keyed by the header name.
+ */
GHashTable *headers;
};
--
2.45.0