From 1c3205f761b1894a7f2347f8ab1275f1791dbcbc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 8 Nov 2014 20:54:09 +0300 Subject: Add most functions from int_storage.c to interfaces. --- src/char/int_storage.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/char/int_storage.h') diff --git a/src/char/int_storage.h b/src/char/int_storage.h index abf4703f9..6da60f4a8 100644 --- a/src/char/int_storage.h +++ b/src/char/int_storage.h @@ -7,16 +7,20 @@ struct storage_data; struct guild_storage; -int inter_storage_sql_init(void); -void inter_storage_sql_final(void); -int inter_storage_delete(int account_id); -int inter_storage_guild_storage_delete(int guild_id); +void inter_storage_defaults(void); -int inter_storage_parse_frommap(int fd); +struct inter_storage_interface { + int (*tosql) (int account_id, struct storage_data* p); + int (*fromsql) (int account_id, struct storage_data* p); + int (*guild_storage_tosql) (int guild_id, struct guild_storage* p); + int (*guild_storage_fromsql) (int guild_id, struct guild_storage* p); + int (*sql_init) (void); + void (*sql_final) (void); + int (*delete_) (int account_id); + int (*guild_storage_delete) (int guild_id); + int (*parse_frommap) (int fd); +}; -//Exported for use in the TXT-SQL converter. -int inter_storage_fromsql(int account_id, struct storage_data* p); -int inter_storage_tosql(int account_id,struct storage_data *p); -int inter_storage_guild_storage_tosql(int guild_id, struct guild_storage *p); +struct inter_storage_interface *inter_storage; #endif /* CHAR_INT_STORAGE_H */ -- cgit v1.2.3-60-g2f50