16#ifndef _KVSTORE_STATIC_API
17#define _KVSTORE_STATIC_API
33typedef struct _opaque_kv_key_iterator *kv_iterator_t;
35#define KV_WRITE_ONCE_FLAG (1 << 0)
36#define KV_REQUIRE_CONFIDENTIALITY_FLAG (1 << 1)
37#define KV_RESERVED_FLAG (1 << 2)
38#define KV_REQUIRE_REPLAY_PROTECTION_FLAG (1 << 3)
40#define KV_MAX_KEY_LENGTH 128
69int kv_set(
const char *full_name_key,
const void *buffer,
size_t size, uint32_t create_flags);
81int kv_get(
const char *full_name_key,
void *buffer,
size_t buffer_size,
size_t *actual_size);
int kv_get(const char *full_name_key, void *buffer, size_t buffer_size, size_t *actual_size)
Get one KVStore item by given key.
int kv_set(const char *full_name_key, const void *buffer, size_t size, uint32_t create_flags)
Set one KVStore item, given key and value.
int kv_iterator_close(kv_iterator_t it)
Close iteration and deallocate the iterator handle.
int kv_iterator_open(kv_iterator_t *it, const char *full_prefix)
Start an iteration over KVStore keys to find all the entries that fit the full_prefix.
struct info kv_info_t
The key size.
int kv_reset(const char *kvstore_path)
Remove all keys and related data from a specified partition.
int kv_get_info(const char *full_name_key, kv_info_t *info)
Get information of a given key.The returned info contains size and flags.
int kv_iterator_next(kv_iterator_t it, char *key, size_t key_size)
Get next key in iteration that matches the prefix.
int kv_remove(const char *full_name_key)
Remove a KVStore item by given key.