summaryrefslogtreecommitdiffstats
path: root/obj.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-29 16:02:07 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-29 16:02:07 +0000
commita7eb97b930bbbd3133f336a6f2ccbfb55eebbcfb (patch)
tree54449d06aa387064b172423232c0ceb62dc09f90 /obj.h
parent20e9b14e39347608d03b41c93349ebe7017b9db9 (diff)
downloadrsyslog-a7eb97b930bbbd3133f336a6f2ccbfb55eebbcfb.tar.gz
rsyslog-a7eb97b930bbbd3133f336a6f2ccbfb55eebbcfb.tar.xz
rsyslog-a7eb97b930bbbd3133f336a6f2ccbfb55eebbcfb.zip
- added "debug" command to debug environment settings
- changed the object/interface system to use a new way of calling, giving up the numerical object ID. This was necessary as we needed more extensibility for third-party modules (which don't play at all with the previous fixed object ID). This is stage work for the object loader. Please note that I needed to change the object (de)serializer, I can't outrule that I have introduced bugs there.
Diffstat (limited to 'obj.h')
-rw-r--r--obj.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/obj.h b/obj.h
index cf5aed6a..4cce9d02 100644
--- a/obj.h
+++ b/obj.h
@@ -71,8 +71,7 @@
DEFobjCurrIf(obj)
-#define objGetClassName(pThis) (((obj_t*) (pThis))->pObjInfo->pszName)
-#define objGetObjID(pThis) (((obj_t*) (pThis))->pObjInfo->objID)
+#define objGetClassName(pThis) (((obj_t*) (pThis))->pObjInfo->pszID)
#define objGetVersion(pThis) (((obj_t*) (pThis))->pObjInfo->iObjVers)
/* the next macro MUST be called in Constructors: */
#ifndef NDEBUG /* this means if debug... */
@@ -94,16 +93,17 @@
/* interfaces */
BEGINinterface(obj) /* name must also be changed in ENDinterface macro! */
rsRetVal (*UseObj)(uchar *pObjName, uchar *pObjFile, interface_t **ppIf);
- rsRetVal (*InfoConstruct)(objInfo_t **ppThis, objID_t objID, uchar *pszName, int iObjVers,
- rsRetVal (*pConstruct)(void *), rsRetVal (*pDestruct)(void *));
+ rsRetVal (*InfoConstruct)(objInfo_t **ppThis, uchar *pszID, int iObjVers,
+ rsRetVal (*pConstruct)(void *), rsRetVal (*pDestruct)(void *),
+ rsRetVal (*pQueryIF)(interface_t*));
rsRetVal (*DestructObjSelf)(obj_t *pThis);
rsRetVal (*BeginSerializePropBag)(strm_t *pStrm, obj_t *pObj);
rsRetVal (*InfoSetMethod)(objInfo_t *pThis, objMethod_t objMethod, rsRetVal (*pHandler)(void*));
rsRetVal (*BeginSerialize)(strm_t *pStrm, obj_t *pObj);
rsRetVal (*SerializeProp)(strm_t *pStrm, uchar *pszPropName, propType_t propType, void *pUsr);
rsRetVal (*EndSerialize)(strm_t *pStrm);
- rsRetVal (*RegisterObj)(objID_t oID, objInfo_t *pInfo);
- rsRetVal (*Deserialize)(void *ppObj, objID_t objTypeExpected, strm_t *pStrm, rsRetVal (*fFixup)(obj_t*,void*), void *pUsr);
+ rsRetVal (*RegisterObj)(uchar *pszObjName, objInfo_t *pInfo);
+ rsRetVal (*Deserialize)(void *ppObj, uchar *pszTypeExpected, strm_t *pStrm, rsRetVal (*fFixup)(obj_t*,void*), void *pUsr);
rsRetVal (*DeserializePropBag)(obj_t *pObj, strm_t *pStrm);
rsRetVal (*SetName)(obj_t *pThis, uchar *pszName);
uchar * (*GetName)(obj_t *pThis);