msgengine.h File Reference
`#include <gwenhywfar/gwenhywfarapi.h>`
`#include <gwenhywfar/xml.h>`
`#include <gwenhywfar/db.h>`
`#include <gwenhywfar/buffer.h>`

Go to the source code of this file.

## Macros

#define | GWEN_MSGENGINE_MAX_VALUE_LEN 8192
#define | GWEN_MSGENGINE_SHOW_FLAGS_NOSET 0x0001

## Typedefs

typedef struct GWEN_MSGENGINE_TRUSTEDDATA | GWEN_MSGENGINE_TRUSTEDDATA
Virtual Functions
A message engine contains some pointers to functions which allow extending the functionality of a message engine (like virtual functions in C++)
typedef int(* | GWEN_MSGENGINE_BINTYPEREAD_PTR) (GWEN_MSGENGINE *e, GWEN_XMLNODE *node, GWEN_DB_NODE *gr, GWEN_BUFFER *vbuf)
typedef int(* | GWEN_MSGENGINE_BINTYPEWRITE_PTR) (GWEN_MSGENGINE *e, GWEN_XMLNODE *node, GWEN_DB_NODE *gr, GWEN_BUFFER *dbuf)
typedef void(* | GWEN_MSGENGINE_FREEDATA_PTR) (GWEN_MSGENGINE *e)
typedef const char *(* | GWEN_MSGENGINE_GETCHARVALUE_PTR) (GWEN_MSGENGINE *e, const char *name, const char *defValue)
typedef GWEN_DB_NODE *(* | GWEN_MSGENGINE_GETGLOBALVALUES_PTR) (GWEN_MSGENGINE *e)
typedef int(* | GWEN_MSGENGINE_GETINTVALUE_PTR) (GWEN_MSGENGINE *e, const char *name, int defValue)
typedef GWEN_DB_NODE_TYPE(* | GWEN_MSGENGINE_TYPECHECK_PTR) (GWEN_MSGENGINE *e, const char *tname)
typedef int(* | GWEN_MSGENGINE_TYPEREAD_PTR) (GWEN_MSGENGINE *e, GWEN_BUFFER *msgbuf, GWEN_XMLNODE *node, GWEN_BUFFER *vbuf, char escapeChar, const char *delimiters)
typedef int(* | GWEN_MSGENGINE_TYPEWRITE_PTR) (GWEN_MSGENGINE *e, GWEN_BUFFER *gbuf, GWEN_BUFFER *data, GWEN_XMLNODE *node)

## Enumerations

enum | GWEN_MSGENGINE_TRUSTLEVEL { GWEN_MsgEngineTrustLevelNone =0 , GWEN_MsgEngineTrustLevelLow , GWEN_MsgEngineTrustLevelMedium , GWEN_MsgEngineTrustLevelHigh , GWEN_MsgEngineTrustLevelFull }

## Functions

