Changed prototype of new API call Xorriso_start_msg_watcher()
This commit is contained in:
@ -564,6 +564,10 @@ int Xorriso_process_errfile(struct XorrisO *xorriso,
|
||||
later time be retrieved by the application.
|
||||
These redirection caches can be stacked to allow stacked applications.
|
||||
xorriso itself uses them for internal purposes.
|
||||
|
||||
The call Xorriso_start_msg_watcher() starts a concurrent thread which
|
||||
uses outlists to collect messages and to hand them over by calling
|
||||
application provided functions.
|
||||
*/
|
||||
|
||||
/* A list item able of forming double chained lists */
|
||||
@ -604,7 +608,7 @@ int Xorriso_push_outlists(struct XorrisO *xorriso, int *stack_handle,
|
||||
xorriso API call is being executed on the same struct XorrisO.
|
||||
In such a situation, it should not be used with high frequency in order
|
||||
not to hamper the ongoing xorriso operation by blocking its message
|
||||
output facility. Ten times per second should be enough.
|
||||
output facility. A hundred times per second should be enough.
|
||||
|
||||
@since 1.2.6
|
||||
@param xorriso The environment handle
|
||||
@ -655,22 +659,26 @@ int Xorriso_pull_outlists(struct XorrisO *xorriso, int stack_handle,
|
||||
@param result_handler Pointer to the function which shall be called with
|
||||
each result message. A NULL pointer causes output
|
||||
to be directed to stdout.
|
||||
The function should use the pointer xorriso with
|
||||
outmost caution, because nearly all API calls are not
|
||||
thread-safe and may not be used. Best is to use it
|
||||
only to distinguish the callers if more than one
|
||||
struct XorrisO is in use by the application.
|
||||
@param result_handle The first argument of (*result_handler)(). It shall
|
||||
point to a memory object that knows all necessary
|
||||
external parameters for running (*result_handler)().
|
||||
Submit NULL if result_handler is NULL.
|
||||
@param info_handler Pointer to the function which shall be called with
|
||||
each info message. A NULL pointer causes output to
|
||||
be directed to stderr resp. to -as mkisofs -log-file.
|
||||
The same caution is needed as with result_handler.
|
||||
@param info_handle The first argument of (*info_handler)(). It shall
|
||||
point to a memory object that knows all necessary
|
||||
external parameters for running (*info_handler)().
|
||||
Submit NULL if info_handler is NULL.
|
||||
@param flag unused yet, submit 0
|
||||
@return 1 on success, <=0 if failure (e.g. there is already
|
||||
a watcher active)
|
||||
*/
|
||||
int Xorriso_start_msg_watcher(struct XorrisO *xorriso,
|
||||
int (*result_handler)(struct XorrisO *xorriso, char *text),
|
||||
int (*info_handler)(struct XorrisO *xorriso, char *text),
|
||||
int (*result_handler)(void *handle, char *text),
|
||||
void *result_handle,
|
||||
int (*info_handler)(void *handle, char *text),
|
||||
void *info_handle,
|
||||
int flag);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user