summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-common.h
diff options
context:
space:
mode:
authorGravatar m0gg2006-11-25 17:03:20 +0000
committerGravatar m0gg2006-11-25 17:03:20 +0000
commitc8705844bd924e8e00bc79ec0f4ae92c85f7e48e (patch)
treeb76fca4152232bab3c10ae06887b705850a7aed8 /nanohttp/nanohttp-common.h
parent48873b11cc7f101bd5f3eb74fedacce40e73dd91 (diff)
downloadcsoap-c8705844bd924e8e00bc79ec0f4ae92c85f7e48e.tar.gz
csoap-c8705844bd924e8e00bc79ec0f4ae92c85f7e48e.tar.bz2
Code cleanup
Diffstat (limited to 'nanohttp/nanohttp-common.h')
-rw-r--r--nanohttp/nanohttp-common.h118
1 files changed, 65 insertions, 53 deletions
diff --git a/nanohttp/nanohttp-common.h b/nanohttp/nanohttp-common.h
index 272ff91..1afd7d5 100644
--- a/nanohttp/nanohttp-common.h
+++ b/nanohttp/nanohttp-common.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-common.h,v 1.36 2006/11/25 16:35:57 m0gg Exp $
+ * $Id: nanohttp-common.h,v 1.37 2006/11/25 17:03:20 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -457,6 +457,8 @@ typedef enum _hreq_method
* since that entity is likely to include human-readable information which will
* explain the unusual status.
*
+ * @see http://www.ietf.org/rfc/rfc2616.txt
+ *
*/
#define HTTP_STATUS_100_REASON_PHRASE "Continue"
#define HTTP_STATUS_101_REASON_PHRASE "Switching Protocols"
@@ -512,6 +514,66 @@ struct hpair
hpair_t *next;
};
+/**
+ *
+ * The protocol types in enumeration format. Used in some other nanohttp objects
+ * like hurl_t.
+ *
+ * @see hurl_t
+ *
+ */
+typedef enum _hprotocol
+{
+ PROTOCOL_HTTP,
+ PROTOCOL_HTTPS,
+ PROTOCOL_FTP
+} hprotocol_t;
+
+/**
+ *
+ * The URL object. A representation of an URL like:
+ *
+ * [protocol]://[host]:[port]/[context]
+ *
+ * @see http://www.ietf.org/rfc/rfc2396.txt
+ *
+ */
+typedef struct _hurl
+{
+ /**
+ *
+ * The transfer protocol. Note that only PROTOCOL_HTTP and PROTOCOL_HTTPS are
+ * supported by nanohttp.
+ *
+ */
+ hprotocol_t protocol;
+
+ /**
+ *
+ * The port number. If no port number was given in the URL, one of the default
+ * port numbers will be selected.
+ * - URL_HTTP_DEFAULT_PORT
+ * - URL_HTTPS_DEFAULT_PORT
+ * - URL_FTP_DEFAULT_PORT
+ *
+ */
+ short port;
+
+ /**
+ *
+ * The hostname
+ *
+ */
+ char host[URL_MAX_HOST_SIZE];
+
+ /**
+ *
+ * The string after the hostname.
+ *
+ */
+ char context[URL_MAX_CONTEXT_SIZE];
+} hurl_t;
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -634,56 +696,6 @@ extern void hpairnode_dump(hpair_t * pair);
/**
*
- * The protocol types in enumeration format. Used in some other nanohttp objects
- * like hurl_t.
- *
- * @see hurl_t
- *
- */
-typedef enum _hprotocol
-{
- PROTOCOL_HTTP,
- PROTOCOL_HTTPS,
- PROTOCOL_FTP
-} hprotocol_t;
-
-
-
-/**
- *
- * The URL object. A representation of an URL like:
- *
- * [protocol]://[host]:[port]/[context]
- *
- * @see http://www.ietf.org/rfc/rfc2396.txt
- *
- */
-typedef struct _hurl
-{
- /**
- The transfer protocol.
- Note that only PROTOCOL_HTTP is supported by nanohttp.
- */
- hprotocol_t protocol;
-
- /**
- The port number. If no port number was given in the URL,
- one of the default port numbers will be selected.
- URL_HTTP_DEFAULT_PORT
- URL_HTTPS_DEFAULT_PORT
- URL_FTP_DEFAULT_PORT
- */
- int port;
-
- /** The hostname */
- char host[URL_MAX_HOST_SIZE];
-
- /** The string after the hostname. */
- char context[URL_MAX_CONTEXT_SIZE];
-} hurl_t;
-
-/**
- *
* Parses the given 'urlstr' and fills the given hurl_t object.
*
* @param obj the destination URL object to fill
@@ -726,7 +738,6 @@ typedef struct _content_type
*/
extern content_type_t *content_type_new(const char *content_type_str);
-
/**
*
* Frees the given content_type_t object
@@ -767,7 +778,8 @@ struct attachments_t
struct part_t *root_part;
};
-extern struct attachments_t *attachments_new(void); /* should be used internally */
+/* should be used internally */
+extern struct attachments_t *attachments_new(void);
/**
*