summaryrefslogtreecommitdiff
path: root/src/char/int_storage.h
blob: f02decf49ef92d73ab9834365e1a55df615e6c7b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder

#ifndef CHAR_INT_STORAGE_H
#define CHAR_INT_STORAGE_H

#include "common/hercules.h"

struct storage_data;
struct guild_storage;

/**
 * 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);
};

#ifdef HERCULES_CORE
void inter_storage_defaults(void);
#endif // HERCULES_CORE

HPShared struct inter_storage_interface *inter_storage;

#endif /* CHAR_INT_STORAGE_H */