diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/main.cpp | 12 | ||||
-rw-r--r-- | core/plugin.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/core/main.cpp b/core/main.cpp index 44add56..a0ed347 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -17,6 +17,7 @@ int LoadModules(); INT_PTR CallService(const char *name, WPARAM w, LPARAM l); HANDLE CreateServiceFunction(const char *name, SERVICE pService); int ServiceExists(const char *name); +int GetPluginInfoList(WPARAM, LPARAM); PLUGINLINK link = {&CreateServiceFunction, &CallService, &ServiceExists}; @@ -29,6 +30,7 @@ int main(int argc, char *argv[]) cout<<"Loaded plugin: "<<(*p)->getName()<<'\n'; (*p)->getFuncs().load(&link); } + CreateServiceFunction("GetPluginInfoList", GetPluginInfoList); for(;;) Sleep(1000); return 0; @@ -92,6 +94,10 @@ const plugin::exported_funcs_s plugin::getFuncs() { return funcs; } +const PLUGININFO plugin::getPluginInfo() +{ + return pluginInfo; +} plugin::plugin(const HMODULE hMod, const exported_funcs_s fnct, const char *name) { hModule = hMod; @@ -141,4 +147,10 @@ int ServiceExists(const char *name) return 1; return 0; } +int GetPluginInfoList(WPARAM, LPARAM) +{ + list<PLUGININFO> *pluginInfoList = new list<PLUGININFO>; + for(list<plugin*>::iterator p = plugins.begin(); p != plugins.end(); p++) + pluginInfoList->push_back((*p)->getPluginInfo()); +} diff --git a/core/plugin.h b/core/plugin.h index 893b445..01e59c9 100644 --- a/core/plugin.h +++ b/core/plugin.h @@ -17,6 +17,7 @@ public: }; const HMODULE getHmodule(); const exported_funcs_s getFuncs(); + const PLUGININFO getPluginInfo(); int setHandle(const HMODULE &hMod); int setName(const char *name); const char *getName(); @@ -26,5 +27,6 @@ private: HMODULE hModule; char *szPluginName; exported_funcs_s funcs; + PLUGININFO pluginInfo; }; #endif |