X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmodules.h;h=7600f6e59703bfaa80e3e5e318af6edfc876682b;hp=321b5c166b930c7de73f5e43659508f9bec37abe;hb=HEAD;hpb=706e48b1e666054030c491d864f740071e390038 diff --git a/src/modules.h b/src/modules.h index 321b5c1..7600f6e 100644 --- a/src/modules.h +++ b/src/modules.h @@ -1,4 +1,4 @@ -/* modules.h - NeonServ v5.3 +/* modules.h - NeonServ v5.6 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -16,11 +16,37 @@ */ #ifndef _modules_h #define _modules_h +#include "main.h" -void load_module(char *name); +#define MODINFO_STATE_STARTED 0x01 +#define MODINFO_STATE_PROTECTED 0x02 + +struct ModuleInfo { + char *name; + int module_id; + #ifndef WIN32 + void *module; + #else + HMODULE module; + #endif + int state; + void *startfunc; + void *stopfunc; + struct ModuleInfo *next; +}; + +#ifndef DND_FUNCTIONS +void loadModules(); +struct ModuleInfo *loadModule(char *name); void start_modules(); -void loop_modules(); void stop_modules(); int module_loaded(int module_id); -#endif \ No newline at end of file +/* MODULAR ACCESSIBLE */ char *get_module_name(int module_id); + +int ext_load_module(char *name); +int ext_unload_module(char *name); +int ext_reload_module(char *name); +struct ModuleInfo *ext_get_modules(struct ModuleInfo *last); +#endif +#endif