Callback API
[JuliusLib API]

Collaboration diagram for Callback API:
Functions to add callback to get results and status. More...

Functions

int callback_add (Recog *recog, int code, void(*func)(Recog *recog, void *data), void *data)
 Register a function to a callback registory.
int callback_add_adin (Recog *recog, int code, void(*func)(Recog *recog, SP16 *buf, int len, void *data), void *data)
 Register a function to the A/D-in type callback registory.
boolean callback_exist (Recog *recog, int code)
 Check if at least one function has been registered to a callback repository.
boolean callback_delete (Recog *recog, int id)
 Delete an already registered function from callback.

Detailed Description

Functions to add callback to get results and status.


Function Documentation

int callback_add ( Recog recog,
int  code,
void(*)(Recog *recog, void *data)  func,
void *  data 
)

Register a function to a callback registory.

Parameters:
recog [i/o] engine instance
code [in] code in which the function will be registered
func [in] function
data [in] user-specified argument to be passed when the function is called inside Julius
Returns:
global callback ID unique for the whole process, or -1 on error.

Definition at line 135 of file callback.c.

Referenced by main(), and setup_output_msock().

Here is the caller graph for this function:

int callback_add_adin ( Recog recog,
int  code,
void(*)(Recog *recog, SP16 *buf, int len, void *data)  func,
void *  data 
)

Register a function to the A/D-in type callback registory.

Parameters:
recog [i/o] engine instance
code [in] code in which the function will be registered
func [in] function
data [in] user-specified argument to be passed when the function is called inside Julius
Returns:
global callback ID unique for the whole process, or -1 on error.

Definition at line 161 of file callback.c.

boolean callback_exist ( Recog recog,
int  code 
)

Check if at least one function has been registered to a callback repository.

Parameters:
recog [in] engine instance
code [in] callback code
Returns:
TRUE when at least one is registered, or FALSE if none.

Definition at line 246 of file callback.c.

boolean callback_delete ( Recog recog,
int  id 
)

Delete an already registered function from callback.

Parameters:
recog [i/o] engine instance
id [in] global callback ID to delete
Returns:
TRUE on success, or FALSE on failure.

Definition at line 271 of file callback.c.


Generated on Tue Dec 18 16:01:47 2007 for Julius by  doxygen 1.5.4