[PATCH v3 12/18] gweb: Add documentation to 'received_data_{finalize,continue}'.
Grant Erickson <[email protected]> Thu, 20 Mar 2025 16:39:03 -0700
| Newsgroups | dev.linux.lists.connman |
|---|---|
| Message-ID | <f8ae6ba80ec3496f39c9eb51429fff6574802109.1742513884.git.gerickson@nuovations.com> |
Add documentation to the 'received_data_{finalize,continue}' functions.
---
gweb/gweb.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/gweb/gweb.c b/gweb/gweb.c
index 6d517f9467bb..b0f2077a176a 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -1202,6 +1202,43 @@ static void add_header_field(struct web_session *session)
}
}
+/**
+ * @brief
+ * Finalize a glib I/O channel watch received data delegation for a
+ * web session request.
+ *
+ * This finalizes a glib I/O channel received data failure or
+ * success for @a session. This assumes that @a status is either
+ * #G_IO_STATUS_ERROR or #G_IO_STATUS_EOF. #G_IO_STATUS_ERROR
+ * represents an unconditional failure completion. #G_IO_STATUS_EOF
+ * may represent a successful completion, if it follows one more
+ * prior received data transfers for @a session. However, it
+ * represents a failure completion if it occurs prior to the receipt
+ * of any @a session data.
+ *
+ * @param[in,out] session A pointer to the mutable web
+ * session request to finalize.
+ * @param[in] status The status from the prior call
+ * to #g_io_channel_read_chars used
+ * to determine how to finalize @a
+ * session.
+ * @param[in] bytes_available The number of bytes advertised
+ * to the prior call to
+ * #g_io_channel_read_chars.
+ * @param[in] bytes_read The number of bytes read by the
+ * prior call to
+ * #g_io_channel_read_chars.
+ * @param[in] error An optional pointer to the glib
+ * error instance associated the
+ * prior call to
+ * #g_io_channel_read_chars.
+ *
+ * @sa received_data_continue
+ * @sa received_data
+ *
+ * @private
+ *
+ */
static void received_data_finalize(struct web_session *session,
GIOStatus status, gsize bytes_available,
gsize bytes_read, const GError *error)
@@ -1263,6 +1300,23 @@ static void received_data_finalize(struct web_session *session,
g_error_free(local_error);
}
+/**
+ * @brief
+ * Continue a glib I/O channel watch received data delegation for a
+ * web session request and process the data from it.
+ *
+ * @param[in,out] session A pointer to the mutable web session
+ * request to continue and process
+ * received data for.
+ * @param[in] bytes_read The number of bytes read by the prior
+ * call to #g_io_channel_read_chars.
+ *
+ * @sa received_data_finalize
+ * @sa received_data
+ *
+ * @private
+ *
+ */
static bool received_data_continue(struct web_session *session,
gsize bytes_read)
{
--
2.45.0