summaryrefslogtreecommitdiffstats
path: root/conf.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-29 17:13:21 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-29 17:13:21 +0000
commitb494d54b98e6240a20f494ecaa0bad646c531686 (patch)
treedc407c4e253a86cff008d042900e723b1aeca09e /conf.h
parent5f8b43e12ae8e42e1cb9eed7692f6f53ea279ff8 (diff)
downloadrsyslog-b494d54b98e6240a20f494ecaa0bad646c531686.tar.gz
rsyslog-b494d54b98e6240a20f494ecaa0bad646c531686.tar.xz
rsyslog-b494d54b98e6240a20f494ecaa0bad646c531686.zip
converted conf.c to an abstract class
Diffstat (limited to 'conf.h')
-rw-r--r--conf.h19
1 files changed, 18 insertions, 1 deletions
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 */