diff options
Diffstat (limited to 'main/negentropy_adapter.h')
| -rw-r--r-- | main/negentropy_adapter.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/main/negentropy_adapter.h b/main/negentropy_adapter.h new file mode 100644 index 0000000..1e8c0a8 --- /dev/null +++ b/main/negentropy_adapter.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | #ifndef NEGENTROPY_ADAPTER_H | ||
| 2 | #define NEGENTROPY_ADAPTER_H | ||
| 3 | |||
| 4 | #include "esp_err.h" | ||
| 5 | #include <stdint.h> | ||
| 6 | #include <stddef.h> | ||
| 7 | |||
| 8 | typedef struct { | ||
| 9 | uint64_t created_at; | ||
| 10 | uint8_t id[32]; | ||
| 11 | } negentropy_item_t; | ||
| 12 | |||
| 13 | typedef struct negentropy_adapter negentropy_adapter_t; | ||
| 14 | |||
| 15 | negentropy_adapter_t *negentropy_adapter_from_storage(void *storage_engine); | ||
| 16 | |||
| 17 | esp_err_t negentropy_adapter_get_items(negentropy_adapter_t *adapter, | ||
| 18 | negentropy_item_t **items, | ||
| 19 | size_t *count); | ||
| 20 | |||
| 21 | esp_err_t negentropy_adapter_insert_item(negentropy_adapter_t *adapter, | ||
| 22 | uint64_t created_at, | ||
| 23 | const uint8_t *id); | ||
| 24 | |||
| 25 | void negentropy_adapter_destroy(negentropy_adapter_t *adapter); | ||
| 26 | |||
| 27 | #endif | ||