C library for SOAP (Simple Object Access Protocol)


URL handling
[nanoHTTP]


Data Structures

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

#define URL_ERROR_NO_HOST   (URL_ERROR + 3)

#define URL_ERROR_NO_PROTOCOL   (URL_ERROR + 2)

#define URL_ERROR_UNKNOWN_PROTOCOL   (URL_ERROR + 1)


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 


Function Documentation

void hurl_free ( struct hurl_t *  url  ) 

This function frees the resources within a url and the url itself.

Parameters:
url pointer to an hurl_t

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

This function 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


csoap project homepage: http://csoap.sourceforge.net