That means that prepared variables in the cgi files which are sent to a client are filled with data. The routines also process commands received via input buttons in forms on the websites.
Files | |
file | auth.c |
The web authentication module implementation of Netzer. | |
file | auth.h |
The web authentication module interface of Netzer. | |
file | web.c |
The integrated web interface implementation of Netzer. | |
file | web.h |
Web interface module defines and global function prototypes for Netzer. | |
file | HTTPPrint.h |
Provides callback headers and resolution for the web interface. | |
file | MPFSImg.c |
Defines an MPFS2 image to be stored in program memory. | |
Defines | |
#define | WEB_STACKSIZE (256u) |
Working space for HTML processing. | |
Enumerations | |
enum | PageID_t |
All html files have this unique index. More... | |
Functions | |
void | WebOptionROM (BOOL Selected, BYTE Value, ROM BYTE *pString) |
Prints a formated HTML option field to the HTTP socket with content string from ROM. | |
void | WebRadioROM (ROM BYTE *pName, DWORD Value, BOOL Selected, BYTE AccessLevel) |
Prints a formated HTML radio field to the HTTP socket with name string from ROM. | |
void | WebCheckboxROM (ROM BYTE *pName, DWORD Value, BOOL Selected, BYTE AccessLevel) |
Prints a formated HTML checkbox to the HTTP socket with name string from ROM. | |
void | WebCheckbox (BYTE *pName, DWORD Value, BOOL Selected, BYTE AccessLevel) |
Prints a formated HTML checkbox to the HTTP socket with name string from RAM. | |
void | WebReportChangedState (StateTableIDs_t StringID, PageID_t DestinationPageID) |
Call this function during a HTTP POST session if the user should be forwarded to a message webpage (state.htm) showing a error or state change string. | |
BYTE | HTTPNeedsAuth (BYTE *cFile) |
This function is called on the starting authentfication process, if any file is requested via HTTP. | |
BYTE | WebGetAuthLevelOfCurrentPage (void) |
Each shown webpage has dedicated level of authorization which is stored in an internal structure with all the other webpage related data. | |
BYTE | WebGetCurrentPageID (void) |
Returns the ID of the last loaded html page. | |
Variables | |
BYTE | webwork [WEB_STACKSIZE] |
The working space for HTML processing. |
enum PageID_t |
All html files have this unique index.
The ID is used as parameter in various function and simplifies webpage processing. A Netzer based project can use own IDs starting from PAGEID_PROJECT.
BYTE HTTPNeedsAuth | ( | BYTE * | cFile | ) |
This function is called on the starting authentfication process, if any file is requested via HTTP.
It is possible to grant access with or without authentication.
cFile | Pointer to the string of the requested web file. |
0 | The file needs authentication. | |
Other | The file needs no authentication. |
void WebCheckbox | ( | BYTE * | pName, | |
DWORD | Value, | |||
BOOL | Selected, | |||
BYTE | AccessLevel | |||
) |
Prints a formated HTML checkbox to the HTTP socket with name string from RAM.
Output template:
<input type="checkbox" name="" value="" />
pName | Pointer to a string in RAM where the name of the checkbox is located. | |
Value | Value of the checkbox. | |
Selected | TRUE Writes a selected checkbox, FALSE writes a not selected. | |
AccessLevel | The access level for this checkbox (users with a lower access level are able to change the button). -1 -> Always read only. |
void WebCheckboxROM | ( | ROM BYTE * | pName, | |
DWORD | Value, | |||
BOOL | Selected, | |||
BYTE | AccessLevel | |||
) |
Prints a formated HTML checkbox to the HTTP socket with name string from ROM.
Output template:
<input type="checkbox" name="" value="" />
pName | Pointer to a string in ROM where the name of the checkbox is located. | |
Value | Value of the checkbox. | |
Selected | TRUE Writes a selected checkbox, FALSE writes a not selected. | |
AccessLevel | The access level for this checkbox (users with a lower access level are able to change the button). -1 -> Always read only. |
BYTE WebGetAuthLevelOfCurrentPage | ( | void | ) |
Each shown webpage has dedicated level of authorization which is stored in an internal structure with all the other webpage related data.
The | authentication level. The valid levels are starting with 0x80. 0x80 has administrative rights, 0x81 user rights and 0x82 are guest rights. |
BYTE WebGetCurrentPageID | ( | void | ) |
Returns the ID of the last loaded html page.
void WebOptionROM | ( | BOOL | Selected, | |
BYTE | Value, | |||
ROM BYTE * | pString | |||
) |
Prints a formated HTML option field to the HTTP socket with content string from ROM.
Output template:
<option value="">Content</option>
Selected | TRUE Writes a selected option field, FALSE writes a not selected one. | |
Value | Value of the option field. | |
pString | Pointer to the content string. |
void WebRadioROM | ( | ROM BYTE * | pName, | |
DWORD | Value, | |||
BOOL | Selected, | |||
BYTE | AccessLevel | |||
) |
Prints a formated HTML radio field to the HTTP socket with name string from ROM.
Output template:
<input type="radio" name="" value="" />
pName | Pointer to a string in ROM where the name of the radio field is located. | |
Value | Value of the radio field. | |
Selected | TRUE Writes a selected radio button, FALSE writes a not selected. | |
AccessLevel | The access level for this radio button (users with a lower access level are able to change the button). -1 -> Always read only. |
void WebReportChangedState | ( | StateTableIDs_t | StringID, | |
PageID_t | DestinationPageID | |||
) |
Call this function during a HTTP POST session if the user should be forwarded to a message webpage (state.htm) showing a error or state change string.
StringID | The ID for a string shown on the message webpage. | |
DestinationPageID | The ID of the webpage where the user is forwarded to after acknowledging the message webpage with pressing OK. |