Mercurial > paster
diff database.h @ 0:15a06aa20298
misc: initial import
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 04 Feb 2020 13:35:52 +0100 |
parents | |
children | 98ef2713eb0d |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/database.h Tue Feb 04 13:35:52 2020 +0100 @@ -0,0 +1,27 @@ +#ifndef PASTER_DATABASE_H +#define PASTER_DATABASE_H + +#include <stdbool.h> +#include <stddef.h> + +struct paste; + +bool +database_open(const char *path); + +bool +database_recents(struct paste *pastes, size_t *max); + +bool +database_get(struct paste *paste, const char *uuid); + +bool +database_insert(struct paste *paste); + +void +database_clear(void); + +void +database_finish(void); + +#endif /* !PASTER_DATABASE_H */