summaryrefslogtreecommitdiff
path: root/src/char/int_storage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/char/int_storage.h')
-rw-r--r--src/char/int_storage.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/char/int_storage.h b/src/char/int_storage.h
index 1cef94d98..dcf8f07c1 100644
--- a/src/char/int_storage.h
+++ b/src/char/int_storage.h
@@ -7,16 +7,23 @@
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_guild_storage_delete(int guild_id);
+void inter_storage_defaults(void);
-int inter_storage_parse_frommap(int fd);
+/**
+ * inter_storage interface
+ **/
+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 storage_fromsql(int account_id, struct storage_data* p);
-int storage_tosql(int account_id,struct storage_data *p);
-int guild_storage_tosql(int guild_id, struct guild_storage *p);
+struct inter_storage_interface *inter_storage;
#endif /* CHAR_INT_STORAGE_H */