2024-06-20 00:34:32 +00:00
|
|
|
#pragma once
|
|
|
|
#include "types.h"
|
2024-06-27 20:05:39 +00:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
typedef void (*lm_ctx_pools_callback_t)(lm_ctx_t *ctx, lm_pool_t *pool, bool status, void *data);
|
2024-06-20 00:34:32 +00:00
|
|
|
|
|
|
|
void lm_ctx_init(lm_ctx_t *ctx);
|
2024-06-27 20:05:39 +00:00
|
|
|
bool lm_ctx_set_data(lm_ctx_t *ctx, char *dir);
|
|
|
|
bool lm_ctx_set_root(lm_ctx_t *ctx, char *dir);
|
|
|
|
bool lm_ctx_set_temp(lm_ctx_t *ctx, char *dir);
|
2024-06-20 00:34:32 +00:00
|
|
|
void lm_ctx_free(lm_ctx_t *ctx);
|
2024-06-22 22:55:01 +00:00
|
|
|
|
|
|
|
lm_pool_t *lm_ctx_pools_add(lm_ctx_t *ctx, char *name, char *url);
|
|
|
|
bool lm_ctx_pools_del(lm_ctx_t *ctx, char *name);
|
|
|
|
void lm_ctx_pools_clear(lm_ctx_t *ctx);
|
|
|
|
void lm_ctx_pools_test(lm_ctx_t *ctx);
|
2024-06-25 18:21:15 +00:00
|
|
|
bool lm_ctx_pools_serve(lm_ctx_t *ctx, char *addr, uint8_t threads);
|
2024-06-27 20:05:39 +00:00
|
|
|
bool lm_ctx_pools_load(lm_ctx_t *ctx, bool force_update, lm_ctx_pools_callback_t callback, void *data);
|