HTMLGUI  2.13.5-1
scriptproc.h File Reference

Typedefs

typedef bool(* ScriptProcessor) (void *data, const std::string &script, std::map< std::string, std::string > &value, std::string &out, std::string &err, std::string &exitcode)
 
typedef bool(* ScriptProcessorExt) (void *data, const std::string &script, std::map< std::string, std::string > &value, std::string &out, std::string &err, std::string &exitcode, ExtContext *context)
 

Functions

void htmlSetScriptProcessor (const char *name, ScriptProcessor proc, void *data)
 
void htmlSetScriptProcessor (const char *name, ScriptProcessorExt proc, void *data=0)
 

Typedef Documentation

§ ScriptProcessor

typedef bool(* ScriptProcessor) (void *data, const std::string &script, std::map< std::string, std::string > &value, std::string &out, std::string &err, std::string &exitcode)

script processor callback

Parameters
[in]datatransparent callback data pointer
[in]scriptscript to be processed, leading and trailing whitespace has been removed.
[in]valuename value pairs that are used as initial value of input fields, checkboxes, etc. and that are used during script processing.
[out]outresulting HTML code that was generated by the script. On invocation it is empty.
[out]errerror messages that were generated during script execution (comparable to output to stderr). On invocation it is empty.
[out]exitcodecontent of parameter that was passed to exit()
Returns
true if script was successful and if the script is to be replaced by the content of out, false if error or exit with exit code

§ ScriptProcessorExt

typedef bool(* ScriptProcessorExt) (void *data, const std::string &script, std::map< std::string, std::string > &value, std::string &out, std::string &err, std::string &exitcode, ExtContext *context)

script processor callback for ADK-GUIPRT internal processors with extended capabilities

Parameters
[in]datatransparent callback data pointer
[in]scriptscript to be processed, leading and trailing whitespace has been removed.
[in]valuename value pairs that are used as initial value of input fields, checkboxes, etc. and that are used during script processing.
[out]outresulting HTML code that was generated by the script. On invocation it is empty.
[out]errerror messages that were generated during script execution (comparable to output to stderr). On invocation it is empty.
[out]exitcodecontent of parameter that was passed to exit()
[in,out]contextinternal extended context
Returns
true if script was successful and if the script is to be replaced by the content of out, false if error or exit with exit code

Function Documentation

§ htmlSetScriptProcessor() [1/2]

void vfihtml::htmlSetScriptProcessor ( const char *  name,
ScriptProcessor  proc,
void *  data 
)

set script processor

Parameters
[in]namename of the scripting processor, i.e. the name immediately following '<?'
[in]procprocessing function pointer, use NULL to delete a script processor.
[in]datacallback data passed on as first parameter to the processing function

§ htmlSetScriptProcessor() [2/2]

void vfihtml::htmlSetScriptProcessor ( const char *  name,
ScriptProcessorExt  proc,
void *  data = 0 
)

set script processor

Parameters
[in]namename of the scripting processor, i.e. the name immediately following '<?'
[in]procprocessing function pointer, use NULL to delete a script processor.
[in]dataunused, provided just for compatibility