28 #ifndef GWENHYWFAR_MSGENGINE_H
29 #define GWENHYWFAR_MSGENGINE_H
67 const char *description,
115 #define GWEN_MSGENGINE_SHOW_FLAGS_NOSET 0x0001
116 #define GWEN_MSGENGINE_MAX_VALUE_LEN 8192
121 #define GWEN_MSGENGINE_READ_FLAGS_TRUSTINFO 0x0001
122 #define GWEN_MSGENGINE_READ_FLAGS_DEFAULT 0
148 const
char *delimiters);
179 const
char *defValue);
401 const
char *defValue);
463 unsigned char escapeChar,
464 unsigned char delimiter);
545 const
char *description,
struct GWEN_DB_NODE GWEN_DB_NODE
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
#define GWEN_INHERIT_FUNCTION_LIB_DEFS(t, decl)
GWENHYWFAR_API void GWEN_MsgEngine_free(GWEN_MSGENGINE *e)
GWEN_MSGENGINE_TRUSTLEVEL
@ GWEN_MsgEngineTrustLevelHigh
@ GWEN_MsgEngineTrustLevelMedium
@ GWEN_MsgEngineTrustLevelNone
@ GWEN_MsgEngineTrustLevelFull
@ GWEN_MsgEngineTrustLevelLow
GWENHYWFAR_API void GWEN_MsgEngine_SetGetGlobalValuesFunction(GWEN_MSGENGINE *e, GWEN_MSGENGINE_GETGLOBALVALUES_PTR p)
GWENHYWFAR_API int GWEN_MsgEngine_TrustedData_AddPos(GWEN_MSGENGINE_TRUSTEDDATA *td, unsigned int pos)
GWENHYWFAR_API GWEN_MSGENGINE_TYPEWRITE_PTR GWEN_MsgEngine_GetTypeWriteFunction(GWEN_MSGENGINE *e)
GWENHYWFAR_API void GWEN_MsgEngine_SetTypeWriteFunction(GWEN_MSGENGINE *e, GWEN_MSGENGINE_TYPEWRITE_PTR p)
GWENHYWFAR_API void GWEN_MsgEngine_SetDefinitions(GWEN_MSGENGINE *e, GWEN_XMLNODE *n, int take)
GWENHYWFAR_API int GWEN_MsgEngine_CreateMessageFromNode(GWEN_MSGENGINE *e, GWEN_XMLNODE *node, GWEN_BUFFER *gbuf, GWEN_DB_NODE *msgData)
GWENHYWFAR_API GWEN_XMLNODE * GWEN_MsgEngine_ListMessage(GWEN_MSGENGINE *e, const char *typ, const char *msgName, int msgVersion, uint32_t flags)
GWENHYWFAR_API void GWEN_MsgEngine_TrustedData_free(GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API void GWEN_MsgEngine_SetGetIntValueFunction(GWEN_MSGENGINE *e, GWEN_MSGENGINE_GETINTVALUE_PTR p)
GWENHYWFAR_API GWEN_XMLNODE * GWEN_MsgEngine_FindNodeByPropertyStrictProto(GWEN_MSGENGINE *e, const char *t, const char *pname, int version, const char *pvalue)
GWENHYWFAR_API const char * GWEN_MsgEngine_TrustedData_GetDescription(GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API const char * GWEN_MsgEngine_GetMode(GWEN_MSGENGINE *e)
GWENHYWFAR_API void GWEN_MsgEngine_SetTypeCheckFunction(GWEN_MSGENGINE *e, GWEN_MSGENGINE_TYPECHECK_PTR p)
GWENHYWFAR_API void GWEN_MsgEngine_SetCharsToEscape(GWEN_MSGENGINE *e, const char *c)
GWENHYWFAR_API GWEN_MSGENGINE_TRUSTLEVEL GWEN_MsgEngine_TrustedData_GetTrustLevel(GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API GWEN_MSGENGINE_BINTYPEWRITE_PTR GWEN_MsgEngine_GetBinTypeWriteFunction(GWEN_MSGENGINE *e)
GWENHYWFAR_API GWEN_MSGENGINE_BINTYPEREAD_PTR GWEN_MsgEngine_GetBinTypeReadFunction(GWEN_MSGENGINE *e)
GWENHYWFAR_API GWEN_XMLNODE * GWEN_MsgEngine_FindNodeByProperty(GWEN_MSGENGINE *e, const char *t, const char *pname, int version, const char *pvalue)
GWENHYWFAR_API int GWEN_MsgEngine_SkipSegment(GWEN_MSGENGINE *e, GWEN_BUFFER *msgbuf, unsigned char escapeChar, unsigned char delimiter)
GWENHYWFAR_API void * GWEN_MsgEngine_GetInheritorData(const GWEN_MSGENGINE *e)
int(* GWEN_MSGENGINE_TYPEREAD_PTR)(GWEN_MSGENGINE *e, GWEN_BUFFER *msgbuf, GWEN_XMLNODE *node, GWEN_BUFFER *vbuf, char escapeChar, const char *delimiters)
GWENHYWFAR_API void GWEN_MsgEngine_SetMode(GWEN_MSGENGINE *e, const char *mode)
GWENHYWFAR_API char GWEN_MsgEngine_GetEscapeChar(GWEN_MSGENGINE *e)
GWENHYWFAR_API int GWEN_MsgEngine_TrustedData_CreateReplacements(GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API const char * GWEN_MsgEngine_SearchForProperty(GWEN_XMLNODE *node, GWEN_XMLNODE *refnode, const char *name, int topDown)
GWENHYWFAR_API GWEN_XMLNODE * GWEN_MsgEngine_GetDefinitions(GWEN_MSGENGINE *e)
int(* GWEN_MSGENGINE_BINTYPEREAD_PTR)(GWEN_MSGENGINE *e, GWEN_XMLNODE *node, GWEN_DB_NODE *gr, GWEN_BUFFER *vbuf)
GWENHYWFAR_API void GWEN_MsgEngine_SetBinTypeReadFunction(GWEN_MSGENGINE *e, GWEN_MSGENGINE_BINTYPEREAD_PTR p)
GWEN_DB_NODE_TYPE(* GWEN_MSGENGINE_TYPECHECK_PTR)(GWEN_MSGENGINE *e, const char *tname)
GWENHYWFAR_API const char * GWEN_MsgEngine_GetCharsToEscape(GWEN_MSGENGINE *e)
GWENHYWFAR_API int GWEN_MsgEngine_GetIntValue(GWEN_MSGENGINE *e, const char *path, int defValue)
GWENHYWFAR_API const char * GWEN_MsgEngine_TrustedData_GetData(GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API GWEN_MSGENGINE_TYPEREAD_PTR GWEN_MsgEngine_GetTypeReadFunction(GWEN_MSGENGINE *e)
GWENHYWFAR_API int GWEN_MsgEngine_ReadMessage(GWEN_MSGENGINE *e, const char *gtype, GWEN_BUFFER *mbuf, GWEN_DB_NODE *gr, uint32_t flags)
GWENHYWFAR_API GWEN_MSGENGINE * GWEN_MsgEngine_new(void)
GWENHYWFAR_API void GWEN_MsgEngine_SetInheritorData(GWEN_MSGENGINE *e, void *d)
GWENHYWFAR_API void GWEN_MsgEngine_SetDelimiters(GWEN_MSGENGINE *e, const char *s)
GWENHYWFAR_API int GWEN_MsgEngine_AddTrustInfo(GWEN_MSGENGINE *e, const char *data, unsigned int size, const char *description, GWEN_MSGENGINE_TRUSTLEVEL trustLevel, unsigned int pos)
GWENHYWFAR_API void GWEN_MsgEngine_SetBinTypeWriteFunction(GWEN_MSGENGINE *e, GWEN_MSGENGINE_BINTYPEWRITE_PTR p)
GWENHYWFAR_API int GWEN_MsgEngine_TrustedData_GetFirstPos(GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API int GWEN_MsgEngine_AddDefinitions(GWEN_MSGENGINE *e, GWEN_XMLNODE *node)
GWENHYWFAR_API const char * GWEN_MsgEngine_GetDelimiters(GWEN_MSGENGINE *e)
GWENHYWFAR_API void GWEN_MsgEngine_SetProtocolVersion(GWEN_MSGENGINE *e, unsigned int p)
GWENHYWFAR_API const char * GWEN_MsgEngine_TrustedData_GetReplacement(GWEN_MSGENGINE_TRUSTEDDATA *td)
void(* GWEN_MSGENGINE_FREEDATA_PTR)(GWEN_MSGENGINE *e)
GWENHYWFAR_API unsigned int GWEN_MsgEngine_GetProtocolVersion(GWEN_MSGENGINE *e)
const char *(* GWEN_MSGENGINE_GETCHARVALUE_PTR)(GWEN_MSGENGINE *e, const char *name, const char *defValue)
GWENHYWFAR_API GWEN_XMLNODE * GWEN_MsgEngine_FindGroupByProperty(GWEN_MSGENGINE *e, const char *pname, int version, const char *pvalue)
GWENHYWFAR_API int GWEN_MsgEngine_SetValue(GWEN_MSGENGINE *e, const char *path, const char *value)
GWENHYWFAR_API void GWEN_MsgEngine_SetFreeDataFunction(GWEN_MSGENGINE *e, GWEN_MSGENGINE_FREEDATA_PTR p)
GWENHYWFAR_API GWEN_MSGENGINE_TRUSTEDDATA * GWEN_MsgEngine_TrustedData_GetNext(GWEN_MSGENGINE_TRUSTEDDATA *td)
struct GWEN__MSGENGINE GWEN_MSGENGINE
int(* GWEN_MSGENGINE_BINTYPEWRITE_PTR)(GWEN_MSGENGINE *e, GWEN_XMLNODE *node, GWEN_DB_NODE *gr, GWEN_BUFFER *dbuf)
GWENHYWFAR_API GWEN_MSGENGINE_GETGLOBALVALUES_PTR GWEN_MsgEngine_GetGetGlobalValuesFunction(GWEN_MSGENGINE *e)
GWENHYWFAR_API int GWEN_MsgEngine_SetIntValue(GWEN_MSGENGINE *e, const char *path, int value)
GWENHYWFAR_API int GWEN_MsgEngine_ParseMessage(GWEN_MSGENGINE *e, GWEN_XMLNODE *group, GWEN_BUFFER *msgbuf, GWEN_DB_NODE *gr, uint32_t flags)
GWENHYWFAR_API int GWEN_MsgEngine_ShowMessage(GWEN_MSGENGINE *e, const char *typ, const char *msgName, int msgVersion, uint32_t flags)
GWENHYWFAR_API void GWEN_MsgEngine_SetGetCharValueFunction(GWEN_MSGENGINE *e, GWEN_MSGENGINE_GETCHARVALUE_PTR p)
GWENHYWFAR_API GWEN_MSGENGINE_TRUSTEDDATA * GWEN_MsgEngine_TakeTrustInfo(GWEN_MSGENGINE *e)
int(* GWEN_MSGENGINE_GETINTVALUE_PTR)(GWEN_MSGENGINE *e, const char *name, int defValue)
struct GWEN_MSGENGINE_TRUSTEDDATA GWEN_MSGENGINE_TRUSTEDDATA
GWENHYWFAR_API void GWEN_MsgEngine_Attach(GWEN_MSGENGINE *e)
GWEN_DB_NODE *(* GWEN_MSGENGINE_GETGLOBALVALUES_PTR)(GWEN_MSGENGINE *e)
GWENHYWFAR_API GWEN_MSGENGINE_TYPECHECK_PTR GWEN_MsgEngine_GetTypeCheckFunction(GWEN_MSGENGINE *e)
GWENHYWFAR_API void GWEN_MsgEngine_SetEscapeChar(GWEN_MSGENGINE *e, char c)
GWENHYWFAR_API unsigned int GWEN_MsgEngine_TrustedData_GetSize(GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API int GWEN_MsgEngine_CreateMessage(GWEN_MSGENGINE *e, const char *msgName, int msgVersion, GWEN_BUFFER *gbuf, GWEN_DB_NODE *msgData)
GWENHYWFAR_API int GWEN_MsgEngine_TrustedData_GetNextPos(GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API GWEN_MSGENGINE_TRUSTEDDATA * GWEN_MsgEngine_TrustedData_new(const char *data, unsigned int size, const char *description, GWEN_MSGENGINE_TRUSTLEVEL trustLevel)
int(* GWEN_MSGENGINE_TYPEWRITE_PTR)(GWEN_MSGENGINE *e, GWEN_BUFFER *gbuf, GWEN_BUFFER *data, GWEN_XMLNODE *node)
GWENHYWFAR_API const char * GWEN_MsgEngine_GetValue(GWEN_MSGENGINE *e, const char *path, const char *defValue)
GWENHYWFAR_API void GWEN_MsgEngine_SetTypeReadFunction(GWEN_MSGENGINE *e, GWEN_MSGENGINE_TYPEREAD_PTR p)
struct GWEN__XMLNODE GWEN_XMLNODE