From 6880b295ae72e2537276b519ecb9ed48ea2ade3a Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Mon, 2 Aug 2010 02:05:44 +0300 Subject: modified: main.cpp modified: plugin.h --- core/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'core/main.cpp') 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 *pluginInfoList = new list; + for(list::iterator p = plugins.begin(); p != plugins.end(); p++) + pluginInfoList->push_back((*p)->getPluginInfo()); +} -- cgit v1.2.3