nanohttp-url.h File Reference

Go to the source code of this file.

Classes

struct  hurl_t

Defines

#define URL_ERROR   1100
#define URL_ERROR_UNKNOWN_PROTOCOL   (URL_ERROR + 1)
#define URL_ERROR_NO_PROTOCOL   (URL_ERROR + 2)
#define URL_ERROR_NO_HOST   (URL_ERROR + 3)

Typedefs

typedef enum _hprotocol hprotocol_t

Enumerations

enum  _hprotocol { PROTOCOL_HTTP, PROTOCOL_HTTPS }

Functions

herror_t hurl_parse (struct hurl_t *obj, const char *url)
void hurl_free (struct hurl_t *url)


Define Documentation

#define URL_ERROR   1100
 

URL errors

Definition at line 32 of file nanohttp-url.h.

Referenced by hurl_parse().

#define URL_ERROR_NO_HOST   (URL_ERROR + 3)
 

Definition at line 35 of file nanohttp-url.h.

Referenced by hurl_parse().

#define URL_ERROR_NO_PROTOCOL   (URL_ERROR + 2)
 

Definition at line 34 of file nanohttp-url.h.

Referenced by hurl_parse().

#define URL_ERROR_UNKNOWN_PROTOCOL   (URL_ERROR + 1)
 

Definition at line 33 of file nanohttp-url.h.

Referenced by hurl_parse().


Typedef Documentation

typedef enum _hprotocol hprotocol_t
 

The protocol types in enumeration format. Used in some other nanohttp objects like hurl_t.

See also:
hurl_t


Enumeration Type Documentation

enum _hprotocol
 

The protocol types in enumeration format. Used in some other nanohttp objects like hurl_t.

See also:
hurl_t
Enumerator:
PROTOCOL_HTTP 
PROTOCOL_HTTPS 

Definition at line 45 of file nanohttp-url.h.


Function Documentation

void hurl_free struct hurl_t url  ) 
 

Frees the resources within a url and the url itself.

Parameters:
url pointer to an hurl_t

Definition at line 211 of file nanohttp-url.c.

References hurl_t::context, and hurl_t::host.

Referenced by httpc_free(), and httpc_new().

herror_t hurl_parse struct hurl_t obj,
const char *  url
 

Parses the given 'urlstr' and fills the given hurl_t object. Parse an URI URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]

Parameters:
obj the destination URL object to fill
url the URL in string format
Returns:
H_OK on success or one of the following otherwise
  • URL_ERROR_UNKNOWN_PROTOCOL
  • URL_ERROR_NO_PROTOCOL
  • URL_ERROR_NO_HOST

Definition at line 77 of file nanohttp-url.c.

References hurl_t::context, H_OK, herror_new(), hurl_t::host, HTTP_DEFAULT_PORT, HTTPS_DEFAULT_PORT, log_error1, log_error2, log_warn2, hurl_t::port, hurl_t::protocol, PROTOCOL_HTTP, PROTOCOL_HTTPS, URL_ERROR, URL_ERROR_NO_HOST, URL_ERROR_NO_PROTOCOL, and URL_ERROR_UNKNOWN_PROTOCOL.


Generated on Thu Jan 25 23:36:04 2007 for csoap by  doxygen 1.4.6