diff options
Diffstat (limited to 'src/common/HPM.h')
-rw-r--r-- | src/common/HPM.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/common/HPM.h b/src/common/HPM.h index 109549aad..e55397022 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2015 Hercules Dev Team + * Copyright (C) 2013-2016 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -65,6 +65,10 @@ #endif // WIN32 +/* Forward Declarations */ +struct HPMHooking_core_interface; +struct config_t; + struct hplugin { DLL dll; unsigned int idx; @@ -119,6 +123,7 @@ struct HPConfListenStorage { char key[HPM_ADDCONF_LENGTH]; void (*parse_func) (const char *key, const char *val); int (*return_func) (const char *key); + bool required; }; /* Hercules Plugin Manager Interface */ @@ -126,9 +131,6 @@ struct HPM_interface { /* vars */ unsigned int version[2]; bool off; - bool hooking; - /* hooking */ - bool force_return; /* data */ VECTOR_DECL(struct hplugin *) plugins; VECTOR_DECL(struct hpm_symbol *) symbols; @@ -156,12 +158,13 @@ struct HPM_interface { void *(*import_symbol) (char *name, unsigned int pID); void (*share) (void *value, const char *name); void (*config_read) (void); + bool (*parse_battle_conf) (const struct config_t *config, const char *filename, bool imported); char *(*pid2name) (unsigned int pid); unsigned char (*parse_packets) (int fd, int packet_id, enum HPluginPacketHookingPoints point); void (*load_sub) (struct hplugin *plugin); - bool (*addhook_sub) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID); /* for custom config parsing */ - bool (*parseConf) (const char *w1, const char *w2, enum HPluginConfType point); + bool (*parse_conf) (const struct config_t *config, const char *filename, enum HPluginConfType point, bool imported); + bool (*parse_conf_entry) (const char *w1, const char *w2, enum HPluginConfType point); bool (*getBattleConf) (const char* w1, int *value); /* validates plugin data */ bool (*DataCheck) (struct s_HPMDataCheck *src, unsigned int size, int version, char *name); @@ -173,6 +176,9 @@ struct HPM_interface { bool (*data_store_validate) (enum HPluginDataTypes type, struct hplugin_data_store **storeptr, bool initialize); /* for server-specific HPData e.g. map_session_data */ bool (*data_store_validate_sub) (enum HPluginDataTypes type, struct hplugin_data_store **storeptr, bool initialize); + + /* hooking */ + struct HPMHooking_core_interface *hooking; }; CMDLINEARG(loadplugin); |