diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-05-03 18:02:18 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-05-03 18:02:18 +0200 |
commit | d0d9f823b79c5649dad18cb1d8d7744796ae0907 (patch) | |
tree | 52c7fe67ad47f6395a2974cdeda22736904f2c0c /runtime/modules.h | |
parent | 3ad873e17adf89de8437aa5638b412e9fc730acf (diff) | |
download | rsyslog-d0d9f823b79c5649dad18cb1d8d7744796ae0907.tar.gz rsyslog-d0d9f823b79c5649dad18cb1d8d7744796ae0907.tar.xz rsyslog-d0d9f823b79c5649dad18cb1d8d7744796ae0907.zip |
step: put plumbing in place for new input module config system
Diffstat (limited to 'runtime/modules.h')
-rw-r--r-- | runtime/modules.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/runtime/modules.h b/runtime/modules.h index 37a73ecd..759e3350 100644 --- a/runtime/modules.h +++ b/runtime/modules.h @@ -110,19 +110,19 @@ struct modInfo_s { rsRetVal (*modExit)(void); /* called before termination or module unload */ rsRetVal (*modGetID)(void **); /* get its unique ID from module */ rsRetVal (*doHUP)(void *); /* non-restart type HUP handler */ - /* below: parse a configuration line - return if processed - * or not. If not, must be parsed to next module. - */ - rsRetVal (*parseConfigLine)(uchar **pConfLine); /* below: create an instance of this module. Most importantly the module * can allocate instance memory in this call. */ rsRetVal (*createInstance)(); - /* TODO: pass pointer to msg submit function to IM rger, 2007-12-14 */ union { struct {/* data for input modules */ + rsRetVal (*beginCnfLoad)(void*newCnf); + rsRetVal (*endCnfLoad)(void*Cnf); + rsRetVal (*checkCnf)(void*Cnf); + rsRetVal (*activateCnf)(void*Cnf); /* make provided config the running conf */ + rsRetVal (*freeCnf)(void*Cnf); +/* TODO: remove? */rsRetVal (*willRun)(void); /* check if the current config will be able to run*/ rsRetVal (*runInput)(thrdInfo_t*); /* function to gather input and submit to queue */ - rsRetVal (*willRun)(void); /* function to gather input and submit to queue */ rsRetVal (*afterRun)(thrdInfo_t*); /* function to gather input and submit to queue */ int bCanRun; /* cached value of whether willRun() succeeded */ } im; @@ -159,7 +159,7 @@ struct modInfo_s { /* interfaces */ BEGINinterface(module) /* name must also be changed in ENDinterface macro! */ modInfo_t *(*GetNxt)(modInfo_t *pThis); - modInfo_t *(*GetNxtCnfType)(rsconf_t *cnf, modInfo_t *pThis, eModType_t rqtdType); + cfgmodules_etry_t *(*GetNxtCnfType)(rsconf_t *cnf, cfgmodules_etry_t *pThis, eModType_t rqtdType); uchar *(*GetName)(modInfo_t *pThis); uchar *(*GetStateName)(modInfo_t *pThis); rsRetVal (*Use)(char *srcFile, modInfo_t *pThis); /**< must be called before a module is used (ref counting) */ @@ -180,4 +180,6 @@ ENDinterface(module) /* prototypes */ PROTOTYPEObj(module); +/* TODO: remove "dirty" calls! */ +rsRetVal addModToCnfList(modInfo_t *pThis); #endif /* #ifndef MODULES_H_INCLUDED */ |