summaryrefslogtreecommitdiffstats
path: root/obj.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-06 17:12:41 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-06 17:12:41 +0000
commit22ea87ec597245df9216aa6a6b9da2a379ca1a40 (patch)
tree01f82f358e10223a723542e1b0e370935f4577c8 /obj.h
parent8a04b69478118219b0456b1b212e895dceedc36f (diff)
downloadrsyslog-22ea87ec597245df9216aa6a6b9da2a379ca1a40.tar.gz
rsyslog-22ea87ec597245df9216aa6a6b9da2a379ca1a40.tar.xz
rsyslog-22ea87ec597245df9216aa6a6b9da2a379ca1a40.zip
completed serializer for msg (but needs review)
Diffstat (limited to 'obj.h')
-rw-r--r--obj.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/obj.h b/obj.h
index 394d93b1..daa6bdee 100644
--- a/obj.h
+++ b/obj.h
@@ -33,7 +33,9 @@ typedef enum { /* do NOT start at 0 to detect uninitialized types after calloc(
PROPTYPE_PSZ = 1,
PROPTYPE_SHORT = 2,
PROPTYPE_INT = 3,
- PROPTYPE_LONG = 4
+ PROPTYPE_LONG = 4,
+ PROPTYPE_CSTR = 5,
+ PROPTYPE_SYSLOGTIME = 6
} propertyType_t;
/* object Types */
@@ -65,6 +67,10 @@ typedef struct obj { /* the dummy struct that each derived class can be casted t
/* macros */
+#define objSerializeSCALAR(propName, propType) \
+ CHKiRet(objSerializeProp(pCStr, (uchar*) #propName, PROPTYPE_##propType, (void*) &pThis->propName));
+#define objSerializePTR(propName, propType) \
+ CHKiRet(objSerializeProp(pCStr, (uchar*) #propName, PROPTYPE_##propType, (void*) pThis->propName));
#define DEFobjStaticHelpers static objInfo_t *pObjInfoOBJ = NULL;
#define BEGINobjInstance objInfo_t *pObjInfo
#define objGetName(pThis) (((obj_t*) (pThis))->pObjInfo->pszName)