summaryrefslogtreecommitdiff
path: root/src/char/int_storage.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-08 20:54:09 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-15 11:47:29 +0300
commit1c3205f761b1894a7f2347f8ab1275f1791dbcbc (patch)
tree1d845ee0d238f1bd7ea8dc693a08dc7552854744 /src/char/int_storage.h
parenta181f75908d065293685d5adc7c90726fa29c064 (diff)
downloadhercules-1c3205f761b1894a7f2347f8ab1275f1791dbcbc.tar.gz
hercules-1c3205f761b1894a7f2347f8ab1275f1791dbcbc.tar.bz2
hercules-1c3205f761b1894a7f2347f8ab1275f1791dbcbc.tar.xz
hercules-1c3205f761b1894a7f2347f8ab1275f1791dbcbc.zip
Add most functions from int_storage.c to interfaces.
Diffstat (limited to 'src/char/int_storage.h')
-rw-r--r--src/char/int_storage.h22
1 files changed, 13 insertions, 9 deletions
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 */