diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-01 14:34:56 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-01 14:34:56 +0200 |
commit | 6322343eca1084b509386a94c1bcf2ca819f1220 (patch) | |
tree | cd873a34a4df087c3411de951c40a26f64f7d0ec /runtime/prop.h | |
parent | e6aeb1b995d6629ff04fd0f6068be2e9ffe9ca42 (diff) | |
parent | 7bfa03bdc0b73647ffdbe4b73e5c1649af665fbf (diff) | |
download | rsyslog-6322343eca1084b509386a94c1bcf2ca819f1220.tar.gz rsyslog-6322343eca1084b509386a94c1bcf2ca819f1220.tar.xz rsyslog-6322343eca1084b509386a94c1bcf2ca819f1220.zip |
Merge branch 'master' into v5-devel
Diffstat (limited to 'runtime/prop.h')
-rw-r--r-- | runtime/prop.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/runtime/prop.h b/runtime/prop.h index 7fc466b5..e3519664 100644 --- a/runtime/prop.h +++ b/runtime/prop.h @@ -28,14 +28,26 @@ /* the prop object */ struct prop_s { BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */ + int iRefCount; /* reference counter */ + union { + uchar *psz; /* stored string */ + uchar sz[CONF_PROP_BUFSIZE]; + } szVal; + int len; /* we use int intentionally, otherwise we may get some troubles... */ }; /* interfaces */ BEGINinterface(prop) /* name must also be changed in ENDinterface macro! */ INTERFACEObjDebugPrint(prop); rsRetVal (*Construct)(prop_t **ppThis); - rsRetVal (*ConstructFinalize)(prop_t __attribute__((unused)) *pThis); + rsRetVal (*ConstructFinalize)(prop_t *pThis); rsRetVal (*Destruct)(prop_t **ppThis); + rsRetVal (*SetString)(prop_t *pThis, uchar* psz, int len); + rsRetVal (*GetString)(prop_t *pThis, uchar** ppsz, int *plen); + int (*GetStringLen)(prop_t *pThis); + rsRetVal (*AddRef)(prop_t *pThis); + rsRetVal (*CreateStringProp)(prop_t **ppThis, uchar* psz, int len); + rsRetVal (*CreateOrReuseStringProp)(prop_t **ppThis, uchar *psz, int len); ENDinterface(prop) #define propCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */ |