41 lines
1,022 B
C
41 lines
1,022 B
C
|
|
#ifndef AMDUATD_STORE_H
|
||
|
|
#define AMDUATD_STORE_H
|
||
|
|
|
||
|
|
#include "amduat/asl/asl_store_fs.h"
|
||
|
|
#include "amduat/asl/asl_store_fs_meta.h"
|
||
|
|
#include "amduat/asl/asl_store_index_fs.h"
|
||
|
|
#include "amduat/asl/store.h"
|
||
|
|
|
||
|
|
#include <stdbool.h>
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
extern "C" {
|
||
|
|
#endif
|
||
|
|
|
||
|
|
typedef enum {
|
||
|
|
AMDUATD_STORE_BACKEND_FS = 0,
|
||
|
|
AMDUATD_STORE_BACKEND_INDEX = 1
|
||
|
|
} amduatd_store_backend_t;
|
||
|
|
|
||
|
|
typedef struct {
|
||
|
|
amduat_asl_store_fs_t fs;
|
||
|
|
amduat_asl_store_index_fs_t index_fs;
|
||
|
|
} amduatd_store_ctx_t;
|
||
|
|
|
||
|
|
bool amduatd_store_backend_parse(const char *value,
|
||
|
|
amduatd_store_backend_t *out_backend);
|
||
|
|
|
||
|
|
const char *amduatd_store_backend_name(amduatd_store_backend_t backend);
|
||
|
|
|
||
|
|
bool amduatd_store_init(amduat_asl_store_t *store,
|
||
|
|
amduat_asl_store_fs_config_t *cfg,
|
||
|
|
amduatd_store_ctx_t *ctx,
|
||
|
|
const char *root_path,
|
||
|
|
amduatd_store_backend_t backend);
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
} /* extern "C" */
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#endif /* AMDUATD_STORE_H */
|