summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar m0gg2006-12-09 09:04:16 +0000
committerGravatar m0gg2006-12-09 09:04:16 +0000
commit4c24b62d85f7eeef94a7c854eabf11969de86ab7 (patch)
treed9a0c803b86f8e7b12c410c50b53c60f9e9a3f24
parentdaf61e4c39c91ee1ff753d8a7cb36ccd99de485d (diff)
downloadcsoap-4c24b62d85f7eeef94a7c854eabf11969de86ab7.tar.gz
csoap-4c24b62d85f7eeef94a7c854eabf11969de86ab7.tar.bz2
Documentation enhancements
-rw-r--r--config.h.in3
-rw-r--r--nanohttp/nanohttp-client.h42
-rw-r--r--nanohttp/nanohttp-common.c22
-rw-r--r--nanohttp/nanohttp-common.h34
4 files changed, 55 insertions, 46 deletions
diff --git a/config.h.in b/config.h.in
index 823cacb..800d615 100644
--- a/config.h.in
+++ b/config.h.in
@@ -97,6 +97,9 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
diff --git a/nanohttp/nanohttp-client.h b/nanohttp/nanohttp-client.h
index d156a22..7759241 100644
--- a/nanohttp/nanohttp-client.h
+++ b/nanohttp/nanohttp-client.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-client.h,v 1.31 2006/12/09 08:43:06 m0gg Exp $
+ * $Id: nanohttp-client.h,v 1.32 2006/12/09 09:04:16 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -36,23 +36,23 @@
/** @file
*
- * Writing an HTTP client using nanoHTTP
+ * \section client_sec Writing an HTTP client using nanoHTTP
*
* - Client initialization
* - Connection initialization
- * -- SSL related functions
+ * - SSL related functions
* - Setting HTTP headers (optional)
- * -- Setting an HTTP header with uniq key
- * -- Setting multiple headers
+ * - Setting an HTTP header with uniq key
+ * - Setting multiple headers
* - Fetch the network resource
- * -- HTTP GET command
- * -- HTTP POST command
- * -- MIME attachments
+ * - HTTP GET command
+ * - HTTP POST command
+ * - MIME attachments
* - Print out the result
* - Connection cleanup
* - Client cleanup
*
- * Client initialization
+ * \subsection init_sec Client initialization
*
* @code
* int main(int argc, char **argv)
@@ -75,7 +75,7 @@
* }
* @endcode
*
- * Connection initialization
+ * \subsection conn_sec Connection initialization
*
* @code
* if (!(conn = httpc_new()))
@@ -86,11 +86,11 @@
* }
* @endcode
*
- * SSL related functions
+ * \subsection ssl_sec SSL related functions
*
* T.B.D.
*
- * Setting HTTP headers (optional)
+ * \subsection header_sec Setting HTTP headers (optional)
*
* @code
* httpc_set_header(conn, "my-key", "my-value");
@@ -101,9 +101,9 @@
* httpc_add_header(conn, "Cookie", "name2:value2");
* @endcode
*
- * Fetch the network resource
+ * \subsection fetch_sec Fetch the network resource
*
- * HTTP GET command
+ * \subsubsection get_sec HTTP GET command
*
* @code
* if ((status = httpc_get(conn, &result, argv[1])) != H_OK)
@@ -115,7 +115,7 @@
* }
* @endcode
*
- * HTTP POST command
+ * \subsubsection post_sec HTTP POST command
*
* @code
* if ((status = httpc_post_begin(conn, argv[1])) != H_OK)
@@ -143,11 +143,11 @@
* }
* @endcode
*
- * MIME attachments
+ * \subsubsection mime_sec MIME attachments
*
* T.B.D.
*
- * Print out the result
+ * \subsection output_sec Print out the result
*
* @code
* while (http_input_stream_is_read(res->in))
@@ -157,13 +157,13 @@
* }
* @endcode
*
- * Connection cleanup
+ * \subsection conn_clean_sec Connection cleanup
*
* @code
* hresponse_free(res);
* @endcode
*
- * Client cleanup
+ * \subsection client_clean Client cleanup
*
* @code
* httpc_free(conn);
@@ -215,8 +215,8 @@ extern void httpc_destroy(void);
/**
*
- * Creates a new http client connection object. You need to create at least one
- * http client connection to communicate via HTTP.
+ * Creates a new HTTP client connection object. You need to create at least one
+ * HTTP client connection to communicate via HTTP.
*
* @return A pointer to a httpc_conn_t structure on success, NULL on error.
*
diff --git a/nanohttp/nanohttp-common.c b/nanohttp/nanohttp-common.c
index 1d22eed..d552a75 100644
--- a/nanohttp/nanohttp-common.c
+++ b/nanohttp/nanohttp-common.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-common.c,v 1.34 2006/12/08 21:21:41 m0gg Exp $
+* $Id: nanohttp-common.c,v 1.35 2006/12/09 09:04:16 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -135,7 +135,6 @@ hpairnode_copy(const hpair_t * src)
return pair;
}
-
hpair_t *
hpairnode_copy_deep(const hpair_t * src)
{
@@ -159,9 +158,8 @@ hpairnode_copy_deep(const hpair_t * src)
return result;
}
-
void
-hpairnode_dump(hpair_t * pair)
+hpairnode_dump(const hpair_t * pair)
{
if (pair == NULL)
{
@@ -174,27 +172,21 @@ hpairnode_dump(hpair_t * pair)
return;
}
-
void
-hpairnode_dump_deep(hpair_t * pair)
+hpairnode_dump_deep(const hpair_t * pairs)
{
- hpair_t *p;
- p = pair;
+ const hpair_t *p;
- log_verbose1("-- BEGIN dump hpairnode_t --");
-
- while (p != NULL)
+ log_verbose1("-- BEGIN dump_deep hpair_t --");
+ for (p = pairs; p != NULL; p = p->next)
{
hpairnode_dump(p);
- p = p->next;
}
-
- log_verbose1("-- END dump hpairnode_t --\n");
+ log_verbose1("-- END dump_deep hpair_t --\n");
return;
}
-
void
hpairnode_free(hpair_t * pair)
{
diff --git a/nanohttp/nanohttp-common.h b/nanohttp/nanohttp-common.h
index 5b6ac36..dd60473 100644
--- a/nanohttp/nanohttp-common.h
+++ b/nanohttp/nanohttp-common.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-common.h,v 1.39 2006/12/08 21:21:41 m0gg Exp $
+ * $Id: nanohttp-common.h,v 1.40 2006/12/09 09:04:16 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -28,17 +28,21 @@
#define HEADER_CONTENT_TRANSFER_ENCODING "Content-Transfer-Encoding"
#define TRANSFER_ENCODING_CHUNKED "chunked"
-/** @file
- *
- * General Header Fields
+/** @defgroup general_header_fields General Header Fields
*
* There are a few header fields which have general applicability for both
* request and response messages, but which do not apply to the entity being
- * transferred. These header fields apply only to the message being transmitted.
+ * transferred. These header fields apply only to the General-header field names
+ * can be extended reliably only in combination with a change in the protocol
+ * version. However, new or experimental header fields may be given the semantics
+ * of general header fields if all parties in the communication recognize them to
+ * be general-header fields. Unrecognized header fields are treated as
+ * entity-header fields.
*
- * @see http://www.ietf.org/rfc/rfc/2616.txt
+ * @see http://www.ietf.org/rfc/rfc2616.txt
*
*/
+/*@{*/
/**
*
@@ -264,6 +268,8 @@
*/
#define HEADER_LAST_MODIFIED "Last-Modified"
+/*@}*/
+
/**
*
* Common commandline arguments for client and server.
@@ -661,15 +667,23 @@ extern hpair_t *hpairnode_copy(const hpair_t * src);
* @see hpairnode_copy
*
*/
-extern hpair_t *hpairnode_copy_deep(const hpair_t * src);
+extern hpair_t *hpairnode_copy_deep(const hpair_t *src);
+
+/**
+ *
+ * Dumps a set of pairs.
+ *
+ * @see hpairnode_dump
+ *
+ */
+extern void hpairnode_dump_deep(const hpair_t *pairs);
/**
*
- * Debug functions
+ * Dumps the pair specified.
*
*/
-extern void hpairnode_dump_deep(hpair_t * pair);
-extern void hpairnode_dump(hpair_t * pair);
+extern void hpairnode_dump(const hpair_t *pair);
/**
*