diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-03 12:39:48 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-03 12:39:48 +0100 |
commit | 6f511cecfae3592f271627ebcb41e6a8c4f831e9 (patch) | |
tree | fbc67531528d42ba50c66e1d9129792bad5a3cc5 /runtime/parser.h | |
parent | 7d78b3bdfd357dd921797ce983eb96532c56a7f6 (diff) | |
download | rsyslog-6f511cecfae3592f271627ebcb41e6a8c4f831e9.tar.gz rsyslog-6f511cecfae3592f271627ebcb41e6a8c4f831e9.tar.xz rsyslog-6f511cecfae3592f271627ebcb41e6a8c4f831e9.zip |
more cleanup and working towards a parser module calling interface
I cleaned up a lot of config variable access along the way. This
version compiles and runs, but does not yet offer any enhanced
functionality. pmrfc5424 is just a dummy that is not yet being used.
Diffstat (limited to 'runtime/parser.h')
-rw-r--r-- | runtime/parser.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/runtime/parser.h b/runtime/parser.h index cec9c083..d5d9243d 100644 --- a/runtime/parser.h +++ b/runtime/parser.h @@ -24,7 +24,21 @@ #ifndef INCLUDED_PARSE_H #define INCLUDED_PARSE_H -extern rsRetVal parserClassInit(void); -extern rsRetVal parseMsg(msg_t*); +/* the parser object, a dummy because we have only static methods */ +typedef struct parser_s { + BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */ +} parser_t; + +/* interfaces */ +BEGINinterface(parser) /* name must also be changed in ENDinterface macro! */ + INTERFACEObjDebugPrint(var); + rsRetVal (*ParseMsg)(msg_t *pMsg); +ENDinterface(parser) +#define parserCURR_IF_VERSION 1 /* increment whenever you change the interface above! */ + + +/* prototypes */ +PROTOTYPEObj(parser); + #endif /* #ifndef INCLUDED_PARSE_H */ |