diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-08-01 07:46:36 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-08-01 07:46:36 +0000 |
commit | 2b51194f651add73f7caf53c074a18fa44059662 (patch) | |
tree | 4160d611d1d37a0fa357bc6525000d2c13e42917 /cfsysline.h | |
parent | 2a712d230a2589cabdd967956ede8c4f6fb59204 (diff) | |
download | rsyslog-2b51194f651add73f7caf53c074a18fa44059662.tar.gz rsyslog-2b51194f651add73f7caf53c074a18fa44059662.tar.xz rsyslog-2b51194f651add73f7caf53c074a18fa44059662.zip |
- some more code cleanup
- enhanced cfsysline interface to disallow chaining of command handlers
Diffstat (limited to 'cfsysline.h')
-rw-r--r-- | cfsysline.h | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/cfsysline.h b/cfsysline.h index 42edc0ec..99217e64 100644 --- a/cfsysline.h +++ b/cfsysline.h @@ -54,28 +54,15 @@ typedef struct cslCmdHdlr_s cslCmdHdlr_t; * The short name is cslc (Configfile SysLine Command) */ struct cslCmd_s { /* config file sysline parse entry */ + int bChainingPermitted; /* may multiple handlers be chained for this command? */ linkedList_t llCmdHdlrs; /* linked list of command handlers */ }; typedef struct cslCmd_s cslCmd_t; /* prototypes */ -rsRetVal cslchDestruct(void *pThis); -rsRetVal cslchConstruct(cslCmdHdlr_t **ppThis); -rsRetVal cslchSetEntry(cslCmdHdlr_t *pThis, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(), void *pData); -rsRetVal cslchCallHdlr(cslCmdHdlr_t *pThis, uchar **ppConfLine); -rsRetVal cslcConstruct(cslCmd_t **ppThis); -rsRetVal regCfSysLineHdlr(uchar *pCmdName, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(), void *pData); -rsRetVal cfsyslineInit(void); +rsRetVal regCfSysLineHdlr(uchar *pCmdName, int bChainingPermitted, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(), void *pData); rsRetVal processCfSysLineCommand(uchar *pCmd, uchar **p); +rsRetVal cfsyslineInit(void); void dbgPrintCfSysLineHandlers(void); -/* the next ones go away later */ -rsRetVal doBinaryOptionLine(uchar **pp, rsRetVal (*pSetHdlr)(void*, int), void *pVal); -rsRetVal doGetUID(uchar **pp, rsRetVal (*pSetHdlr)(void*, uid_t), void *pVal); -rsRetVal doGetGID(uchar **pp, rsRetVal (*pSetHdlr)(void*, uid_t), void *pVal); -rsRetVal doFileCreateMode(uchar **pp, rsRetVal (*pSetHdlr)(void*, uid_t), void *pVal); -rsRetVal doGetChar(uchar **pp, rsRetVal (*pSetHdlr)(void*, uid_t), void *pVal); -rsRetVal doGetInt(uchar **pp, rsRetVal (*pSetHdlr)(void*, uid_t), void *pVal); -rsRetVal doCustomHdlr(uchar **pp, rsRetVal (*pSetHdlr)(uchar**, void*), void *pVal); - #endif /* #ifndef CFSYSLINE_H_INCLUDED */ |