![]() |
C library for SOAP (Simple Object Access Protocol) |
Modules | |
| Administrator application | |
| HTTP request handling | |
| Service status | |
Data Structures | |
| struct | httpd_conn |
| struct | tag_hservice |
Typedefs | |
| typedef struct httpd_conn | httpd_conn_t |
| typedef void(* | httpd_service )(httpd_conn_t *conn, struct hrequest_t *req) |
| typedef int(* | httpd_auth )(struct hrequest_t *req, const char *user, const char *pass) |
| typedef struct tag_hservice | hservice_t |
Functions | |
| herror_t | httpd_init (int argc, char *argv[]) |
| void | httpd_destroy (void) |
| herror_t | httpd_run (void) |
| herror_t | httpd_register (const char *context, httpd_service service) |
| herror_t | httpd_register_secure (const char *context, httpd_service service, httpd_auth auth) |
| herror_t | httpd_register_default (const char *context, httpd_service service) |
| herror_t | httpd_register_default_secure (const char *context, httpd_service service, httpd_auth auth) |
| short | httpd_get_port (void) |
| int | httpd_get_timeout (void) |
| void | httpd_set_timeout (int secs) |
| const char * | httpd_get_protocol (void) |
| int | httpd_get_conncount (void) |
| hservice_t * | httpd_get_services (void) |
| hservice_t * | httpd_find_service (const char *name) |
| int | httpd_enable_service (hservice_t *service) |
| int | httpd_disable_service (hservice_t *service) |
| void | httpd_response_set_content_type (httpd_conn_t *res, const char *content_type) |
| herror_t | httpd_send_header (httpd_conn_t *res, int code, const char *text) |
| int | httpd_set_header (httpd_conn_t *conn, const char *key, const char *value) |
| void | httpd_set_headers (httpd_conn_t *conn, hpair_t *header) |
| int | httpd_add_header (httpd_conn_t *conn, const char *key, const char *value) |
| void | httpd_add_headers (httpd_conn_t *conn, const hpair_t *values) |
| herror_t | httpd_mime_send_header (httpd_conn_t *conn, const char *related_start, const char *related_start_info, const char *related_type, int code, const char *text) |
| herror_t | httpd_mime_next (httpd_conn_t *conn, const char *content_id, const char *content_type, const char *transfer_encoding) |
| herror_t | httpd_mime_send_file (httpd_conn_t *conn, const char *content_id, const char *content_type, const char *transfer_encoding, const char *filename) |
| herror_t | httpd_mime_end (httpd_conn_t *conn) |
| herror_t | httpd_send_bad_request (httpd_conn_t *conn, const char *msg) |
| herror_t | httpd_send_unauthorized (httpd_conn_t *conn, const char *realm) |
| herror_t | httpd_send_not_found (httpd_conn_t *conn, const char *msg) |
| herror_t | httpd_send_internal_error (httpd_conn_t *conn, const char *msg) |
| herror_t | httpd_send_not_implemented (httpd_conn_t *conn, const char *msg) |
| typedef struct tag_hservice hservice_t |
Service representation object
| typedef int(* httpd_auth)(struct hrequest_t *req, const char *user, const char *pass) |
Authentication callback function for a nanoHTTP service.
| typedef struct httpd_conn httpd_conn_t |
| typedef void(* httpd_service)(httpd_conn_t *conn, struct hrequest_t *req) |
Service callback function for a nanoHTTP service.
| int httpd_add_header | ( | httpd_conn_t * | conn, | |
| const char * | key, | |||
| const char * | value | |||
| ) |
| void httpd_add_headers | ( | httpd_conn_t * | conn, | |
| const hpair_t * | values | |||
| ) |
| void httpd_destroy | ( | void | ) |
| int httpd_disable_service | ( | hservice_t * | service | ) |
| int httpd_enable_service | ( | hservice_t * | service | ) |
| hservice_t* httpd_find_service | ( | const char * | name | ) |
| int httpd_get_conncount | ( | void | ) |
This function returns the actual connection count.
| short httpd_get_port | ( | void | ) |
This function returns the port the service is listening on.
| const char* httpd_get_protocol | ( | void | ) |
This function returns a string representation of the underlying protocol used.
| hservice_t* httpd_get_services | ( | void | ) |
| int httpd_get_timeout | ( | void | ) |
This function returns the timeout which is used for read's.
| herror_t httpd_init | ( | int | argc, | |
| char * | argv[] | |||
| ) |
| herror_t httpd_mime_end | ( | httpd_conn_t * | conn | ) |
This function finishes a MIME request.
| herror_t httpd_mime_next | ( | httpd_conn_t * | conn, | |
| const char * | content_id, | |||
| const char * | content_type, | |||
| const char * | transfer_encoding | |||
| ) |
Send boundary and part header and continue with next part
| herror_t httpd_mime_send_file | ( | httpd_conn_t * | conn, | |
| const char * | content_id, | |||
| const char * | content_type, | |||
| const char * | transfer_encoding, | |||
| const char * | filename | |||
| ) |
Send boundary and part header and continue with next part
| herror_t httpd_mime_send_header | ( | httpd_conn_t * | conn, | |
| const char * | related_start, | |||
| const char * | related_start_info, | |||
| const char * | related_type, | |||
| int | code, | |||
| const char * | text | |||
| ) |
| herror_t httpd_register | ( | const char * | context, | |
| httpd_service | service | |||
| ) |
This function registers a service routine.
| herror_t httpd_register_default | ( | const char * | context, | |
| httpd_service | service | |||
| ) |
This function registers a service routing which is executed if no matching service is found.
| herror_t httpd_register_default_secure | ( | const char * | context, | |
| httpd_service | service, | |||
| httpd_auth | auth | |||
| ) |
This function registers a serivce routing which is executed if no matching service is found, it is protected by a password.
| herror_t httpd_register_secure | ( | const char * | context, | |
| httpd_service | service, | |||
| httpd_auth | auth | |||
| ) |
This function registers a service routing which is secured by a password (HTTP basic authentication).
| void httpd_response_set_content_type | ( | httpd_conn_t * | res, | |
| const char * | content_type | |||
| ) |
| herror_t httpd_run | ( | void | ) |
This function executes the nanoHTTP server in an endless loop.
| herror_t httpd_send_bad_request | ( | httpd_conn_t * | conn, | |
| const char * | msg | |||
| ) |
This function sends a minimalistic HTML error document with HTTP status 400.
| herror_t httpd_send_header | ( | httpd_conn_t * | res, | |
| int | code, | |||
| const char * | text | |||
| ) |
| herror_t httpd_send_internal_error | ( | httpd_conn_t * | conn, | |
| const char * | msg | |||
| ) |
This function sends a minimalistic HTML error document with HTTP status 500.
| herror_t httpd_send_not_found | ( | httpd_conn_t * | conn, | |
| const char * | msg | |||
| ) |
This function sends a minimalistic HTML error document with HTTP status 404.
| herror_t httpd_send_not_implemented | ( | httpd_conn_t * | conn, | |
| const char * | msg | |||
| ) |
This functions sends a minimalistic HTML error document with HTTP status 501.
| herror_t httpd_send_unauthorized | ( | httpd_conn_t * | conn, | |
| const char * | realm | |||
| ) |
This function sends a minimalistc HTML error document with HTTP status 401.
| int httpd_set_header | ( | httpd_conn_t * | conn, | |
| const char * | key, | |||
| const char * | value | |||
| ) |
| void httpd_set_headers | ( | httpd_conn_t * | conn, | |
| hpair_t * | header | |||
| ) |
| void httpd_set_timeout | ( | int | secs | ) |
This function sets the timeout which is used for read.