summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
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
{