diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-09-11 20:23:24 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-09-11 20:23:24 +0300 |
commit | 23f9521d1abdeb599fbe81d0c196a9ee92f5fd8a (patch) | |
tree | 5ee5e59339bf2af98039ec4584f8a01410a95c11 /src/storage.h | |
parent | log: refactoring (diff) | |
download | cimple-23f9521d1abdeb599fbe81d0c196a9ee92f5fd8a.tar.gz cimple-23f9521d1abdeb599fbe81d0c196a9ee92f5fd8a.zip |
create SQLite database on startup
Diffstat (limited to 'src/storage.h')
-rw-r--r-- | src/storage.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/storage.h b/src/storage.h new file mode 100644 index 0000000..1473325 --- /dev/null +++ b/src/storage.h @@ -0,0 +1,29 @@ +#ifndef __STORAGE_H__ +#define __STORAGE_H__ + +#include "storage_sqlite.h" + +enum storage_type { + STORAGE_TYPE_SQLITE, +}; + +struct storage_settings { + enum storage_type type; + union { + struct storage_settings_sqlite sqlite; + }; +}; + +void storage_settings_destroy(const struct storage_settings *); + +struct storage { + enum storage_type type; + union { + struct storage_sqlite *sqlite; + }; +}; + +int storage_create(struct storage *, const struct storage_settings *); +void storage_destroy(struct storage *); + +#endif |