29 #ifndef M2MB_HTTPD_API_H 30 #define M2MB_HTTPD_API_H 51 #define M2MB_HTTPD_PATH_MAX 31 52 #define M2MB_HTTPD_SRVR_NAME_MAX 512 691 const INT8 *content_type,
692 INT32 content_length,
694 const INT8 *status_text,
695 const INT8 *user_headers );
M2MB_HTTPD_URI_REQ_CGI_KEY_PAIR_T nameval[1]
CHAR cert_File[M2MB_HTTPD_PATH_MAX]
M2MB_STATUS_T m2mb_httpd_is_started()
Status of HTTP server.
M2MB_STATUS_T m2mb_httpd_user_change_password(char *username, char *cur_password, char *new_password)
Change password of a USER to HTTPD module.
M2MB_HTTPD_URI_REQ_CGI_FORM_DATA_T * m2mb_httpd_get_cgi_form(VOID *conn_handle)
Get CGI form data.
M2MB_STATUS_T m2mb_httpd_deinit()
HTTP server initialization.
M2MB_STATUS_T m2mb_httpd_send_data(VOID *conn_handle, const INT8 *data, UINT32 length)
Send HTTP data.
#define M2MB_HTTPD_PATH_MAX
VOID * m2mb_httpd_FindURICtx_FromIndex(INT32 index)
Get URI context from URI's index.
enum M2MB_URI_AUTH_FLAG M2MB_URI_AUTH_FLAG_T
HTTP server URI user authentication enumeration.
HANDLE M2MB_SSL_CTXT_HANDLE
SSL context handle. This is obtained from m2mb_ssl_create_ctxt API and then used in subsequent SSL ...
INT32 m2mb_httpd_get_request_type(VOID *conn_handle)
Get request type.
struct M2MB_HTTPD_URI_CTX M2MB_HTTPD_URICTX_T
HTTP server URI context structure.
struct M2MB_HTTPD_CONFIG_S M2MB_HTTPD_CONFIG_T
HTTP server configuration structure.
HTTP server CGI parameter pair structure.
M2MB_STATUS_T m2mb_httpd_get_message_head(VOID *conn_handle, UINT8 *buf, UINT32 *plen)
Get Message header of URI request.
M2MB_HTTPD_METHOD_E
HTTP server request method enumeration.
M2MB_URI_AUTH_FLAG
HTTP server URI user authentication enumeration.
M2MB_STATUS_T m2mb_httpd_stop()
Stop HTTP server.
HTTP server configuration structure.
M2MB_HTTPD_MODE_E
HTTP server operational mode enumeration.
M2MB_HTTPD_URI_USER_EVENT
HTTP server URI user event enumeration.
M2MB_STATUS_T m2mb_httpd_send_headers(VOID *conn_handle, const INT8 *content_type, INT32 content_length, INT32 status_code, const INT8 *status_text, const INT8 *user_headers)
Send HTTP headers.
M2MB_OS_RESULT_E m2mb_httpd_uri_cfg(CHAR *uri, UINT8 *methods, M2MB_URI_AUTH_FLAG_T flag, M2MB_HTTPD_URI_HANDLER_T fn_cb, VOID *usr_ctx)
Configure URI to HTTP server.
struct M2MB_HTTPD_URI_REQ_CGI_KEY_PAIR M2MB_HTTPD_URI_REQ_CGI_KEY_PAIR_T
HTTP server CGI parameter pair structure.
M2MB_STATUS_T m2mb_httpd_init(M2MB_HTTPD_CONFIG_T *cfg, M2MB_SSL_CTXT_HANDLE ssl_handle)
HTTP server initialization.
HTTP server URI Request structure.
INT32(* M2MB_HTTPD_URI_HANDLER_T)(VOID *conn_handle, VOID *usr_ctx, INT32 **event)
HTTP server URI Request user call back prototype.
CHAR root_Path[M2MB_HTTPD_PATH_MAX]
M2MB_STATUS_T m2mb_httpd_user_add(const char *username, const char *password)
Add a USER to HTTPD module.
enum M2MB_HTTPD_URI_USER_EVENT M2MB_HTTPD_URI_USER_EVENT_E
HTTP server URI user event enumeration.
INT32 m2mb_httpd_get_content_len(VOID *conn_handle)
Get content length.
CHAR * m2mb_httpd_get_body_location(VOID *conn_handle)
Get message body location.
M2MB_STATUS_T m2mb_httpd_start()
Start HTTP server.
enum M2MB_OS_RESULT M2MB_OS_RESULT_E
M2MB_HTTPD_CGI_RETURN_E
Return values enumeration.
HTTP server CGI form data structure.
M2MB_STATUS_T m2mb_httpd_get_message_body(VOID *conn_handle, INT8 *buf, UINT32 *plen)
Get Message Body of URI request.
HTTP server URI context structure.
struct M2MB_HTTPD_URI_REQ_CGI_FORM_DATA M2MB_HTTPD_URI_REQ_CGI_FORM_DATA_T
HTTP server CGI form data structure.
M2MB_STATUS_T m2mb_httpd_user_del(const char *username, const char *password)
Delete a USER to HTTPD module.
struct M2MB_HTTPD_URI_REQ_INFO M2MB_HTTPD_URI_REQ_INFO_T
HTTP server URI Request structure.
M2MB_OS_RESULT_E m2mb_httpd_uri_decfg(char *uri)
De-Configure URI from HTTP server.
VOID(* webfiles_Setup)(void)
CHAR root_Index_Page[M2MB_HTTPD_PATH_MAX]
M2MB_STATUS_T m2mb_httpd_user_validate(char *username, char *password)
Validate a USER to HTTPD module.