summaryrefslogtreecommitdiff
path: root/src/char/int_mail.h
blob: d15b264b5b2ee134af47027805a580e0e856fc72 (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_MAIL_H
#define CHAR_INT_MAIL_H

#include "common/hercules.h"

struct item;
struct mail_data;
struct mail_message;

/**
 * inter_mail interface
 **/
struct inter_mail_interface {
	int (*sql_init) (void);
	void (*sql_final) (void);
	int (*parse_frommap) (int fd);
	int (*fromsql) (int char_id, struct mail_data* md);
	int (*savemessage) (struct mail_message* msg);
	bool (*loadmessage) (int mail_id, struct mail_message* msg);
	bool (*DeleteAttach) (int mail_id);
	void (*sendmail) (int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item);
};

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

HPShared struct inter_mail_interface *inter_mail;

#endif /* CHAR_INT_MAIL_H */