47#include "mrtklib/mrtk_version.h"
mrtk_context_t * g_mrtk_legacy_ctx
Global context for legacy RTKLIB trace() bridge.
mrtk_log_level_t
Log severity levels.
void * mrtk_context_get_user_data(const mrtk_context_t *ctx)
Retrieve user-defined data from the context.
void(* mrtk_log_cb_t)(mrtk_context_t *ctx, mrtk_log_level_t level, const char *msg)
Log callback function signature.
void mrtk_log(mrtk_context_t *ctx, mrtk_log_level_t level, const char *fmt,...)
Log a formatted message.
void mrtk_context_set_log_callback(mrtk_context_t *ctx, mrtk_log_cb_t cb)
Set a custom log callback handler.
mrtk_context_t * mrtk_context_new(void)
Create a new library context.
mrtk_log_level_t mrtk_context_get_log_level(const mrtk_context_t *ctx)
Get the current log level threshold.
const char * mrtk_version_string(void)
Get the library version string.
void mrtk_clear_error(mrtk_context_t *ctx)
Clear the last error message.
void mrtk_log_v(mrtk_context_t *ctx, mrtk_log_level_t level, const char *fmt, va_list args)
Log a formatted message using a pre-initialized va_list.
void mrtk_context_free(mrtk_context_t *ctx)
Free the library context and release all associated resources.
void mrtk_context_set_log_level(mrtk_context_t *ctx, mrtk_log_level_t level)
Set the minimum log level threshold.
void mrtk_context_set_user_data(mrtk_context_t *ctx, void *user_data)
Associate user-defined data with the context.
struct mrtk_context_s mrtk_context_t
Opaque library context structure.
const char * mrtk_get_last_error(const mrtk_context_t *ctx)
Get the last error message.
Internal context structure.