> For the complete documentation index, see [llms.txt](https://sandbox-docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/jsproc_8h_source.md).

# jsproc.h

[Go to the documentation of this file.](/s-adk-5.1-programmers-guide/readme/files/dir_9225c15707e5fd27b700c844799f6dc5/dir_7447c8e6446ba60664134d106c4ecb69/dir_8c13e55433a2f6247a8b0f337ff26c19/jsproc_8h.md)

```cpp
 1 // -*- Mode: C++; -*-
 2 #ifndef JSPROC_H_20150609
 3 #define JSPROC_H_20150609
 4 
 7 #include <string>
 8 #include <vector>
 9 #include <map>
 10 
 11 #if defined _WIN32 && defined VFI_JSPROC_SHARED_EXPORT
 12 # define DllSpec __declspec(dllexport)
 13 #elif defined __GNUC__ && defined VFI_JSPROC_SHARED_EXPORT
 14 # define DllSpec __attribute__((visibility ("default")))
 15 #else
 16 # define DllSpec
 17 #endif
 18 
 19 namespace vfihtml { class ExtContext; }
 20 
 21 #ifndef DOXYGEN
 22 namespace js {
 23 #endif
 24 
 34 DllSpec bool jsProcessor(void *data,
 35  const std::string &sourcecode,
 36  std::map<std::string,std::string> &arg,
 37  std::string &out,
 38  std::string &err,
 39  std::string &exitcode);
 40 
 51 DllSpec bool jsProcessorExt(void *data,
 52  const std::string &sourcecode,
 53  std::map<std::string,std::string> &arg,
 54  std::string &out,
 55  std::string &err,
 56  std::string &exitcode,
 57  vfihtml::ExtContext *context);
 58 
 60 DllSpec const char *jsProcVersion();
 61 
 62 
 66 DllSpec void jsSetHttpProxy(const char *proxy);
 67 
 71 DllSpec const char *jsGetHttpProxy();
 72 
 85 DllSpec void jsSetConsole( void (*cb)(void *data, const char *text), void *data);
 86 
 91 DllSpec void jsGetConsole( void (*&cb)(void *, const char *), void *&data);
 92 
 110 DllSpec void jsSetNotify( int (*cb)(void *data,
 111  const char *to,
 112  const char *notification_id,
 113  const char *json_param,
 114  unsigned flags,
 115  const char *from), void *data);
 116 
 121 DllSpec void jsGetNotify( int (*&cb)(void *data,
 122  const char *to,
 123  const char *notification_id,
 124  const char *json_param,
 125  unsigned flags,
 126  const char *from), void *&data);
 127 
 148 DllSpec void jsSetNotifyAndWait( int (*cb)(void *data,
 149  const char *to,
 150  const char *notification_id,
 151  const char *json_param,
 152  unsigned flags,
 153  const char *from,
 154  const char *wait_id,
 155  std::string &result,
 156  int timeout_msec), void *data);
 157 
 162 DllSpec void jsGetNotifyAndWait( int (*&cb)(void *data,
 163  const char *to,
 164  const char *notification_id,
 165  const char *json_param,
 166  unsigned flags,
 167  const char *from,
 168  const char *wait_id,
 169  std::string &result,
 170  int timeout_msec), void *&data);
 171 
 173 enum JSTraceType {
 174  JST_HTTPGET,
 175  JST_HTTPPOST,
 176  JST_HTTPRESULT
 177 };
 178 
 193 DllSpec void jsSetTrace( void (*cb)(void *data,
 194  JSTraceType type,
 195  const std::string &app_id,
 196  std::map<std::string,std::string> &trace), void *data);
 197 
 202 DllSpec void jsGetTrace( void (*&cb)(void *data,
 203  JSTraceType type,
 204  const std::string &app_id,
 205  std::map<std::string,std::string> &trace), void *&data);
 206 
 207 
 208 enum JSLogLevel {
 209  JSL_EMERGENCY=0,
 210  JSL_ALERT=1,
 211  JSL_CRITICAL=2,
 212  JSL_ERROR=3,
 213  JSL_WARNING=4,
 214  JSL_NOTICE=5,
 215  JSL_INFO=6,
 216  JSL_DEBUG=7
 217 };
 218 
 233 DllSpec void jsSetLog( void (*cb)(void *data,
 234  const std::string &app_id,
 235  JSLogLevel log_level,
 236  const std::vector<std::string> &msg), void *data);
 237 
 242 DllSpec void jsGetLog( void (*&cb)(void *data,
 243  const std::string &app_id,
 244  JSLogLevel log_level,
 245  const std::vector<std::string> &msg), void *&data);
 246 
 247 #ifndef DOXYGEN
 248 } // namespace
 249 #endif
 250 
 251 #undef DllSpec
 252 
 253 #endif
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/jsproc_8h_source.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