GWENHYWFAR_API int | GWEN_MsgEngine_TrustedData_AddPos (GWEN_MSGENGINE_TRUSTEDDATA *td, unsigned int pos)
GWENHYWFAR_API int | GWEN_MsgEngine_TrustedData_CreateReplacements (GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API void | GWEN_MsgEngine_TrustedData_free (GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API const char * | GWEN_MsgEngine_TrustedData_GetData (GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API const char * | GWEN_MsgEngine_TrustedData_GetDescription (GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API int | GWEN_MsgEngine_TrustedData_GetFirstPos (GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API GWEN_MSGENGINE_TRUSTEDDATA * | GWEN_MsgEngine_TrustedData_GetNext (GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API int | GWEN_MsgEngine_TrustedData_GetNextPos (GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API const char * | GWEN_MsgEngine_TrustedData_GetReplacement (GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API unsigned int | GWEN_MsgEngine_TrustedData_GetSize (GWEN_MSGENGINE_TRUSTEDDATA *td)
GWENHYWFAR_API GWEN_MSGENGINE_TRUSTLEVEL | GWEN_MsgEngine_TrustedData_GetTrustLevel (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)
Constructor And Destructor
GWENHYWFAR_API void | GWEN_MsgEngine_Attach (GWEN_MSGENGINE *e)
GWENHYWFAR_API void | GWEN_MsgEngine_free (GWEN_MSGENGINE *e)
GWENHYWFAR_API GWEN_MSGENGINE * | GWEN_MsgEngine_new (void)
Setters And Getters
GWENHYWFAR_API int | GWEN_MsgEngine_AddDefinitions (GWEN_MSGENGINE *e, GWEN_XMLNODE *node)
GWENHYWFAR_API const char * | GWEN_MsgEngine_GetCharsToEscape (GWEN_MSGENGINE *e)
GWENHYWFAR_API GWEN_XMLNODE * | GWEN_MsgEngine_GetDefinitions (GWEN_MSGENGINE *e)
GWENHYWFAR_API const char * | GWEN_MsgEngine_GetDelimiters (GWEN_MSGENGINE *e)
GWENHYWFAR_API char | GWEN_MsgEngine_GetEscapeChar (GWEN_MSGENGINE *e)
GWENHYWFAR_API const char * | GWEN_MsgEngine_GetMode (GWEN_MSGENGINE *e)
GWENHYWFAR_API unsigned int | GWEN_MsgEngine_GetProtocolVersion (GWEN_MSGENGINE *e)
GWENHYWFAR_API void | GWEN_MsgEngine_SetCharsToEscape (GWEN_MSGENGINE *e, const char *c)
GWENHYWFAR_API void | GWEN_MsgEngine_SetDefinitions (GWEN_MSGENGINE *e, GWEN_XMLNODE *n, int take)
GWENHYWFAR_API void | GWEN_MsgEngine_SetDelimiters (GWEN_MSGENGINE *e, const char *s)
GWENHYWFAR_API void | GWEN_MsgEngine_SetEscapeChar (GWEN_MSGENGINE *e, char c)
GWENHYWFAR_API void | GWEN_MsgEngine_SetMode (GWEN_MSGENGINE *e, const char *mode)
GWENHYWFAR_API void | GWEN_MsgEngine_SetProtocolVersion (GWEN_MSGENGINE *e, unsigned int p)
Setters For Virtual Functions: Extending Data Type Handling
GWENHYWFAR_API GWEN_MSGENGINE_GETGLOBALVALUES_PTR | GWEN_MsgEngine_GetGetGlobalValuesFunction (GWEN_MSGENGINE *e)
GWENHYWFAR_API GWEN_MSGENGINE_TYPECHECK_PTR | GWEN_MsgEngine_GetTypeCheckFunction (GWEN_MSGENGINE *e)
GWENHYWFAR_API GWEN_MSGENGINE_TYPEREAD_PTR | GWEN_MsgEngine_GetTypeReadFunction (GWEN_MSGENGINE *e)
GWENHYWFAR_API GWEN_MSGENGINE_TYPEWRITE_PTR | GWEN_MsgEngine_GetTypeWriteFunction (GWEN_MSGENGINE *e)
GWENHYWFAR_API void | GWEN_MsgEngine_SetGetGlobalValuesFunction (GWEN_MSGENGINE *e, GWEN_MSGENGINE_GETGLOBALVALUES_PTR p)
GWENHYWFAR_API void | GWEN_MsgEngine_SetTypeCheckFunction (GWEN_MSGENGINE *e, GWEN_MSGENGINE_TYPECHECK_PTR p)
GWENHYWFAR_API void | GWEN_MsgEngine_SetTypeReadFunction (GWEN_MSGENGINE *e, GWEN_MSGENGINE_TYPEREAD_PTR p)
GWENHYWFAR_API void | GWEN_MsgEngine_SetTypeWriteFunction (GWEN_MSGENGINE *e, GWEN_MSGENGINE_TYPEWRITE_PTR p)
Setters For Virtual Functions: Extending Binary Data Handling
GWENHYWFAR_API GWEN_MSGENGINE_BINTYPEREAD_PTR | GWEN_MsgEngine_GetBinTypeReadFunction (GWEN_MSGENGINE *e)
GWENHYWFAR_API GWEN_MSGENGINE_BINTYPEWRITE_PTR | GWEN_MsgEngine_GetBinTypeWriteFunction (GWEN_MSGENGINE *e)
GWENHYWFAR_API void | GWEN_MsgEngine_SetBinTypeReadFunction (GWEN_MSGENGINE *e, GWEN_MSGENGINE_BINTYPEREAD_PTR p)
GWENHYWFAR_API void | GWEN_MsgEngine_SetBinTypeWriteFunction (GWEN_MSGENGINE *e, GWEN_MSGENGINE_BINTYPEWRITE_PTR p)
Setters For Virtual Functions: Getting Variables
GWENHYWFAR_API void | GWEN_MsgEngine_SetGetCharValueFunction (GWEN_MSGENGINE *e, GWEN_MSGENGINE_GETCHARVALUE_PTR p)
GWENHYWFAR_API void | GWEN_MsgEngine_SetGetIntValueFunction (GWEN_MSGENGINE *e, GWEN_MSGENGINE_GETINTVALUE_PTR p)
Extending GWEN_MSGENGINE
The functions in this group are strongly deprecated.
GWENHYWFAR_API void * | GWEN_MsgEngine_GetInheritorData (const GWEN_MSGENGINE *e)
GWENHYWFAR_API void | GWEN_MsgEngine_SetFreeDataFunction (GWEN_MSGENGINE *e, GWEN_MSGENGINE_FREEDATA_PTR p)
GWENHYWFAR_API void | GWEN_MsgEngine_SetInheritorData (GWEN_MSGENGINE *e, void *d)
Locating XML Nodes And Properties
GWENHYWFAR_API GWEN_XMLNODE * | GWEN_MsgEngine_FindGroupByProperty (GWEN_MSGENGINE *e, const char *pname, int version, const char *pvalue)
GWENHYWFAR_API GWEN_XMLNODE * | GWEN_MsgEngine_FindNodeByProperty (GWEN_MSGENGINE *e, const char *t, const char *pname, int version, const char *pvalue)
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_SearchForProperty (GWEN_XMLNODE *node, GWEN_XMLNODE *refnode, const char *name, int topDown)
Getters And Setters for Global Variables
GWENHYWFAR_API int | GWEN_MsgEngine_GetIntValue (GWEN_MSGENGINE *e, const char *path, int defValue)
GWENHYWFAR_API const char * | GWEN_MsgEngine_GetValue (GWEN_MSGENGINE *e, const char *path, const char *defValue)
GWENHYWFAR_API int | GWEN_MsgEngine_SetIntValue (GWEN_MSGENGINE *e, const char *path, int value)
GWENHYWFAR_API int | GWEN_MsgEngine_SetValue (GWEN_MSGENGINE *e, const char *path, const char *value)
Parsing, Listing And Creating Messages
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_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 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_ReadMessage (GWEN_MSGENGINE *e, const char *gtype, GWEN_BUFFER *mbuf, 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 int | GWEN_MsgEngine_SkipSegment (GWEN_MSGENGINE *e, GWEN_BUFFER *msgbuf, unsigned char escapeChar, unsigned char delimiter)
Handling Trust Information
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 GWEN_MSGENGINE_TRUSTEDDATA * | GWEN_MsgEngine_TakeTrustInfo (GWEN_MSGENGINE *e)

## Read Flags

typedef struct GWEN__MSGENGINE | GWEN_MSGENGINE
#define | GWEN_MSGENGINE_READ_FLAGS_DEFAULT 0
#define | GWEN_MSGENGINE_READ_FLAGS_TRUSTINFO 0x0001

## Macro Definition Documentation

## GWEN_MSGENGINE_MAX_VALUE_LEN

#define GWEN_MSGENGINE_MAX_VALUE_LEN 8192

Definition at line 116 of file msgengine.h.

## GWEN_MSGENGINE_READ_FLAGS_DEFAULT

#define GWEN_MSGENGINE_READ_FLAGS_DEFAULT 0

Definition at line 122 of file msgengine.h.

## GWEN_MSGENGINE_READ_FLAGS_TRUSTINFO

#define GWEN_MSGENGINE_READ_FLAGS_TRUSTINFO 0x0001

Definition at line 121 of file msgengine.h.

## GWEN_MSGENGINE_SHOW_FLAGS_NOSET

#define GWEN_MSGENGINE_SHOW_FLAGS_NOSET 0x0001

Definition at line 115 of file msgengine.h.

## Typedef Documentation

## GWEN_MSGENGINE

typedef struct GWEN__MSGENGINE GWEN_MSGENGINE

Definition at line 131 of file msgengine.h.

## GWEN_MSGENGINE_BINTYPEREAD_PTR

typedef int(* GWEN_MSGENGINE_BINTYPEREAD_PTR) (GWEN_MSGENGINE *e, GWEN_XMLNODE *node, GWEN_DB_NODE *gr, GWEN_BUFFER *vbuf)

Definition at line 164 of file msgengine.h.

## GWEN_MSGENGINE_BINTYPEWRITE_PTR

typedef int(* GWEN_MSGENGINE_BINTYPEWRITE_PTR) (GWEN_MSGENGINE *e, GWEN_XMLNODE *node, GWEN_DB_NODE *gr, GWEN_BUFFER *dbuf)

Definition at line 169 of file msgengine.h.

## GWEN_MSGENGINE_FREEDATA_PTR

typedef void(* GWEN_MSGENGINE_FREEDATA_PTR) (GWEN_MSGENGINE *e)

Definition at line 187 of file msgengine.h.

## GWEN_MSGENGINE_GETCHARVALUE_PTR

typedef const char *(* GWEN_MSGENGINE_GETCHARVALUE_PTR) (GWEN_MSGENGINE *e, const char *name, const char *defValue)

Get the value of the given name (or default value if none set)

Definition at line 177 of file msgengine.h.

## GWEN_MSGENGINE_GETGLOBALVALUES_PTR

typedef GWEN_DB_NODE *(* GWEN_MSGENGINE_GETGLOBALVALUES_PTR) (GWEN_MSGENGINE *e)

Definition at line 184 of file msgengine.h.

## GWEN_MSGENGINE_GETINTVALUE_PTR

typedef int(* GWEN_MSGENGINE_GETINTVALUE_PTR) (GWEN_MSGENGINE *e, const char *name, int defValue)

Definition at line 180 of file msgengine.h.

## GWEN_MSGENGINE_TRUSTEDDATA

typedef struct GWEN_MSGENGINE_TRUSTEDDATA GWEN_MSGENGINE_TRUSTEDDATA

Definition at line 52 of file msgengine.h.

## GWEN_MSGENGINE_TYPECHECK_PTR

typedef GWEN_DB_NODE_TYPE(* GWEN_MSGENGINE_TYPECHECK_PTR) (GWEN_MSGENGINE *e, const char *tname)

Checks of what base-type the given type is.

Definition at line 161 of file msgengine.h.

## GWEN_MSGENGINE_TYPEREAD_PTR

typedef int(* GWEN_MSGENGINE_TYPEREAD_PTR) (GWEN_MSGENGINE *e, GWEN_BUFFER *msgbuf, GWEN_XMLNODE *node, GWEN_BUFFER *vbuf, char escapeChar, const char *delimiters)

Definition at line 143 of file msgengine.h.

## GWEN_MSGENGINE_TYPEWRITE_PTR

typedef int(* GWEN_MSGENGINE_TYPEWRITE_PTR) (GWEN_MSGENGINE *e, GWEN_BUFFER *gbuf, GWEN_BUFFER *data, GWEN_XMLNODE *node)

Returns
  0 on success, -1 on error, 1 if unknown type

Definition at line 153 of file msgengine.h.

## Enumeration Type Documentation

## GWEN_MSGENGINE_TRUSTLEVEL

enum GWEN_MSGENGINE_TRUSTLEVEL

Enumerator
GWEN_MsgEngineTrustLevelNone |
GWEN_MsgEngineTrustLevelLow |
GWEN_MsgEngineTrustLevelMedium |
GWEN_MsgEngineTrustLevelHigh |
GWEN_MsgEngineTrustLevelFull |

Definition at line 54 of file msgengine.h.

## Function Documentation

## GWEN_MsgEngine_AddDefinitions()

GWENHYWFAR_API int GWEN_MsgEngine_AddDefinitions | ( | GWEN_MSGENGINE * | e,
|  | GWEN_XMLNODE * | node )

References GWEN_MsgEngine_AddDefinitions(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_AddDefinitions().

## GWEN_MsgEngine_AddTrustInfo()

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 )

References GWEN_MsgEngine_AddTrustInfo().

Referenced by GWEN_MsgEngine_AddTrustInfo().

## GWEN_MsgEngine_Attach()

GWENHYWFAR_API void GWEN_MsgEngine_Attach | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_Attach(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_Attach().

## GWEN_MsgEngine_CreateMessage()

GWENHYWFAR_API int GWEN_MsgEngine_CreateMessage | ( | GWEN_MSGENGINE * | e,
|  | const char * | msgName,
|  | int | msgVersion,
|  | GWEN_BUFFER * | gbuf,
|  | GWEN_DB_NODE * | msgData )

References GWEN_MsgEngine_CreateMessage(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_CreateMessage().

## GWEN_MsgEngine_CreateMessageFromNode()

GWENHYWFAR_API int GWEN_MsgEngine_CreateMessageFromNode | ( | GWEN_MSGENGINE * | e,
|  | GWEN_XMLNODE * | node,
|  | GWEN_BUFFER * | gbuf,
|  | GWEN_DB_NODE * | msgData )

References GWEN_MsgEngine_CreateMessageFromNode(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_CreateMessageFromNode().

## GWEN_MsgEngine_FindGroupByProperty()

GWENHYWFAR_API GWEN_XMLNODE * GWEN_MsgEngine_FindGroupByProperty | ( | GWEN_MSGENGINE * | e,
|  | const char * | pname,
|  | int | version,
|  | const char * | pvalue )

References GWEN_MsgEngine_FindGroupByProperty(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_FindGroupByProperty().

## GWEN_MsgEngine_FindNodeByProperty()

GWENHYWFAR_API GWEN_XMLNODE * GWEN_MsgEngine_FindNodeByProperty | ( | GWEN_MSGENGINE * | e,
|  | const char * | t,
|  | const char * | pname,
|  | int | version,
|  | const char * | pvalue )

Looks for a node of the given type. Example: If type is "GROUP" then the node will be searched in "<GROUPS>", and the tag name will be "<GROUPdef>".

References GWEN_MsgEngine_FindNodeByProperty(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_FindNodeByProperty().

## GWEN_MsgEngine_FindNodeByPropertyStrictProto()

GWENHYWFAR_API GWEN_XMLNODE * GWEN_MsgEngine_FindNodeByPropertyStrictProto | ( | GWEN_MSGENGINE * | e,
|  | const char * | t,
|  | const char * | pname,
|  | int | version,
|  | const char * | pvalue )

References GWEN_MsgEngine_FindNodeByPropertyStrictProto(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_FindNodeByPropertyStrictProto().

## GWEN_MsgEngine_free()

GWENHYWFAR_API void GWEN_MsgEngine_free | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_free(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_free().

## GWEN_MsgEngine_GetBinTypeReadFunction()

GWENHYWFAR_API GWEN_MSGENGINE_BINTYPEREAD_PTR GWEN_MsgEngine_GetBinTypeReadFunction | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_GetBinTypeReadFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetBinTypeReadFunction().

## GWEN_MsgEngine_GetBinTypeWriteFunction()

GWENHYWFAR_API GWEN_MSGENGINE_BINTYPEWRITE_PTR GWEN_MsgEngine_GetBinTypeWriteFunction | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_GetBinTypeWriteFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetBinTypeWriteFunction().

## GWEN_MsgEngine_GetCharsToEscape()

GWENHYWFAR_API const char * GWEN_MsgEngine_GetCharsToEscape | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_GetCharsToEscape(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetCharsToEscape().

## GWEN_MsgEngine_GetDefinitions()

GWENHYWFAR_API GWEN_XMLNODE * GWEN_MsgEngine_GetDefinitions | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_GetDefinitions(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetDefinitions().

## GWEN_MsgEngine_GetDelimiters()

GWENHYWFAR_API const char * GWEN_MsgEngine_GetDelimiters | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_GetDelimiters(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetDelimiters().

## GWEN_MsgEngine_GetEscapeChar()

GWENHYWFAR_API char GWEN_MsgEngine_GetEscapeChar | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_GetEscapeChar(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetEscapeChar().

## GWEN_MsgEngine_GetGetGlobalValuesFunction()

GWENHYWFAR_API GWEN_MSGENGINE_GETGLOBALVALUES_PTR GWEN_MsgEngine_GetGetGlobalValuesFunction | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_GetGetGlobalValuesFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetGetGlobalValuesFunction().

## GWEN_MsgEngine_GetInheritorData()

GWENHYWFAR_API void * GWEN_MsgEngine_GetInheritorData | ( | const GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_GetInheritorData(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetInheritorData().

## GWEN_MsgEngine_GetIntValue()

GWENHYWFAR_API int GWEN_MsgEngine_GetIntValue | ( | GWEN_MSGENGINE * | e,
|  | const char * | path,
|  | int | defValue )

References GWEN_MsgEngine_GetIntValue(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetIntValue().

## GWEN_MsgEngine_GetMode()

GWENHYWFAR_API const char * GWEN_MsgEngine_GetMode | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_GetMode(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetMode().

## GWEN_MsgEngine_GetProtocolVersion()

GWENHYWFAR_API unsigned int GWEN_MsgEngine_GetProtocolVersion | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_GetProtocolVersion(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetProtocolVersion().

## GWEN_MsgEngine_GetTypeCheckFunction()

GWENHYWFAR_API GWEN_MSGENGINE_TYPECHECK_PTR GWEN_MsgEngine_GetTypeCheckFunction | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_GetTypeCheckFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetTypeCheckFunction().

## GWEN_MsgEngine_GetTypeReadFunction()

GWENHYWFAR_API GWEN_MSGENGINE_TYPEREAD_PTR GWEN_MsgEngine_GetTypeReadFunction | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_GetTypeReadFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetTypeReadFunction().

## GWEN_MsgEngine_GetTypeWriteFunction()

GWENHYWFAR_API GWEN_MSGENGINE_TYPEWRITE_PTR GWEN_MsgEngine_GetTypeWriteFunction | ( | GWEN_MSGENGINE * | e | ) |

References GWEN_MsgEngine_GetTypeWriteFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetTypeWriteFunction().

## GWEN_MsgEngine_GetValue()

GWENHYWFAR_API const char * GWEN_MsgEngine_GetValue | ( | GWEN_MSGENGINE * | e,
|  | const char * | path,
|  | const char * | defValue )

References GWEN_MsgEngine_GetValue(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_GetValue().

## GWEN_MsgEngine_ListMessage()

GWENHYWFAR_API GWEN_XMLNODE * GWEN_MsgEngine_ListMessage | ( | GWEN_MSGENGINE * | e,
|  | const char * | typ,
|  | const char * | msgName,
|  | int | msgVersion,
|  | uint32_t | flags )

This function creates a full tree of all groups and elements used by the given message. The caller is responsible for freeing the data returned.

References GWEN_MsgEngine_ListMessage(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_ListMessage().

## GWEN_MsgEngine_new()

GWENHYWFAR_API GWEN_MSGENGINE * GWEN_MsgEngine_new | ( | void |  | ) |

References GWEN_MsgEngine_new(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_new().

## GWEN_MsgEngine_ParseMessage()

GWENHYWFAR_API int GWEN_MsgEngine_ParseMessage | ( | GWEN_MSGENGINE * | e,
|  | GWEN_XMLNODE * | group,
|  | GWEN_BUFFER * | msgbuf,
|  | GWEN_DB_NODE * | gr,
|  | uint32_t | flags )

This function parses a single entity specified by a single XML node (which may of course consist of multiple XML nodes). This function makes no assumptions about the format of used variables whatsoever. All data parsed from the given message is stored within the given database.

References GWEN_MsgEngine_ParseMessage(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_ParseMessage().

## GWEN_MsgEngine_ReadMessage()

GWENHYWFAR_API int GWEN_MsgEngine_ReadMessage | ( | GWEN_MSGENGINE * | e,
|  | const char * | gtype,
|  | GWEN_BUFFER * | mbuf,
|  | GWEN_DB_NODE * | gr,
|  | uint32_t | flags )

This function reads all segments found within the given buffer. This is used to read a full message containing multiple segments. It assumes that each segment starts with a group with the id of "SegHead" which defines the variable "code" to determine each segment type. Please note that this function makes no further assumptions about the format of a segment, group or element of a message. This is totally based on the settings specified in the XML file. Unknown segments are simply skipped. For each segment found inside the message a group is created within the given database. The name of that group is derived from the property "id" within the XML description of each segment (or "code" if "id" does not exist). One special group is created below every segment group: "segment". This group contains some variables:

- pos holding the start position of the segment inside the buffer
- length holding the length of the area occupied by the segment

The data of every segment is simply added to the database, so there may be multiple groups with the same name if a given segment type occurs more often than once.

Returns
  0 if ok, -1 on error and 1 if no segment was available

Parameters

  e | message engine
  gtype | typename for segments (most callers use "SEG")
  mbuf | GWEN_BUFFER containing the message. Parsing is started at the current position within the buffer, so please make sure that this pos is set to the beginning of the message before calling this function.
  gr | database to store information parsed from the given message
  flags | see GWEN_MSGENGINE_READ_FLAGS_TRUSTINFO and GWEN_MSGENGINE_READ_FLAGS_DEFAULT

References GWEN_MsgEngine_ReadMessage(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_ReadMessage().

## GWEN_MsgEngine_SearchForProperty()

GWENHYWFAR_API const char * GWEN_MsgEngine_SearchForProperty | ( | GWEN_XMLNODE * | node,
|  | GWEN_XMLNODE * | refnode,
|  | const char * | name,
|  | int | topDown )

Searches for a property in "node" and in "refnode" and all its parents. If topdown is 0 then the nearest value is used, otherwise the farest one is used.

References GWEN_MsgEngine_SearchForProperty(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SearchForProperty().

## GWEN_MsgEngine_SetBinTypeReadFunction()

GWENHYWFAR_API void GWEN_MsgEngine_SetBinTypeReadFunction | ( | GWEN_MSGENGINE * | e,
|  | GWEN_MSGENGINE_BINTYPEREAD_PTR | p )

References GWEN_MsgEngine_SetBinTypeReadFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetBinTypeReadFunction().

## GWEN_MsgEngine_SetBinTypeWriteFunction()

GWENHYWFAR_API void GWEN_MsgEngine_SetBinTypeWriteFunction | ( | GWEN_MSGENGINE * | e,
|  | GWEN_MSGENGINE_BINTYPEWRITE_PTR | p )

References GWEN_MsgEngine_SetBinTypeWriteFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetBinTypeWriteFunction().

## GWEN_MsgEngine_SetCharsToEscape()

GWENHYWFAR_API void GWEN_MsgEngine_SetCharsToEscape | ( | GWEN_MSGENGINE * | e,
|  | const char * | c )

References GWEN_MsgEngine_SetCharsToEscape(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetCharsToEscape().

## GWEN_MsgEngine_SetDefinitions()

GWENHYWFAR_API void GWEN_MsgEngine_SetDefinitions | ( | GWEN_MSGENGINE * | e,
|  | GWEN_XMLNODE * | n,
|  | int | take )

Parameters

  e | message engine for which the definition is to be added
  n | xml node to add
  take | if !=0 then the message engine will take over ownership of the XML node.

References GWEN_MsgEngine_SetDefinitions(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetDefinitions().

## GWEN_MsgEngine_SetDelimiters()

GWENHYWFAR_API void GWEN_MsgEngine_SetDelimiters | ( | GWEN_MSGENGINE * | e,
|  | const char * | s )

References GWEN_MsgEngine_SetDelimiters(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetDelimiters().

## GWEN_MsgEngine_SetEscapeChar()

GWENHYWFAR_API void GWEN_MsgEngine_SetEscapeChar | ( | GWEN_MSGENGINE * | e,
|  | char | c )

References GWEN_MsgEngine_SetEscapeChar(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetEscapeChar().

## GWEN_MsgEngine_SetFreeDataFunction()

GWENHYWFAR_API void GWEN_MsgEngine_SetFreeDataFunction | ( | GWEN_MSGENGINE * | e,
|  | GWEN_MSGENGINE_FREEDATA_PTR | p )

References GWEN_MsgEngine_SetFreeDataFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetFreeDataFunction().

## GWEN_MsgEngine_SetGetCharValueFunction()

GWENHYWFAR_API void GWEN_MsgEngine_SetGetCharValueFunction | ( | GWEN_MSGENGINE * | e,
|  | GWEN_MSGENGINE_GETCHARVALUE_PTR | p )

References GWEN_MsgEngine_SetGetCharValueFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetGetCharValueFunction().

## GWEN_MsgEngine_SetGetGlobalValuesFunction()

GWENHYWFAR_API void GWEN_MsgEngine_SetGetGlobalValuesFunction | ( | GWEN_MSGENGINE * | e,
|  | GWEN_MSGENGINE_GETGLOBALVALUES_PTR | p )

References GWEN_MsgEngine_SetGetGlobalValuesFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetGetGlobalValuesFunction().

## GWEN_MsgEngine_SetGetIntValueFunction()

GWENHYWFAR_API void GWEN_MsgEngine_SetGetIntValueFunction | ( | GWEN_MSGENGINE * | e,
|  | GWEN_MSGENGINE_GETINTVALUE_PTR | p )

References GWEN_MsgEngine_SetGetIntValueFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetGetIntValueFunction().

## GWEN_MsgEngine_SetInheritorData()

GWENHYWFAR_API void GWEN_MsgEngine_SetInheritorData | ( | GWEN_MSGENGINE * | e,
|  | void * | d )

References GWEN_MsgEngine_SetInheritorData(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetInheritorData().

## GWEN_MsgEngine_SetIntValue()

GWENHYWFAR_API int GWEN_MsgEngine_SetIntValue | ( | GWEN_MSGENGINE * | e,
|  | const char * | path,
|  | int | value )

References GWEN_MsgEngine_SetIntValue(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetIntValue().

## GWEN_MsgEngine_SetMode()

GWENHYWFAR_API void GWEN_MsgEngine_SetMode | ( | GWEN_MSGENGINE * | e,
|  | const char * | mode )

References GWEN_MsgEngine_SetMode(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetMode().

## GWEN_MsgEngine_SetProtocolVersion()

GWENHYWFAR_API void GWEN_MsgEngine_SetProtocolVersion | ( | GWEN_MSGENGINE * | e,
|  | unsigned int | p )

References GWEN_MsgEngine_SetProtocolVersion(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetProtocolVersion().

## GWEN_MsgEngine_SetTypeCheckFunction()

GWENHYWFAR_API void GWEN_MsgEngine_SetTypeCheckFunction | ( | GWEN_MSGENGINE * | e,
|  | GWEN_MSGENGINE_TYPECHECK_PTR | p )

References GWEN_MsgEngine_SetTypeCheckFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetTypeCheckFunction().

## GWEN_MsgEngine_SetTypeReadFunction()

GWENHYWFAR_API void GWEN_MsgEngine_SetTypeReadFunction | ( | GWEN_MSGENGINE * | e,
|  | GWEN_MSGENGINE_TYPEREAD_PTR | p )

References GWEN_MsgEngine_SetTypeReadFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetTypeReadFunction().

## GWEN_MsgEngine_SetTypeWriteFunction()

GWENHYWFAR_API void GWEN_MsgEngine_SetTypeWriteFunction | ( | GWEN_MSGENGINE * | e,
|  | GWEN_MSGENGINE_TYPEWRITE_PTR | p )

References GWEN_MsgEngine_SetTypeWriteFunction(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetTypeWriteFunction().

## GWEN_MsgEngine_SetValue()

GWENHYWFAR_API int GWEN_MsgEngine_SetValue | ( | GWEN_MSGENGINE * | e,
|  | const char * | path,
|  | const char * | value )

Set a global variable which will be used for "$"-Variables in description files.

References GWEN_MsgEngine_SetValue(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SetValue().

## GWEN_MsgEngine_ShowMessage()

GWENHYWFAR_API int GWEN_MsgEngine_ShowMessage | ( | GWEN_MSGENGINE * | e,
|  | const char * | typ,
|  | const char * | msgName,
|  | int | msgVersion,
|  | uint32_t | flags )

Deprecated, use GWEN_MsgEngine_ListMessage instead.

References GWEN_MsgEngine_ShowMessage(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_ShowMessage().

## GWEN_MsgEngine_SkipSegment()

GWENHYWFAR_API int GWEN_MsgEngine_SkipSegment | ( | GWEN_MSGENGINE * | e,
|  | GWEN_BUFFER * | msgbuf,
|  | unsigned char | escapeChar,
|  | unsigned char | delimiter )

This function skips all bytes from the given buffer until the given delimiter is found or the buffer ends. It also takes care of escape characters (to not accidentally take an escaped delimiter for a real one) and is able to identify and correctly skip binary data. For the latter to work it takes into account that binary data is preceeded by a "@123@" sequence, where "123" is the length of the binary data. This sequence has been taken from the HBCI specs (German homebanking protocol) and has proven to be very effective ;-)

References GWEN_MsgEngine_SkipSegment(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_SkipSegment().

## GWEN_MsgEngine_TakeTrustInfo()

GWENHYWFAR_API GWEN_MSGENGINE_TRUSTEDDATA * GWEN_MsgEngine_TakeTrustInfo | ( | GWEN_MSGENGINE * | e | ) |

This function returns trust info gathered while parsing a message. The caller of this function takes over ownership of this list of data, so it is his responsibility to free it.

Returns
  list of trust data (0 if none)

References GWEN_MsgEngine_TakeTrustInfo(), and GWENHYWFAR_API.

Referenced by GWEN_MsgEngine_TakeTrustInfo().

## GWEN_MsgEngine_TrustedData_AddPos()

GWENHYWFAR_API int GWEN_MsgEngine_TrustedData_AddPos | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td,
|  | unsigned int | pos )

References GWENHYWFAR_API.

## GWEN_MsgEngine_TrustedData_CreateReplacements()

GWENHYWFAR_API int GWEN_MsgEngine_TrustedData_CreateReplacements | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |

## GWEN_MsgEngine_TrustedData_free()

GWENHYWFAR_API void GWEN_MsgEngine_TrustedData_free | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |

References GWENHYWFAR_API.

## GWEN_MsgEngine_TrustedData_GetData()

GWENHYWFAR_API const char * GWEN_MsgEngine_TrustedData_GetData | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |

References GWENHYWFAR_API.

## GWEN_MsgEngine_TrustedData_GetDescription()

GWENHYWFAR_API const char * GWEN_MsgEngine_TrustedData_GetDescription | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |

References GWENHYWFAR_API.

## GWEN_MsgEngine_TrustedData_GetFirstPos()

GWENHYWFAR_API int GWEN_MsgEngine_TrustedData_GetFirstPos | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |

References GWENHYWFAR_API.

## GWEN_MsgEngine_TrustedData_GetNext()

GWENHYWFAR_API GWEN_MSGENGINE_TRUSTEDDATA * GWEN_MsgEngine_TrustedData_GetNext | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |

References GWENHYWFAR_API.

## GWEN_MsgEngine_TrustedData_GetNextPos()

GWENHYWFAR_API int GWEN_MsgEngine_TrustedData_GetNextPos | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |

References GWENHYWFAR_API.

## GWEN_MsgEngine_TrustedData_GetReplacement()

GWENHYWFAR_API const char * GWEN_MsgEngine_TrustedData_GetReplacement | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |

References GWENHYWFAR_API.

## GWEN_MsgEngine_TrustedData_GetSize()

GWENHYWFAR_API unsigned int GWEN_MsgEngine_TrustedData_GetSize | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |

References GWENHYWFAR_API.

## GWEN_MsgEngine_TrustedData_GetTrustLevel()

GWENHYWFAR_API GWEN_MSGENGINE_TRUSTLEVEL GWEN_MsgEngine_TrustedData_GetTrustLevel | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |

References GWENHYWFAR_API.

## GWEN_MsgEngine_TrustedData_new()

GWENHYWFAR_API GWEN_MSGENGINE_TRUSTEDDATA * GWEN_MsgEngine_TrustedData_new | ( | const char * | data,
|  | unsigned int | size,
|  | const char * | description,
|  | GWEN_MSGENGINE_TRUSTLEVEL | trustLevel )

References GWENHYWFAR_API.