summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-08-02 00:47:12 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-08-02 00:47:12 +0300
commit952247ad9720ca579d2f6eac596896bc2cddfe6b (patch)
tree35d160c153cd277fb56ae8e5a7c954da7600e150 /core
parentf404e3a3a7ecaf77502ee8fc992dbcce3ed0082c (diff)
modified: ../api/pluginapi.h
modified: main.cpp modified: plugin.h modified: ../modules/example/main.cpp
Diffstat (limited to 'core')
-rw-r--r--core/main.cpp19
-rw-r--r--core/plugin.h3
2 files changed, 18 insertions, 4 deletions
diff --git a/core/main.cpp b/core/main.cpp
index 54b446c..bcb0e74 100644
--- a/core/main.cpp
+++ b/core/main.cpp
@@ -6,12 +6,19 @@
#include <pluginapi.h>
#include "plugin.h"
+#include "service.h"
using namespace std;
list<plugin*> plugins;
+list<service*> services;
int LoadModules();
+INT_PTR CallService(const char *name, WPARAM w, LPARAM l);
+HANDLE CreateServiceFunction(const char *name, SERVICE pService);
+int ServiceExists(const char *name);
+
+PLUGINLINK link = {&CreateServiceFunction, &CallService, &ServiceExists};
int main(int argc, char *argv[])
{
@@ -20,7 +27,7 @@ int main(int argc, char *argv[])
for(list<plugin*>::iterator p = plugins.begin(); p != plugins.end(); p++)
{
cout<<"Loaded plugin: "<<(*p)->getName()<<'\n';
- (*p)->getFuncs().load();
+ (*p)->getFuncs().load(&link);
}
for(;;)
Sleep(1000);
@@ -97,4 +104,12 @@ plugin::~plugin()
FreeLibrary(hModule);
free(szPluginName);
}
-
+INT_PTR CallService(const char *name, WPARAM w, LPARAM l)
+{
+}
+HANDLE CreateServiceFunction(const char *name, SERVICE pService)
+{
+}
+int ServiceExists(const char *name)
+{
+}
diff --git a/core/plugin.h b/core/plugin.h
index cf2b33c..893b445 100644
--- a/core/plugin.h
+++ b/core/plugin.h
@@ -5,8 +5,7 @@
typedef PLUGININFO * (__cdecl * SetPluginInfo) ();
-typedef int (__cdecl * Load) ();
-
+typedef int (__cdecl * Load) (PLUGINLINK *link);
class plugin
{