Defines | |
| #define | HTTP_SERVLETS 1 |
| #define | SLERR_OK 0 |
| #define | SLERR_FAIL -1 |
| #define | SLERR_NEEDMEM -2 |
| #define | SLERR_BADREQUEST -3 |
| #define | SLERR_NOTFOUND -4 |
| #define | SLERR_SERVER -5 |
| #define | SLERR_CREATED -6 |
| #define | SLERR_ACCEPTED -7 |
| #define | SLERR_PARTIAL -8 |
| #define | SLERR_FORBIDDEN -9 |
| #define | SLERR_TOOLARGE -10 |
| #define | SLERR_UNAVAILABLE -11 |
| #define | SLERR_BUSY -12 |
| #define | HSL_LINK_RAW 0x00000001 |
| #define | HSL_LINK_SID 0x00000002 |
| #define | HSL_LINK_QM 0x80000000 |
Typedefs | |
| typedef void * | SERVLET_t |
| typedef sint_t(* | SERVLETFUNC_t )(SERVLET_t slobj) |
Functions | |
| sint_t | hsl_create (SERVLETFUNC_t func, const char *filename) |
| sint_t | hsl_destroy (SERVLETFUNC_t func) |
| char * | hsl_getParameterByName (SERVLET_t *slobj, const char *name) |
| char * | hsl_getOwnName (SERVLET_t *slobj) |
| sint_t | hsl_setStreamBufSize (SERVLET_t *slobj, u32_t bufsize) |
| sint_t | hsl_printf (SERVLET_t *slobj, const char *fmt,...) |
| void * | hsl_getSession (SERVLET_t *slobj) |
| void * | hsl_newSession (SERVLET_t *slobj, u32_t memsize, u32_t timeout) |
| sint_t | hsl_destroySession (SERVLET_t *slobj) |
| sint_t | hsl_formAddSessionId (SERVLET_t *slobj) |
| sint_t | hsl_linkCreate (SERVLET_t *slobj, const char *url, u32_t flags) |
| sint_t | hsl_linkAddStringVal (SERVLET_t *slobj, const char *name, const char *val) |
| sint_t | hsl_linkAddNumberVal (SERVLET_t *slobj, const char *name, u32_t val) |
| sint_t | hsl_linkInsert (SERVLET_t *slobj, const char *linktext) |
| sint_t | hsl_addSessionIdToForm (SERVLET_t *slobj) |
| sint_t | httpd_start (const char *rootDirectory, u32_t maxServletMem, u32_t maxSessionMem) |
| sint_t | httpd_stop (void) |
| sint_t | httpd_running (void) |
|
|
|
|
|
|
|
|
|
|
|
define this to 1 to enable servlet support |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Servlet object |
|
|
Function pointer to servlet function. |
|
|
Servlet function: Add the session id as a hidden parameter to a form.
|
|
||||||||||||
|
Servlet function: Create a new servlet object. This function is used to create and add a new servlet object to the http demon.
|
|
|
Servlet function: Destroy a servlet object. The servlet object will be removed from the http demon.
|
|
|
Servlet function: This function destorys a servlet session. It should be called when the user logs out.
|
|
|
Servlet function: Inserts the current session ID into a web formular. Creates the string '<input type="hidden" name="sid" value="xxxxxxxx">'
|
|
|
Servlet function: This function returns the own name (name of the servlet).
|
|
||||||||||||
|
Servlet function: Get the value of a named parameter from the request URI.
|
|
|
Servlet function: This function returns a pointer to the servlets session memory.
|
|
||||||||||||||||
|
Servlet function: Add a decimal value to the parameter list of a link. The link must have been created with hsl_linkCreate before this function can be called.
|
|
||||||||||||||||
|
Servlet function: Add a string value to the parameter list of a link. The link must have been created with hsl_linkCreate before this function can be called.
|
|
||||||||||||||||
|
Servlet function: Create a new link object. You must use this function in your servlet if you wish to pass a session ID with a link back to your servlet. Further, this function simplifies the creation of links with an appended parameter list. To create dynamic links, you need to call these functions in the following order: hsl_linkCreate, hsl_linkAddStringVal, hsl_linkInsert
|
|
||||||||||||
|
Servlet function: Insert a link that was created by hsl_linkCreate into the dynamic html page.
|
|
||||||||||||||||
|
Servlet function: This function creates a new session. A session is understood as a memory buffer where the servlet can store its private data. The lifetime of a session is limmited, it is removed automatically by the http demon when it timed out.
|
|
||||||||||||||||
|
Servlet function: Print formatted to the stdout of the current servlet instance.
|
|
||||||||||||
|
Servlet function: Request more memory for the output stream buffer. Per default, one kilobyte (=1024 bytes) is reserved for the output stream. If larger HTML pages shall be created, the buffer size must be increased by calling this function from within the servlet.
|
|
|
This function can be used to test if the HTTP demon task is still running.
|
|
||||||||||||||||
|
This function starts the HTTP demon. The function call does not return, so it is recommended to setup a new task that executes this function. To terminate the demon you can call the function httpd_stop.
|
|
|
This function stoppes the HTTP demon. Note that it takes a while (up to 1 second) until this function returns.
|
1.3.9.1