]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/database.h
Split database into a writer and reader
[people/ms/libloc.git] / src / database.h
index 407abcb3debe54540906b0643cef8dab022a7f2a..bec2f41bd5e7bd985a9a07ee2a10ee5607fa1c25 100644 (file)
 #include "as.h"
 
 struct loc_database;
-int loc_database_new(struct loc_ctx* ctx, struct loc_database** db, size_t pool_size);
-int loc_database_open(struct loc_ctx* ctx, struct loc_database** database, FILE* f);
+int loc_database_new(struct loc_ctx* ctx, struct loc_database** database, FILE* f);
 struct loc_database* loc_database_ref(struct loc_database* db);
 struct loc_database* loc_database_unref(struct loc_database* db);
 
 time_t loc_database_created_at(struct loc_database* db);
 const char* loc_database_get_vendor(struct loc_database* db);
-int loc_database_set_vendor(struct loc_database* db, const char* vendor);
 const char* loc_database_get_description(struct loc_database* db);
-int loc_database_set_description(struct loc_database* db, const char* description);
 
+int loc_database_get_as(struct loc_database* db, struct loc_as** as, uint32_t number);
 size_t loc_database_count_as(struct loc_database* db);
-struct loc_as* loc_database_add_as(struct loc_database* db, uint32_t number);
 
 int loc_database_read(struct loc_database* db, FILE* f);
 int loc_database_write(struct loc_database* db, FILE* f);