49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
#ifndef AMDUAT_ASL_STORE_FS_META_H
|
|
#define AMDUAT_ASL_STORE_FS_META_H
|
|
|
|
#include "amduat/asl/core.h"
|
|
#include "amduat/asl/store.h"
|
|
|
|
#include <stdbool.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
enum { AMDUAT_ASL_STORE_FS_STORE_ID_MAX = 256 };
|
|
|
|
typedef struct {
|
|
amduat_asl_store_config_t config;
|
|
char store_id[AMDUAT_ASL_STORE_FS_STORE_ID_MAX + 1];
|
|
} amduat_asl_store_fs_config_t;
|
|
|
|
typedef struct {
|
|
bool has_snapshot;
|
|
amduat_reference_t snapshot;
|
|
} amduat_asl_store_fs_head_t;
|
|
|
|
bool amduat_asl_store_fs_init_root(
|
|
const char *root_path,
|
|
const amduat_asl_store_fs_config_t *cfg_in,
|
|
amduat_asl_store_fs_config_t *cfg_out);
|
|
|
|
bool amduat_asl_store_fs_meta_validate_store_id(const char *store_id);
|
|
|
|
bool amduat_asl_store_fs_meta_copy_store_id(
|
|
char out_id[AMDUAT_ASL_STORE_FS_STORE_ID_MAX + 1],
|
|
const char *store_id);
|
|
|
|
bool amduat_asl_store_fs_load_config(
|
|
const char *root_path,
|
|
amduat_asl_store_fs_config_t *out_cfg);
|
|
|
|
bool amduat_asl_store_fs_load_head(
|
|
const char *root_path,
|
|
amduat_asl_store_fs_head_t *out_head);
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif /* AMDUAT_ASL_STORE_FS_META_H */
|