![]() |
HTMLPRINTER
2.13.5-1
|
#include <string>#include <vector>#include <map>Enumerations | |
| enum | JSTraceType { JST_HTTPGET, JST_HTTPPOST, JST_HTTPRESULT } |
Functions | |
| DllSpec void | jsGetConsole (void(*&cb)(void *, const char *), void *&data) |
| DllSpec const char * | jsGetHttpProxy () |
| DllSpec void | jsGetLog (void(*&cb)(void *data, const std::string &app_id, JSLogLevel log_level, const std::vector< std::string > &msg), void *&data) |
| DllSpec void | jsGetNotify (int(*&cb)(void *data, const char *to, const char *notification_id, const char *json_param, unsigned flags, const char *from), void *&data) |
| DllSpec void | jsGetNotifyAndWait (int(*&cb)(void *data, const char *to, const char *notification_id, const char *json_param, unsigned flags, const char *from, const char *wait_id, std::string &result, int timeout_msec), void *&data) |
| DllSpec void | jsGetTrace (void(*&cb)(void *data, JSTraceType type, const std::string &app_id, std::map< std::string, std::string > &trace), void *&data) |
| DllSpec bool | jsProcessor (void *data, const std::string &sourcecode, std::map< std::string, std::string > &arg, std::string &out, std::string &err, std::string &exitcode) |
| DllSpec bool | jsProcessorExt (void *data, const std::string &sourcecode, std::map< std::string, std::string > &arg, std::string &out, std::string &err, std::string &exitcode, vfihtml::ExtContext *context) |
| DllSpec const char * | jsProcVersion () |
| DllSpec void | jsSetConsole (void(*cb)(void *data, const char *text), void *data) |
| DllSpec void | jsSetHttpProxy (const char *proxy) |
| DllSpec void | jsSetLog (void(*cb)(void *data, const std::string &app_id, JSLogLevel log_level, const std::vector< std::string > &msg), void *data) |
| DllSpec void | jsSetNotify (int(*cb)(void *data, const char *to, const char *notification_id, const char *json_param, unsigned flags, const char *from), void *data) |
| DllSpec void | jsSetNotifyAndWait (int(*cb)(void *data, const char *to, const char *notification_id, const char *json_param, unsigned flags, const char *from, const char *wait_id, std::string &result, int timeout_msec), void *data) |
| DllSpec void | jsSetTrace (void(*cb)(void *data, JSTraceType type, const std::string &app_id, std::map< std::string, std::string > &trace), void *data) |
script processor
| enum JSTraceType |
| DllSpec void jsGetConsole | ( | void(*&)(void *, const char *) | cb, |
| void *& | data | ||
| ) |
get current setting of callback for console output
| [out] | cb | callback function pointer or NULL |
| [out] | data | data pointer provided to callback as first parameter |
| DllSpec const char* jsGetHttpProxy | ( | ) |
Read current proxy setting
| DllSpec void jsGetLog | ( | void(*&)(void *data, const std::string &app_id, JSLogLevel log_level, const std::vector< std::string > &msg) | cb, |
| void *& | data | ||
| ) |
read logging callback
| [out] | cb | callback function pointer or NULL |
| [out] | data | data pointer provided to callback as first parameter |
| DllSpec void jsGetNotify | ( | int(*&)(void *data, const char *to, const char *notification_id, const char *json_param, unsigned flags, const char *from) | cb, |
| void *& | data | ||
| ) |
get current setting of notification callback
| [out] | cb | callback function pointer or NULL |
| [out] | data | data pointer provided to callback as first parameter |
| DllSpec void jsGetNotifyAndWait | ( | int(*&)(void *data, const char *to, const char *notification_id, const char *json_param, unsigned flags, const char *from, const char *wait_id, std::string &result, int timeout_msec) | cb, |
| void *& | data | ||
| ) |
get current setting of notification callback
| [out] | cb | callback function pointer or NULL |
| [out] | data | data pointer provided to callback as first parameter |
| DllSpec void jsGetTrace | ( | void(*&)(void *data, JSTraceType type, const std::string &app_id, std::map< std::string, std::string > &trace) | cb, |
| void *& | data | ||
| ) |
read HTTP trace callback
| [out] | cb | callback function pointer or NULL |
| [out] | data | data pointer provided to callback as first parameter |
| DllSpec bool jsProcessor | ( | void * | data, |
| const std::string & | sourcecode, | ||
| std::map< std::string, std::string > & | arg, | ||
| std::string & | out, | ||
| std::string & | err, | ||
| std::string & | exitcode | ||
| ) |
Process JavaScript script and return the data sent to stdout and stderr
| [in] | data | this parameter is unused, it is just there for compatibility with the ADKGUI scripting interface |
| [in] | sourcecode | string containing the Js source code |
| [in] | arg | key value map, can be accessed as table 'ARG' from within the JavaScript script |
| [out] | out | data sent to stdout |
| [out] | err | data sent to stderr |
| [out] | exitcode | parameter that was passed to exit() |
| DllSpec bool jsProcessorExt | ( | void * | data, |
| const std::string & | sourcecode, | ||
| std::map< std::string, std::string > & | arg, | ||
| std::string & | out, | ||
| std::string & | err, | ||
| std::string & | exitcode, | ||
| vfihtml::ExtContext * | context | ||
| ) |
Process JavaScript script and return the data sent to stdout and stderr. This is the variant with ADKGUI extensions support.
| [in] | data | this parameter is unused, it is just there for compatibility with the ADKGUI scripting interface |
| [in] | sourcecode | string containing the Js source code |
| [in] | arg | key value map, can be accessed as table 'ARG' from within the JavaScript script |
| [out] | out | data sent to stdout |
| [out] | err | data sent to stderr |
| [out] | exitcode | parameter that was passed to exit() |
| [in,out] | context | extended context, if NULL GUI extensions are disabled. |
| DllSpec const char* jsProcVersion | ( | ) |
| DllSpec void jsSetConsole | ( | void(*)(void *data, const char *text) | cb, |
| void * | data | ||
| ) |
set callback for console output
| [in] | cb | callback function pointer or NULL |
| [in] | data | data pointer provided to callback as first parameter |
The callback takes the following parameters:
| [in] | data | data pointer |
| [in] | text | string to be sent to console |
| DllSpec void jsSetHttpProxy | ( | const char * | proxy | ) |
Set Http-Proxy
| [in] | proxy | Proxy setting, e.g. http://localhost:8888 or NULL |
| DllSpec void jsSetLog | ( | void(*)(void *data, const std::string &app_id, JSLogLevel log_level, const std::vector< std::string > &msg) | cb, |
| void * | data | ||
| ) |
install logging callback
| [in] | cb | callback function pointer or NULL |
| [in] | data | data pointer provided to callback as first parameter |
The callback takes the following parameters:
| [in] | data | data pointer |
| [in] | log_level | logging level 0-7 (emergency,alert,critical, |
| [in] | app_id | application ID (as found in ARGV["cp_appId"]) |
| [in] | msg | log message parameters in the order they were provided to log.info()/log.debug(),log.error() |
| DllSpec void jsSetNotify | ( | int(*)(void *data, const char *to, const char *notification_id, const char *json_param, unsigned flags, const char *from) | cb, |
| void * | data | ||
| ) |
set callback for sending notifications
| [in] | cb | callback function pointer or NULL |
| [in] | data | data pointer provided to callback as first parameter |
The callback takes the following parameters:
| [in] | data | data pointer |
| [in] | to | destination address |
| [in] | notification_id | notification id |
| [in] | json_param | string containing the JSON encoded parameters |
| [in] | flags | optional flags |
| [in] | from | optional source address, if NULL use default source address |
| DllSpec void jsSetNotifyAndWait | ( | int(*)(void *data, const char *to, const char *notification_id, const char *json_param, unsigned flags, const char *from, const char *wait_id, std::string &result, int timeout_msec) | cb, |
| void * | data | ||
| ) |
set callback for sending notifications
| [in] | cb | callback function pointer or NULL |
| [in] | data | data pointer provided to callback as first parameter |
The callback takes the following parameters:
| [in] | data | data pointer |
| [in] | to | destination address |
| [in] | notification_id | notification id |
| [in] | json_param | string containing the JSON encoded parameters |
| [in] | flags | optional flags |
| [in] | from | optional source address, if NULL use default source address |
| [in] | wait_id | wait for notification with this id |
| [out] | result | received notification |
| [in] | timeout_msec | timeout in milliseconds |
| DllSpec void jsSetTrace | ( | void(*)(void *data, JSTraceType type, const std::string &app_id, std::map< std::string, std::string > &trace) | cb, |
| void * | data | ||
| ) |
install HTTP trace callback
| [in] | cb | callback function pointer or NULL |
| [in] | data | data pointer provided to callback as first parameter |
The callback takes the following parameters:
| [in] | data | data pointer |
| [in] | type | trace type |
| [in] | app_id | application ID (as found in ARGV["cp_appId"]) |
| [in] | trace | key value map containing trace parameters |