20#ifndef _STORAGE_PORT_H
21#define _STORAGE_PORT_H
30typedef uint32_t cache_handle_t;
31typedef int (*open_cache)(
const char *namespace_name, open_mode_t open_mode, cache_handle_t *out_handle);
32typedef void (*close_cache)(cache_handle_t handle);
33typedef int (*erase_all_cache)(cache_handle_t handle);
34typedef int (*write_cache)(cache_handle_t handle,
const char *key,
const void* value,
size_t length);
35typedef int (*read_cache)(cache_handle_t handle,
const char *key,
void* out_value,
size_t *length);
37struct cache_fn_mapping {
40 erase_all_cache erase_all;
45struct cache_fn_mapping link_storage_fn(void *storage_cb);