From b494d54b98e6240a20f494ecaa0bad646c531686 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 29 Feb 2008 17:13:21 +0000 Subject: converted conf.c to an abstract class --- conf.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'conf.h') diff --git a/conf.h b/conf.h index 6a49ff71..584e29dc 100644 --- a/conf.h +++ b/conf.h @@ -29,7 +29,21 @@ */ enum eDirective { DIR_TEMPLATE = 0, DIR_OUTCHANNEL = 1, DIR_ALLOWEDSENDER = 2}; -/* propotypes */ +/* interfaces */ +BEGINinterface(conf) /* name must also be changed in ENDinterface macro! */ + rsRetVal (*doNameLine)(uchar **pp, void* pVal); + rsRetVal (*cfsysline)(uchar *p); + rsRetVal (*doModLoad)(uchar **pp, __attribute__((unused)) void* pVal); + rsRetVal (*doIncludeLine)(uchar **pp, __attribute__((unused)) void* pVal); + rsRetVal (*cfline)(uchar *line, selector_t **pfCurr); + rsRetVal (*processConfFile)(uchar *pConfFile); + //rsRetVal (*confClassInit)(void); /* TODO: make this a real object! */ +ENDinterface(conf) +#define confCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */ + + +/* prototypes */ +#if 0 rsRetVal doNameLine(uchar **pp, void* pVal); rsRetVal cfsysline(uchar *p); rsRetVal doModLoad(uchar **pp, __attribute__((unused)) void* pVal); @@ -37,6 +51,9 @@ rsRetVal doIncludeLine(uchar **pp, __attribute__((unused)) void* pVal); rsRetVal cfline(uchar *line, selector_t **pfCurr); rsRetVal processConfFile(uchar *pConfFile); rsRetVal confClassInit(void); /* TODO: make this a real object! */ +#endif +PROTOTYPEObj(conf); + /* TODO: remove them below (means move the config init code) -- rgerhards, 2008-02-19 */ extern uchar *pModDir; /* read-only after startup */ -- cgit