library ued to server dynamic web page by means of html_patch function
Dependents: scooter_mbed_etudiant scooter_ scooter_mbed_etudiant_fini_1 Oliver_Melot ... more
html.h@1:ba608856b208, 2015-08-12 (annotated)
- Committer:
- superphil06
- Date:
- Wed Aug 12 15:53:49 2015 +0000
- Revision:
- 1:ba608856b208
- Parent:
- 0:539b0fc9d536
including thread and user call back
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
superphil06 | 0:539b0fc9d536 | 1 | /**************************************************************************** |
superphil06 | 0:539b0fc9d536 | 2 | * |
superphil06 | 0:539b0fc9d536 | 3 | * (C) 2000 by BECK IPC GmbH |
superphil06 | 0:539b0fc9d536 | 4 | * |
superphil06 | 0:539b0fc9d536 | 5 | * BECK IPC GmbH |
superphil06 | 0:539b0fc9d536 | 6 | * Garbenheimerstr. 38 |
superphil06 | 0:539b0fc9d536 | 7 | * D-35578 Wetzlar |
superphil06 | 0:539b0fc9d536 | 8 | * |
superphil06 | 0:539b0fc9d536 | 9 | * Phone : (49)-6441-905-240 |
superphil06 | 0:539b0fc9d536 | 10 | * Fax : (49)-6441-905-245 |
superphil06 | 0:539b0fc9d536 | 11 | * |
superphil06 | 0:539b0fc9d536 | 12 | * --------------------------------------------------------------------------- |
superphil06 | 0:539b0fc9d536 | 13 | * Module : HTML.H |
superphil06 | 0:539b0fc9d536 | 14 | * Function : contains prototypes and definitions for html.c |
superphil06 | 0:539b0fc9d536 | 15 | * |
superphil06 | 0:539b0fc9d536 | 16 | * Author : Stoidner |
superphil06 | 0:539b0fc9d536 | 17 | * Date : 30.08.00 |
superphil06 | 0:539b0fc9d536 | 18 | * Version : V1.00 |
superphil06 | 0:539b0fc9d536 | 19 | * --------------------------------------------------------------------------- |
superphil06 | 0:539b0fc9d536 | 20 | * History : |
superphil06 | 0:539b0fc9d536 | 21 | * |
superphil06 | 0:539b0fc9d536 | 22 | * Vx.yy Author Changes |
superphil06 | 0:539b0fc9d536 | 23 | * |
superphil06 | 0:539b0fc9d536 | 24 | * V1.00 cs Create |
superphil06 | 0:539b0fc9d536 | 25 | **************************************************************/ |
superphil06 | 0:539b0fc9d536 | 26 | |
superphil06 | 0:539b0fc9d536 | 27 | #ifndef _HTML_H_ |
superphil06 | 0:539b0fc9d536 | 28 | |
superphil06 | 0:539b0fc9d536 | 29 | #define _HTML_H_ |
superphil06 | 0:539b0fc9d536 | 30 | |
superphil06 | 0:539b0fc9d536 | 31 | |
superphil06 | 0:539b0fc9d536 | 32 | //************* |
superphil06 | 0:539b0fc9d536 | 33 | //* definitions |
superphil06 | 0:539b0fc9d536 | 34 | #define CMD_HTML_SIGN '^' /* Command sign which significates a |
superphil06 | 0:539b0fc9d536 | 35 | command start in the HTML code */ |
superphil06 | 0:539b0fc9d536 | 36 | #define FILL_STR( str, length ) while ( strlen(str) < length ) strcat(str, " ") |
superphil06 | 0:539b0fc9d536 | 37 | /* useful macro to fill a string to a specified |
superphil06 | 0:539b0fc9d536 | 38 | length with NULL Chars */ |
superphil06 | 0:539b0fc9d536 | 39 | //****************** |
superphil06 | 0:539b0fc9d536 | 40 | //* type definitions |
superphil06 | 0:539b0fc9d536 | 41 | typedef struct { |
superphil06 | 0:539b0fc9d536 | 42 | // int pos; // pos of the VarDef relativ to the Page beginning |
superphil06 | 0:539b0fc9d536 | 43 | char *ptr; // pointer to beginning of VarDef definition |
superphil06 | 0:539b0fc9d536 | 44 | int length; // length of the variable field |
superphil06 | 0:539b0fc9d536 | 45 | } var_field_t; |
superphil06 | 0:539b0fc9d536 | 46 | |
superphil06 | 0:539b0fc9d536 | 47 | |
superphil06 | 0:539b0fc9d536 | 48 | typedef var_field_t *vf_ptr; |
superphil06 | 0:539b0fc9d536 | 49 | |
superphil06 | 0:539b0fc9d536 | 50 | //************ |
superphil06 | 0:539b0fc9d536 | 51 | //* prototypes |
superphil06 | 0:539b0fc9d536 | 52 | |
superphil06 | 1:ba608856b208 | 53 | //char *Gen_HtmlCode_From_File( char *Path, var_field_t *var_field, int max_vardef ); |
superphil06 | 1:ba608856b208 | 54 | char * Gen_HtmlCode_From_File( char *Path, var_field_t *var_field, int max_vardef ); |
superphil06 | 0:539b0fc9d536 | 55 | char *load_HtmlCode_From_File( char *Path,long * size); |
superphil06 | 0:539b0fc9d536 | 56 | void Html_Patch ( var_field_t *pTab_Balise,int index, char * pChaine ) ; |
superphil06 | 1:ba608856b208 | 57 | int Init_Web_Server(void (*)(void) );// used to initialize web, ethernet and pointer to cgi function |
superphil06 | 1:ba608856b208 | 58 | int DeInit_Web_Server(void);// used to close main server socket and web server thread |
superphil06 | 1:ba608856b208 | 59 | void Web_Server_Thread(void const *args) ; |
superphil06 | 0:539b0fc9d536 | 60 | #endif |