Functions | |||
![]() | ![]() | unsigned int | CGIInstall (CGI_Entry far* CGIEntry, char far* name, method_t method, void far* CGIFuncPt) |
![]() | ![]() | This function installs a CGI program (more exactly: a CGI function) in the memory. More... | |
![]() | ![]() | unsigned int | CGIRemove (CGI_Entry far* CGIEntry) |
![]() | ![]() | Function removes a CGI program (more exactly: a CGI function) from the memory. More... | |
![]() | ![]() | void | CGIResponse (rpCgiPtr CGIRequest, response_t responseCode, response_t responseType, char far* responseData, size_t length) |
![]() | ![]() | Function which fills the response parameter of a CGI funtion. More... | |
![]() | ![]() | void | CGIGetFirstFormItem (char far* argumentBuffer, FormItem far* firstFormItem) |
![]() | ![]() | This functions gets the first item from a form. More... | |
![]() | ![]() | char far* | CGIGetNextFormItem (char far* argumentBuffer, FormItem far** nextFormItem) |
![]() | ![]() | This functions gets the next (name,value) pair of a form. More... | |
Licence: GPL
This API was developed for easy handling the CGI functions of the SC12 from Beck GmbH. The code was inspired from a snippet which I found in the examples delivered with the original API descriptions from Beck.
This API contains functions for installing and removing a CGI program. Furthermore there are functions for reading the values of a and for password queries. Possibility for setting the right response struct (CGIRequest) is also given.
Definition in file cgiapi.c.
| unsigned int CGIInstall (CGI_Entry far * CGIEntry, char far * name, method_t method, void far * CGIFuncPt) |
This function installs a CGI program (more exactly: a CGI function) in the memory.
| CGIEntry | is a far pointer to a CGI_Entry struct |
| name | is a symbolic name which identifies the CGI program |
| method | is one of CgiHttpGet, CgiHttpHead, CgiHttpPost |
| CGIFuncPt | is a far pointer to the function which handles the CGI call |
| unsigned int CGIRemove (CGI_Entry far * CGIEntry) |
Function removes a CGI program (more exactly: a CGI function) from the memory.
| CGIEntry | is a far pointer to a CGI_Entry struct |
| void CGIResponse (rpCgiPtr CGIRequest, response_t responseCode, response_t responseType, char far * responseData, size_t length) |
Function which fills the response parameter of a CGI funtion.
| CGIRequest | is the pointer comming from the paramter list of the CGI func |
| responseCode | is a return Code from the CGI execution (e.g.CgiHttpOk) |
| responseType | is the content-type of the responseData |
| responseData | is a far pointer to the char buffer where the response is |
| length | is the length of the responseData |
| void CGIGetFirstFormItem (char far * argumentBuffer, FormItem far * firstFormItem) |
This functions gets the first item from a form.
| argumentBuffer | is a far pointer to the form data |
| firstFormItem | is a far pointer to the first (name,value) pair of a form |
| char far * CGIGetNextFormItem (char far * argumentBuffer, FormItem far ** nextFormItem) |
This functions gets the next (name,value) pair of a form.
The address of the FormItem struct is saved in nextFormItem. It returns a far pointer to part of the argumentBuffer where the (name,value) pair is located. You'll need this to check, whether there are more arguments. Call only after CGIGetFirstFormItem
| argumentBuffer | is a far pointer to the form data |
| nextFormItem | is a far pointer to the next (name, value) pair of a form - it's NULL if there's no further pair. |
1.0.0 written by Dimitri van Heesch,
© 1997-1999