[gnet] Some minor gtk-doc and code comment fixes.



commit 87c5d54822b8828ec13cca935df3dc3ac73c3861
Author: Tim-Philipp Müller <tim muller collabora co uk>
Date:   Mon May 25 19:34:06 2009 +0100

    Some minor gtk-doc and code comment fixes.
    
    In particular mention how to get the data from a redirect.
---
 src/conn-http.c |   11 +++++++----
 src/conn-http.h |    4 +++-
 src/pack.c      |    4 ++--
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/conn-http.c b/src/conn-http.c
index c7d1b3f..5b03f23 100644
--- a/src/conn-http.c
+++ b/src/conn-http.c
@@ -598,6 +598,7 @@ gnet_conn_http_set_uri (GConnHttp *conn, const gchar *uri)
  *
  *  Returns: TRUE if the URI has been accepted.
  *
+ *  Since: 2.0.8
  **/
 
 gboolean
@@ -780,8 +781,9 @@ gnet_conn_http_done (GConnHttp *conn)
 
 	gnet_conn_timeout (conn->conn, 0);
 
-	/* we don't want to emit a DATA_COMPLETE event
-	 *  if we are getting redirected, do we? */
+	/* we don't want to emit data events if we're getting redirected, if
+	 * the app is interested in the redirect page data, it can retrieve
+	 * it from within the callback with the REDIRECT event */
 	if (conn->redirect_location == NULL)
 	{
 		ev = gnet_conn_http_new_event (GNET_CONN_HTTP_DATA_COMPLETE);
@@ -1092,8 +1094,9 @@ gnet_conn_http_conn_recv_chunk_body (GConnHttp *conn, gchar *data, gsize len)
 	conn->content_recv += len;
 	gnet_conn_http_append_to_buf(conn, data, len);
 
-	/* we don't want to emit data events if we're 
-	 *  getting redirected anyway, do we? */
+	/* we don't want to emit data events if we're getting redirected, if
+	 * the app is interested in the redirect page data, it can retrieve
+	 * it from within the callback with the REDIRECT event */
 	if (conn->redirect_location == NULL)
 	{
 		GConnHttpEventData *ev_data;
diff --git a/src/conn-http.h b/src/conn-http.h
index 522f7a0..957cfcd 100644
--- a/src/conn-http.h
+++ b/src/conn-http.h
@@ -100,7 +100,9 @@ typedef enum
  *   structure will be a #GConnHttpEventResponse structure
  *   @GNET_CONN_HTTP_REDIRECT: the HTTP server has sent 
  *   a redirect response. The event structure will be a
- *   #GConnHttpEventRedirect structure
+ *   #GConnHttpEventRedirect structure. The redirect response
+ *   may be accompanied by data, use gnet_conn_http_steal_buffer()
+ *   to retrieve it.
  *   @GNET_CONN_HTTP_DATA_PARTIAL: data has been received.
  *   The buffer is caller-owned (ie. owned by GNet), but 
  *   may be emptied using gnet_conn_http_steal_buffer(). The
diff --git a/src/pack.c b/src/pack.c
index f39bed8..260f320 100644
--- a/src/pack.c
+++ b/src/pack.c
@@ -193,7 +193,7 @@ flipmemcpy(char* dst, const char* src, gsize n)
  *
  *  An example:
  *
- *  <informalexample>
+ *  <informalexample id="gnet-pack-example">
  *  <programlisting>
  *  char buf[5];
  *  int myint = 42;
@@ -776,7 +776,7 @@ gnet_vpack (const gchar* format, gchar* buffer, const gint length, va_list args)
  *
  *  An example:
  *
- *  <informalexample>
+ *  <informalexample id="gnet-unpack-example">
  *  <programlisting>
  *  char buf[5] = { 42, 0, 0, 0, 23 };
  *  int myint;



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