|
ZOO-Project
|
Macros | |
| #define | JSCLSAS_GLOBAL_FLAGS 0 |
Functions | |
| JSBool | JSAlert (JSContext *cx, uintN argc, jsval *argv1) |
| The function used as alert from the JavaScript environment (ZOO-API) More... | |
| JSBool | JSLoadScripts (JSContext *cx, uintN argc, jsval *argv1) |
| The function used as importScript from the JavaScript environment (ZOO-API) More... | |
| int | zoo_js_support (maps **main_conf, map *request, service *s, maps **inputs, maps **outputs) |
| Load a JavaScript file then run the function corresponding to the service by passing the conf, inputs and outputs parameters by value as JavaScript Objects. More... | |
| JSObject * | loadZooApiFile (JSContext *cx, JSObject *global, char *filename) |
| Load a JavaScript file. More... | |
| JSObject * | JSObject_FromMaps (JSContext *cx, maps *t) |
| Convert a maps to a JavaScript Object. More... | |
| JSObject * | JSObject_FromMap (JSContext *cx, map *t) |
| Convert a map to a JavaScript Object. More... | |
| maps * | mapsFromJSObject (JSContext *cx, jsval t) |
| Convert a JavaScript Object to a maps. More... | |
| map * | mapFromJSObject (JSContext *cx, jsval t) |
| Convert a JavaScript Object to a map. More... | |
| void | reportError (JSContext *cx, const char *message, JSErrorReport *report) |
| Print debug information messages on stderr. More... | |
| char * | JSValToChar (JSContext *context, jsval *arg) |
| Convert a JavaScript value to a char*. More... | |
| HINTERNET | setHeader (HINTERNET *handle, JSContext *cx, JSObject *header) |
| Set the HTTP header of a request. More... | |
| JSBool | JSTranslate (JSContext *cx, uintN argc, jsval *argv1) |
| The function used as ZOOTranslate from the JavaScript environment. More... | |
| JSBool | JSRequest (JSContext *cx, uintN argc, jsval *argv1) |
| The function used as ZOORequest from the JavaScript environment (ZOO-API) More... | |
| JSBool | JSUpdateStatus (JSContext *cx, uintN argc, jsval *argv1) |
| The function used as ZOOUpdateStatus from the JavaScript environment (ZOO-API). More... | |
| JSBool | JSSleep (JSContext *cx, uintN argc, jsval *argv1) |
| The function used as sleep from the JavaScript environment (ZOO-API). More... | |
Variables | |
| static char | dbg [1024] |
Macro Definition Documentation
| #define JSCLSAS_GLOBAL_FLAGS 0 |
Function Documentation
| JSBool JSAlert | ( | JSContext * | cx, |
| uintN | argc, | ||
| jsval * | argv1 | ||
| ) |
The function used as alert from the JavaScript environment (ZOO-API)
- Parameters
-
cx the JavaScript context argc the number of parameters argv1 the parameter values
- Returns
- true
| JSBool JSLoadScripts | ( | JSContext * | cx, |
| uintN | argc, | ||
| jsval * | argv1 | ||
| ) |
The function used as importScript from the JavaScript environment (ZOO-API)
- Parameters
-
cx the JavaScript context argc the number of parameters argv1 the parameter values
- Returns
- true
| JSObject* JSObject_FromMap | ( | JSContext * | cx, |
| map * | t | ||
| ) |
Convert a map to a JavaScript Object.
- Parameters
-
cx the JavaScript context t the map to convert
- Returns
- a new JavaScript Object
| JSObject* JSObject_FromMaps | ( | JSContext * | cx, |
| maps * | t | ||
| ) |
Convert a maps to a JavaScript Object.
- Parameters
-
cx the JavaScript context t the maps to convert
- Returns
- a new JavaScript Object
| JSBool JSRequest | ( | JSContext * | cx, |
| uintN | argc, | ||
| jsval * | argv1 | ||
| ) |
The function used as ZOORequest from the JavaScript environment (ZOO-API)
- Parameters
-
cx the JavaScript context argc the number of parameters argv1 the parameter values
- Returns
- true
- See also
- setHeader
| JSBool JSSleep | ( | JSContext * | cx, |
| uintN | argc, | ||
| jsval * | argv1 | ||
| ) |
The function used as sleep from the JavaScript environment (ZOO-API).
- Parameters
-
cx the JavaScript context argc the number of parameters argv1 the parameter values
- Returns
- true
| JSBool JSTranslate | ( | JSContext * | cx, |
| uintN | argc, | ||
| jsval * | argv1 | ||
| ) |
The function used as ZOOTranslate from the JavaScript environment.
Use the ZOO-Services messages translation function from the Python environment (ZOO-API)
- Parameters
-
cx the JavaScript context argc the number of parameters argv1 the parameter values
- Returns
- true
| JSBool JSUpdateStatus | ( | JSContext * | cx, |
| uintN | argc, | ||
| jsval * | argv1 | ||
| ) |
The function used as ZOOUpdateStatus from the JavaScript environment (ZOO-API).
- Parameters
-
cx the JavaScript context argc the number of parameters argv1 the parameter values
- Returns
- true
- See also
- setHeader,_updateStatus
| char* JSValToChar | ( | JSContext * | context, |
| jsval * | arg | ||
| ) |
Convert a JavaScript value to a char*.
- Parameters
-
context the JavaScript context arg the JavaScript value
- Returns
- a new char*
- Warning
- be sure to free the resources returned by this function
| JSObject* loadZooApiFile | ( | JSContext * | cx, |
| JSObject * | global, | ||
| char * | filename | ||
| ) |
Load a JavaScript file.
- Parameters
-
cx the JavaScript context global the global JavaScript object (not used) filename the file name to load
- Returns
- a JavaScript Object on success, NULL if an errro occurred
| map* mapFromJSObject | ( | JSContext * | cx, |
| jsval | t | ||
| ) |
Convert a JavaScript Object to a map.
- Parameters
-
cx the JavaScript context t the JavaScript Object to convert
- Returns
- a new map containing the JavaScript Object
| maps* mapsFromJSObject | ( | JSContext * | cx, |
| jsval | t | ||
| ) |
Convert a JavaScript Object to a maps.
- Parameters
-
cx the JavaScript context t the JavaScript Object to convert
- Returns
- a new maps containing the JavaScript Object
| void reportError | ( | JSContext * | cx, |
| const char * | message, | ||
| JSErrorReport * | report | ||
| ) |
Print debug information messages on stderr.
- Parameters
-
cx the JavaScript context message the error message report the JavaScript Error Report
| int zoo_js_support | ( | maps ** | main_conf, |
| map * | request, | ||
| service * | s, | ||
| maps ** | inputs, | ||
| maps ** | outputs | ||
| ) |
Load a JavaScript file then run the function corresponding to the service by passing the conf, inputs and outputs parameters by value as JavaScript Objects.
- Parameters
-
main_conf the conf maps containing the main.cfg settings request the map containing the HTTP request s the service structure inputs the maps containing the inputs outputs the maps containing the outputs
- Returns
- SERVICE_SUCCEEDED or SERVICE_FAILED if the service run, -1 if the service failed to load or throw error at runtime.
Add private context object
Load the first part of the ZOO-API
Extract result
Extract outputs when available.
Extract conf when available.
Variable Documentation
|
static |
Generated on Fri Sep 18 2026 19:00:02 for ZOO-Project by
1.8.9.1














