Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

VXIinterpreterInterface Struct Reference
[Interpreter interface]

#include <VXIinterpreter.h>

List of all members.


Detailed Description

VXIinterpreter interface for VoiceXML execution.

Abstract interface for the VoiceXML intepreter, simply provides a single method for running the intepreter on a document and getting the document result.

There is one intepreter interface per thread/line.


Public Attributes

VXIint32(* GetVersion )(void)
 Get the VXI interface version implemented.
const VXIchar *(* GetImplementationName )(void)
 Get the name of the implementation.
VXIinterpreterResult(* Run )(struct VXIinterpreterInterface *pThis, const VXIchar *name, const VXIchar *sessionScript, VXIValue **result)
 Run a VoiceXML document and optionally return the result.
VXIinterpreterResult(* SetProperties )(struct VXIinterpreterInterface *pThis, const VXIMap *props)
 Specify runtime properties for the VoiceXML interpreter.
VXIinterpreterResult(* Validate )(struct VXIinterpreterInterface *pThis, const VXIchar *name)
 Load and parse an VXML document.
VXIinterpreterResult(* RequestStop )(struct VXIinterpreterInterface *pThis, VXIbool doStop)
 In the interpreter is running and doStop == TRUE, this will cause the in progress Run to return as soon as possible with VXIinterp_RESULT_STOPPED.
VXIinterpreterResult(* InsertEvent )(struct VXIinterpreterInterface *pThis, const VXIchar *event, const VXIchar *message)
 Trigger an event.
VXIinterpreterResult(* ClearEventQueue )(struct VXIinterpreterInterface *pThis)
 Clear the event queue.


Member Data Documentation

VXIinterpreterResult(* VXIinterpreterInterface::ClearEventQueue)(struct VXIinterpreterInterface *pThis)
 

Clear the event queue.

NOTE: this function must be called by the integration to clear the event(s) in case of error occurs and the event(s) is no longer valid. The interpreter will not clear the queue to avoid race condition.

Returns:
VXIinterp_RESULT_SUCCESS on success
VXIinterp_RESULT_INVALID_ARGUMENT

const VXIchar*(* VXIinterpreterInterface::GetImplementationName)(void)
 

Get the name of the implementation.

Returns:
Implementation defined string that must be different from all other implementations. The recommended name is one where the interface name is prefixed by the implementator's Internet address in reverse order, such as com.xyz.rec for VXIrec from xyz.com. This is similar to how VoiceXML 1.0 recommends defining application specific error types.

VXIint32(* VXIinterpreterInterface::GetVersion)(void)
 

Get the VXI interface version implemented.

Returns:
VXIint32 for the version number. The high high word is the major version number, the low word is the minor version number, using the native CPU/OS byte order. The current version is VXI_CURRENT_VERSION as defined in VXItypes.h.

VXIinterpreterResult(* VXIinterpreterInterface::InsertEvent)(struct VXIinterpreterInterface *pThis, const VXIchar *event, const VXIchar *message)
 

Trigger an event.

Parameters:
event [IN] VoiceXML event to generate during Run.
message [IN] Corresponding message string; may be NULL.
Returns:
VXIinterp_RESULT_SUCCESS on success
VXIinterp_RESULT_INVALID_ARGUMENT

VXIinterpreterResult(* VXIinterpreterInterface::RequestStop)(struct VXIinterpreterInterface *pThis, VXIbool doStop)
 

In the interpreter is running and doStop == TRUE, this will cause the in progress Run to return as soon as possible with VXIinterp_RESULT_STOPPED.

If doStop == FALSE, this clears any pending stop request.

NOTE: if the interpreter encounters an error before noticing the request or while servicing the request, the actual return value from Run may not something other than VXIinterp_RESULT_STOPPED.

Returns:
VXIinterp_RESULT_SUCCESS on success
VXIinterp_RESULT_INVALID_ARGUMENT

VXIinterpreterResult(* VXIinterpreterInterface::Run)(struct VXIinterpreterInterface *pThis, const VXIchar *name, const VXIchar *sessionScript, VXIValue **result)
 

Run a VoiceXML document and optionally return the result.

Parameters:
name [IN] Name of the VoiceXML document to fetch and execute, may be a URL or a platform dependant path. See the Open() method in VXIinet.h for details about supported names, however for URLs this must always be an absolute URL and any query arguments must be embedded.
sessionScript [IN] A series of ECMAScript expressions which will be evaluated by the VXI to populate the session scope in ECMAScript.
result [OUT] (Optional, pass NULL if not desired.) Return value for the VoiceXML document (from <exit/>), this is allocated on success and when there is an exit value (a NULL pointer is returned otherwise), the caller is responsible for destroying the returned value by calling VXIValueDestroy().
Returns:
[From normal operation]
VXIinterp_RESULT_SUCCESS on success
VXIinterp_RESULT_FAILURE if normal error occured
VXIinterp_RESULT_STOPPED if aborted by Stop
[During initialization from defaults]
VXIinterp_RESULT_FETCH_TIMEOUT
VXIinterp_RESULT_FETCH_ERROR
VXIinterp_RESULT_INVALID_DOCUMENT
[Serious errors]
VXIinterp_RESULT_FATAL_ERROR
VXIinterp_RESULT_OUT_OF_MEMORY
VXIinterp_RESULT_PLATFORM_ERROR
VXIinterp_RESULT_INVALID_ARGUMENT

VXIinterpreterResult(* VXIinterpreterInterface::SetProperties)(struct VXIinterpreterInterface *pThis, const VXIMap *props)
 

Specify runtime properties for the VoiceXML interpreter.

Parameters:
props [IN] Map containing a list of properties. Currently these are:
  • VXI_BEEP_AUDIO URI for the beep audio
  • VXI_PLATFORM_DEFAULTS URI for the platform defaults
  • VXI_DEFAULT_ACCESS_CONTROL
Returns:
VXIinterp_RESULT_SUCCESS on success
VXIinterp_RESULT_INVALID_PROP_NAME
VXIinterp_RESULT_INVALID_PROP_VALUE
VXIinterp_RESULT_INVALID_ARGUMENT

VXIinterpreterResult(* VXIinterpreterInterface::Validate)(struct VXIinterpreterInterface *pThis, const VXIchar *name)
 

Load and parse an VXML document.

This tests the validity.

Parameters:
name [IN] Name of the VoiceXML document to fetch and execute, may be a URL or a platform dependant path. See the Open( ) method in VXIinet.h for details about supported names, however for URLs this must always be an absolute URL and any query arguments must be embedded.
Returns:
VXIinterp_RESULT_SUCCESS if document exists and is valid
VXIinterp_RESULT_FAILURE if document is invalid VXML
VXIinterp_RESULT_FETCH_ERROR if document retrieval failed
VXIinterp_RESULT_FETCH_TIMEOUT
VXIinterp_RESULT_INVALID_ARGUMENT
VXIinterp_RESULT_FATAL_ERROR
VXIinterp_RESULT_OUT_OF_MEMORY


The documentation for this struct was generated from the following file:
Generated on Wed Jun 1 12:50:19 2005 for OpenVXI by  doxygen 1.4.2