X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/78946542bb3286d3b2e9014dc96141770285ebc3..54a7996604bd3ae1ed65e2767be7180f6fa587bf:/include/modules.h diff --git a/include/modules.h b/include/modules.h index bc90ed81..0c746728 100644 --- a/include/modules.h +++ b/include/modules.h @@ -28,6 +28,7 @@ #include "defaults.h" #include "setup.h" #include "parse.h" +#include "client.h" /* for IDLEN */ #define MAPI_CHARYBDIS 2 @@ -44,8 +45,10 @@ struct module lt_dlhandle address; int core; /* This is int for backwards compat reasons */ int origin; /* Ditto */ + char *path; int mapi_version; void *mapi_header; /* actually struct mapi_mheader_av */ + rb_dlink_node node; }; #define MAPI_MAGIC_HDR 0x4D410000 @@ -68,9 +71,9 @@ typedef struct { const char *hapi_name; hookfn fn; + enum hook_priority priority; } mapi_hfn_list_av1; - #define MAPI_CAP_CLIENT 1 #define MAPI_CAP_SERVER 2 @@ -117,10 +120,20 @@ struct mapi_mheader_av2 #define DECLARE_MODULE_AV2(name, reg, unreg, cl, hl, hfnlist, caplist, v, desc) \ struct mapi_mheader_av2 _mheader = { MAPI_V2, reg, unreg, cl, hl, hfnlist, caplist, v, desc, DATECODE} +struct modreload +{ + char module[BUFSIZE]; + char id[IDLEN]; +}; + /* add a path */ void mod_add_path(const char *path); void mod_clear_paths(void); +/* cap-notify utilities */ +extern void mod_remember_clicaps(void); +extern void mod_notify_clicaps(void); + /* load a module */ extern void load_module(char *path); @@ -133,12 +146,10 @@ extern void load_core_modules(bool); extern bool unload_one_module(const char *, bool); extern bool load_one_module(const char *, int, bool); extern bool load_a_module(const char *, bool, int, bool); -extern int findmodule_byname(const char *); -extern void modules_init(void); +extern struct module *findmodule_byname(const char *); +extern void init_modules(void); -/* Misc externs */ -extern struct module **modlist; -extern int num_mods; -extern int max_mods; +extern rb_dlink_list module_list; +extern rb_dlink_list mod_paths; #endif /* INCLUDED_modules_h */