-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugins.h
40 lines (35 loc) · 1.2 KB
/
plugins.h
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
#ifndef _PLUGINS_H
#define _PLUGINS_H
#include "plugin/plugin.h"
struct plugin_call_job_args {
int id;
char *arg1;
char *arg2;
char *arg3;
char *arg4;
char *arg5;
};
struct plugin {
const char *id;
const char *path;
void *handle;
char *name;
uint32_t version;
int (*fc_load)(struct epg_handle *);
int (*fc_unload)(struct epg_handle *);
int (*fc_player_join)(struct epg_handle *, char *);
int (*fc_player_leave)(struct epg_handle *, char *, char *);
int (*fc_player_say)(struct epg_handle *, char *, char *);
int (*fc_player_die)(struct epg_handle *, char *, char *);
int (*fc_player_achievement)(struct epg_handle *, char *, char *);
int (*fc_player_challenge)(struct epg_handle *, char *, char *);
int (*fc_player_goal)(struct epg_handle *, char *, char *);
int (*fc_server_stopping)(struct epg_handle *);
int (*fc_server_starting)(struct epg_handle *, char *);
int (*fc_server_started)(struct epg_handle *, char *);
};
int plugin_load_meta(int stderr_fd, const char *path, struct plugin *out);
int plugin_load(int stderr_fd, const struct plugin *plugin);
int plugin_unload_meta(int stderr_fd, struct plugin *plugin);
int plugin_unload(int stderr_fd, const struct plugin *plugin);
#endif // _PLUGINS_H