From 7c2183ee323dc062b0dde6bac4cd9c5afa4ab369 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 26 Sep 2012 12:25:10 +0200 Subject: input stmt: add core engine plumbing --- runtime/module-template.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'runtime/module-template.h') diff --git a/runtime/module-template.h b/runtime/module-template.h index 5d32b909..9dd759a5 100644 --- a/runtime/module-template.h +++ b/runtime/module-template.h @@ -353,6 +353,24 @@ finalize_it:\ } +/* newInpInst() + * This is basically the equivalent to newActInst() for creating input + * module (listener) instances. + */ +#define BEGINnewInpInst \ +static rsRetVal newInpInst(struct nvlst *lst)\ +{\ + DEFiRet; + +#define CODESTARTnewInpInst \ + +#define CODE_STD_FINALIZERnewInpInst + +#define ENDnewInpInst \ + RETiRet;\ +} + + /* tryResume() * This entry point is called to check if a module can resume operations. This * happens when a module requested that it be suspended. In suspended state, @@ -521,6 +539,16 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\ CODEqueryEtryPt_STD_CONF2_CNFNAME_QUERIES +/* the following block is to be added for input modules that support the v2 + * config system. The config name is also provided. + */ +#define CODEqueryEtryPt_STD_CONF2_IMOD_QUERIES \ + else if(!strcmp((char*) name, "newInpInst")) {\ + *pEtryPoint = newInpInst;\ + } \ + CODEqueryEtryPt_STD_CONF2_CNFNAME_QUERIES + + /* the following block is to be added for modules that require * pre priv drop activation support. */ -- cgit v1.2.3