added module management commands
[NeonServV5.git] / src / modules.h
index 321b5c166b930c7de73f5e43659508f9bec37abe..e729c2e509c9f332cab57d028647588eae121f31 100644 (file)
 #ifndef _modules_h
 #define _modules_h
 
-void load_module(char *name);
+#define MODINFO_STATE_STARTED 0x01
+
+struct ModuleInfo {
+    char *name;
+    int module_id;
+    #ifndef WIN32
+    void *module;
+    #else
+    HMODULE module;
+    #endif
+    int state;
+    void *startfunc;
+    void *loopfunc;
+    void *stopfunc;
+    struct ModuleInfo *next;
+};
+
+#ifndef DND_FUNCTIONS
+void loadModules();
+int 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
+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