eyBuildLib API Reference : eyBuildLib
ebrequest - process http request
getPost( ) - get the value of parameter user submit by POST method
getParameter( ) - get the value of parameter user variable
getParameterNext( ) - get the next paramter by "name"
isSetQuery( ) - check a query exist or not
getQeuryNumber( ) - get the number of query in query list (for GET/POST)
getQeuryByIndex( ) - get the query by index
getCookie( ) - get the value of cookie
getCookieNext( ) - get the next paramter by "name"
isSetCookie( ) - check a cookie exist or not
getCookieNumber( ) - get the number of cookie in cookie list (for GET/POST)
getCookieByIndex( ) - get the cookie by index
cgiPrefix( ) - make current cgi prefix string
romPrefix( ) - make current rom prefix string
cgiPrefix2( ) - make current cgi prefix string
romPrefix2( ) - make current rom prefix string
cgiPrefix3( ) - make CGI prefix by current page name
romPrefix3( ) - make ROM prefix by current directory
thisCgiPrefix( ) - make prefix by current page name
process http request
ebenviron.h
ebrespond.h
getPost( ) - get the value of parameter user submit by POST method
char * getPost ( const char * name )
this routine is to get the value of parameter user submit by POST method. Note this routine only return the value content type is "application/x-www-form-urlencoded". For type "multipart/form-data" to upload file or submit a mont of data see dopost( ), getPostItemValue( ).
if there are more than one same name items, this routine will retun the last one.
pointer to the value of parameter, or "" if not find
getParameter( ) - get the value of parameter user variable
char * getParameter ( const char * name )
this routine is to get the value of parameter user submit by GET/POST method. Note for POST, this routine only return the value content type is "application/x-www-form-urlencoded". For type "multipart/form-data" to upload file or submit a mont of data see dopost( ), getPostItemValue( ).
if there are more than one same name items, this routine will retun the last one. If you want to get one by one please see getParameterNext( ) or getQeuryByIndex( ).
pointer to the value of parameter, or "" if not find
ebrequest, getCookie( ) getParameterNext( ) getQeuryByIndex( )
getParameterNext( ) - get the next paramter by "name"
char * getParameterNext ( char * name, /* what to search */ int * pstart /* offset, to search for next */ )
this routine is search the next paramter by "name", the start index is to specify the offset in the search list.
if not found the *pstart will return a number < 0
char * p; int offset; for (offset=0; offset >=0; ) { p = getParameterNext("xxx", &offset); print("%s\n", p); }
pointer the value, or blank string "" if not found
ebrequest, getCookeNext( )
isSetQuery( ) - check a query exist or not
BOOL isSetQuery ( char * name )
this routine is to check a query exist or not.
query name and query value may be blank string(""), but not at the same time. Eg.: "?=v1&n1=&&" means there to item "=v1" and "n1="
TRUE/FALSE
ebrequest, isSetCookie( )
getQeuryNumber( ) - get the number of query in query list (for GET/POST)
int getQeuryNumber ()
this routine is to return the query number (for GET/POST)
not include cookie
number of querys.
getQeuryByIndex( ) - get the query by index
char * getQeuryByIndex ( char * * name, /* to return the query name */ int index /* index in query list */ )
this routine is to return the query name and value by index. if the index is out of range, the value name should be set to NULL, and the value should be set to blank string ("").
pointer the query item value, or "" if no such item.
ebrequest, getCookieByIndex( )
getCookie( ) - get the value of cookie
char * getCookie ( const char * name )
this routine is to get the value of cookie last occur in cookie list
if there are more than one same name items, this routine will retun the last one. If you want to get one by one please see getCookieNext( ) or getCookieByIndex( ).
pointer to the value of parameter, or "" if not find
getCookieNext( ) - get the next paramter by "name"
char * getCookieNext ( char * name, int * pindex )
this routine is search the next cookie by "name", the start index is to specify the offset in the search list.
if not found the *pstart will return a number < 0
char * p; int offset; for (offset=0; offset >=0; ) { p = getCookieNext("xxx", &offset); print("%s\n", p); }
pointer the value, or blank string "" if not found
ebrequest, getParameterNext( )
isSetCookie( ) - check a cookie exist or not
BOOL isSetCookie ( char * name )
this routine is to check a cookie exist or not.
cookie name and cookie value may be blank string(""), but not at the same time. Eg.: "?=v1&n1=&&" means there to item "=v1" and "n1="
TRUE/FALSE
ebrequest, isSetQuery( )
getCookieNumber( ) - get the number of cookie in cookie list (for GET/POST)
int getCookieNumber ()
this routine is to return the cookie number (for GET/POST)
number of cookies.
getCookieByIndex( ) - get the cookie by index
char * getCookieByIndex ( char * * name, int index )
this routine is to return the cookie name and value by index. if the index is out of range, the value name should be set to NULL, and the value should be set to blank string ("").
pointer the cookie item value, or "" if no such item.
ebrequest, getParameterByIndex( )
cgiPrefix( ) - make current cgi prefix string
char * cgiPrefix ( char * pname )
pointer to a prefix or a blank string ""
romPrefix( ) - make current rom prefix string
char * romPrefix ( char * pname )
make current rom prefix string
pointer to a prefix or a blank string ""
cgiPrefix2( ) - make current cgi prefix string
char * cgiPrefix2 ( char * pname, char * psub )
pointer to a prefix or a blank string ""
romPrefix2( ) - make current rom prefix string
char * romPrefix2 ( char * pname, char * psub )
make current rom prefix string
pointer to a prefix or a blank string ""
cgiPrefix3( ) - make CGI prefix by current page name
char * cgiPrefix3 ( char * pname, char * psub, char * curdir )
this routine is to make CGI prefix by current directory
return the prefix
romPrefix3( ) - make ROM prefix by current directory
char * romPrefix3 ( char * pname, char * psub, char * curdir )
this routine is to make ROM prefix by current directory
return the prefix
thisCgiPrefix( ) - make prefix by current page name
char * thisCgiPrefix ()
this routine is to make CGI prefix by current page name
return the prefix by current page name