blob: 13de647271303846282cdd2c0a1027281286d9ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#include "commonheaders.h"
std::list<plugin*> plugins;
boost::mutex plugin_list_mutex;
std::list<service*> services;
boost::mutex service_list_mutex;
void CreateServiceFunction(const char* name, SERVICE svc);
void* CallService(const char *,void*);
int ServiceExists(const char *);
ACE_Log_Msg logger;
PLUGINLINK pluglink = {&CreateServiceFunction, &CallService, &ServiceExists};
#ifdef _WIN32
HINSTANCE hInst;
int __stdcall WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd )
#else
int ACE_MAIN(int argc, char *argv[])
#endif
{
#ifdef _WIN32
hInst = hInstance;
#endif
void load_modules();
void run_plugins();
logger.log(LM_DEBUG, "Loading plugins...\n");
load_modules();
logger.log(LM_DEBUG, "Running plugins...\n");
run_plugins();
while(true)
{
logger.log(LM_DEBUG, "Main threas sleeping...\n");
boost::this_thread::sleep(boost::posix_time::seconds(10)); //warning from compiller on this string can be safely ignored
}
return 0;
}
|