Loading...
Searching...
No Matches
keys_dict.h
1#pragma once
2
3#include <stdbool.h>
4#include <stdint.h>
5#include <stddef.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11typedef enum {
12 KeysDictModeOpenExisting,
13 KeysDictModeOpenAlways,
14} KeysDictMode;
15
16typedef struct KeysDict KeysDict;
17
24bool keys_dict_check_presence(const char* path);
25
35KeysDict* keys_dict_alloc(const char* path, KeysDictMode mode, size_t key_size);
36
41void keys_dict_free(KeysDict* instance);
42
49size_t keys_dict_get_total_keys(KeysDict* instance);
50
57bool keys_dict_rewind(KeysDict* instance);
58
67bool keys_dict_is_key_present(KeysDict* instance, const uint8_t* key, size_t key_size);
68
79bool keys_dict_get_next_key(KeysDict* instance, uint8_t* key, size_t key_size);
80
89bool keys_dict_add_key(KeysDict* instance, const uint8_t* key, size_t key_size);
90
99bool keys_dict_delete_key(KeysDict* instance, const uint8_t* key, size_t key_size);
100
101#ifdef __cplusplus
102}
103#endif
Definition keys_dict.c:11