This function reads a specified log file or pipe and, if the log file is “compatible”, iterates its contents by calling the user-defined callback and also fires registered events.
For an overview see page TL Applications
MCO_RET mco_translog_play(char const *file_path, mco_db_h db,
mco_trans_iterator_callback_t iteration_proc,
void *user_ctx, mco_dictionary_h dict, void *mem_ptr, mco_size_t mem_size,
mco_translog_register_event_handlers_t register_callback,
void *regevent_user_ctx);
file_path
db
iteration_proc
user_ctx
dict
mem_ptr
malloc() complies with this requirement.)mem_size
register_callback
regevent_user_ctx
This function is a copy of the function
mco_translog_iterate(), but also allows registration of a user-defined callback that, in turn, registers event handlers. The functionmco_translog_play()reads a specified log file or pipe, iterates its contents by calling the user-defined callback, and fires the appropriate events. (Note that an equivalent tomco_translog_play()is not available through the JNI or C# API.)
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
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
mco_translog_iterate().MCO_E_TL_PIPE_TERM
mco_translog_iterate() but was not reinitialized by the writer.MCO_E_TL_PIPE_LOST
MCO_E_NOMEM
mem_size.