diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-21 13:27:51 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-21 13:27:51 +0000 |
commit | 04622f7d2210cbb8036502afadf5bcdcb0394d28 (patch) | |
tree | 1ba5f0321aaf86f6050193dd8283d85a7f4acd39 /var.h | |
parent | 1cc790fae01e4392d4cf96820f6402528f611c44 (diff) | |
download | rsyslog-04622f7d2210cbb8036502afadf5bcdcb0394d28.tar.gz rsyslog-04622f7d2210cbb8036502afadf5bcdcb0394d28.tar.xz rsyslog-04622f7d2210cbb8036502afadf5bcdcb0394d28.zip |
first steps in implementing object interfaces (stage work for later dynamic
class loading)
Diffstat (limited to 'var.h')
-rw-r--r-- | var.h | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -51,12 +51,20 @@ typedef struct var_s { } var_t; +/* interfaces */ +typedef struct var_if_s { + ifBEGIN; /* This MUST always be the first interface member */ + INTERFACEObjDebugPrint(var); + rsRetVal (*Construct)(var_t **ppThis); + rsRetVal (*ConstructFinalize)(var_t __attribute__((unused)) *pThis); + rsRetVal (*Destruct)(var_t **ppThis); + rsRetVal (*SetString)(var_t *pThis, cstr_t *pCStr); +} var_if_t; +#define varCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */ + + /* prototypes */ -rsRetVal varConstruct(var_t **ppThis); -rsRetVal varConstructFinalize(var_t __attribute__((unused)) *pThis); -rsRetVal varDestruct(var_t **ppThis); -rsRetVal varSetString(var_t *pThis, cstr_t *pCStr); PROTOTYPEObjClassInit(var); -PROTOTYPEObjDebugPrint(var); +PROTOTYPEObjQueryInterface(var); #endif /* #ifndef INCLUDED_VAR_H */ |