home / secrets / src / core / store.h

store.h



//
//  store.h
//  secrets
//
//  Created by Anders on 09/07/2020.
//

#ifndef store_h
#define store_h

#include <stdio.h>
#include <stdint.h>

typedef struct {
    char* key;
    char* description;
    char* value;
} Entry;

const Entry* store_get(const char *key);
const Entry* store_by_index(uint32_t index);
uint32_t store_size(void);
void store_put(const char *key, const char* description, const char *value);
void store_persist(const char* filename);
void store_init(const char* filename);
void store_destroy(void);

#endif /* store_h */