changed: the way how plugins work

all your plugin functions can have signature either:
void my_function(PluginInfo & info); or
void my_function();
only the main Init should have:
extern "C" void Init(PluginFunction & info);

added: directory 'plugins' for plugins
added: 'stats' plugin
		  


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@624 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-07-27 20:41:56 +00:00
parent e4683b9a05
commit 031ace3fe5
33 changed files with 1268 additions and 399 deletions

View File

@@ -12,7 +12,7 @@ all: $(o)
depend:
makedepend -Y. -f- *.cpp > Makefile.dep
makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep
echo -n "o = " > Makefile.o.dep
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep

View File

@@ -1,8 +1,9 @@
# DO NOT DELETE
main.o: ../core/requestcontroller.h ../content/content.h ../core/item.h
main.o: ../templates/templates.h ../templates/patterncacher.h
main.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
main.o: ../templates/templates.h ../../ezc/src/ezc.h
main.o: ../templates/patterncacher.h ../templates/misc.h
main.o: ../templates/localefilter.h ../core/locale.h
main.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
main.o: ../core/httpsimpleparser.h ../core/log.h ../templates/indexpatterns.h
main.o: ../core/thread.h ../core/ticket.h ../core/db.h ../core/item.h

View File

@@ -38,6 +38,8 @@ Plugin plugin;
void signal_term(int)
{
plugin.Call(WINIX_CLOSE);
req_controller.SaveSessions();
req_controller.DeleteAllPluginsData();
log << log1 << "cmslu stopped" << logend << logsave;
@@ -103,6 +105,7 @@ int main(int argv, char ** argc)
// load plugins before loading sessions - req_controller.LoadSessions()
plugin.LoadPlugins(data.plugin_file);
plugin.Call(WINIX_PLUGIN_INIT);
request.Init();