This function reads a specified log file or pipe and, if the log file is “compatible”, iterates its content by calling the user-defined callback and also fires registered events.
For an overview see page TL Applications
MCO_RET mco_translog_play_ex(mco_TL_play_params_h tl_play_params);
tl_play_params
mco_TL_play_params_t structure containing the initialized parameters.This function is similar to
mco_translog_play(), except that it takes a single
mco_TL_play_params_t structure argument. The
mco_TL_play_params_t structure is initialized by
calling mco_translog_play_params_init().
The fields of the structure correspond to parameters of
mco_translog_play(), with additional fields including:
mco_device_t *pipe_device;
The pipe_device is a descriptor of the pipe device to be used by the readers. If the value of
pipe_device is NULL, then the transaction logging runtime chooses the first pipe
that does not have any connected readers. The same happens when the old-style
mco_translog_play() and
mco_translog_iterate() APIs are used.
MCO_S_OK
MCO_S_OKAs with mco_translog_iterate(), if the user-defined callback
returns any value other than MCO_S_OK, this function aborts and returns that code as
its own return code. This is the correct way to break the iteration loop if an error condition
occurs inside the user-defined iteration callback.
MCO_E_TL_INVAL
MCO_E_TL_NOT_ITERABLE
The log was created without the flag
MCO_TRANSLOG_ITERABLE.
MCO_E_TL_LOG_NOT_OPENED
MCO_E_TL_IO_ERROR
MCO_E_VERS_MISMATCH
MCO_E_TL_INVFORMAT
MCO_S_TL_INVDATA
MCO_E_TL_PIPE_USED
The pipe is already open in another call to
mco_translog_iterate().
MCO_E_TL_PIPE_TERM
Logging was terminated during the previous call to
mco_translog_iterate() but was not reinitialized by the
writer.
MCO_E_TL_PIPE_LOST
MCO_E_NOMEM
mem_size.