diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-21 14:31:56 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-21 14:31:56 +0000 |
commit | 45136c665690534d934d0c0c188dbb18a0131b96 (patch) | |
tree | 50e774280a622de5dfc8b98707f0be6324aeb974 /var.h | |
parent | 04622f7d2210cbb8036502afadf5bcdcb0394d28 (diff) | |
download | rsyslog-45136c665690534d934d0c0c188dbb18a0131b96.tar.gz rsyslog-45136c665690534d934d0c0c188dbb18a0131b96.tar.xz rsyslog-45136c665690534d934d0c0c188dbb18a0131b96.zip |
some more interface changes
Diffstat (limited to 'var.h')
-rw-r--r-- | var.h | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -31,8 +31,9 @@ typedef enum { VARTYPE_SHORT = 2, VARTYPE_INT = 3, VARTYPE_LONG = 4, - VARTYPE_CSTR = 5, - VARTYPE_SYSLOGTIME = 6 + VARTYPE_INT64 = 5, + VARTYPE_CSTR = 6, + VARTYPE_SYSLOGTIME = 7 } varType_t; /* the var object */ @@ -44,6 +45,7 @@ typedef struct var_s { short vShort; int vInt; long vLong; + int64 vInt64; cstr_t *vpCStr; /* used for both rsCStr and psz */ syslogTime_t vSyslogTime; @@ -52,19 +54,18 @@ typedef struct var_s { /* interfaces */ -typedef struct var_if_s { - ifBEGIN; /* This MUST always be the first interface member */ +BEGINinterface(var) /* name must also be changed in ENDinterface macro! */ INTERFACEObjDebugPrint(var); rsRetVal (*Construct)(var_t **ppThis); rsRetVal (*ConstructFinalize)(var_t __attribute__((unused)) *pThis); rsRetVal (*Destruct)(var_t **ppThis); + rsRetVal (*SetInt64)(var_t *pThis, int64 iVal); rsRetVal (*SetString)(var_t *pThis, cstr_t *pCStr); -} var_if_t; -#define varCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */ +ENDinterface(var) +#define varCURR_IF_VERSION 1 /* increment whenever you change the interface above! */ /* prototypes */ -PROTOTYPEObjClassInit(var); -PROTOTYPEObjQueryInterface(var); +PROTOTYPEObj(var); #endif /* #ifndef INCLUDED_VAR_H */ |