summaryrefslogtreecommitdiff
path: root/src/char/inter.h
blob: c315d57727e4b43933a1156989332029b3d10f37 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams

#ifndef CHAR_INTER_H
#define CHAR_INTER_H

#include "char.h"
#include "../common/cbasetypes.h"
#include "../common/sql.h"

struct accreg;

#define inter_cfgName "conf/inter-server.conf"

extern unsigned int party_share_level;

extern Sql* sql_handle;
extern Sql* lsql_handle;

void inter_defaults(void);

struct inter_interface {
    const char* (*msg_txt) (int msg_number);
    bool (*msg_config_read) (const char *cfg_name, bool allow_override);
    void (*do_final_msg) (void);
    const char* (*job_name) (int class_);
    void (*vmsg_to_fd) (int fd, int u_fd, int aid, char* msg, va_list ap);
    void (*msg_to_fd) (int fd, int u_fd, int aid, char *msg, ...);
    void (*savereg) (int account_id, int char_id, const char *key, unsigned int index, intptr_t val, bool is_string);
    int (*accreg_fromsql) (int account_id,int char_id, int fd, int type);
    int (*config_read) (const char* cfgName);
    int (*vlog) (char* fmt, va_list ap);
    int (*log) (char* fmt, ...);
    int (*init_sql) (const char *file);
    int (*mapif_init) (int fd);
    int (*check_ttl_wisdata_sub) (DBKey key, DBData *data, va_list ap);
    int (*check_ttl_wisdata) (void);
    int (*check_length) (int fd, int length);
    int (*parse_frommap) (int fd);
    void (*final) (void);
};

struct inter_interface *inter;

#endif /* CHAR_INTER_H */