|
gwenhywfar 5.12.0
|
#include <gwenhywfar/gwenhywfarapi.h>#include <msgengine_p.h>#include <gwenhywfar/xml.h>#include <gwenhywfar/text.h>#include <gwenhywfar/misc.h>#include <gwenhywfar/path.h>#include <gwenhywfar/debug.h>#include <gwenhywfar/buffer.h>#include <stdlib.h>#include <assert.h>#include <string.h>#include <ctype.h>
Go to the source code of this file.
Macros | |
| #define | DISABLE_DEBUGLOG |
| #define DISABLE_DEBUGLOG |
Definition at line 29 of file msgengine.c.
|
static |
Definition at line 3300 of file msgengine.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, DBG_VERBOUS, GWEN_Buffer_free(), GWEN_Buffer_GetBytesLeft(), GWEN_Buffer_GetPos(), GWEN_Buffer_GetPosPointer(), GWEN_Buffer_GetStart(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_IncrementPos(), GWEN_Buffer_new(), GWEN_Buffer_PeekByte(), GWEN_Buffer_Rewind(), GWEN_DB_FLAGS_DEFAULT, GWEN_DB_SetBinValue(), GWEN_DB_SetCharValue(), GWEN_DB_SetIntValue(), GWEN_LOGDOMAIN, GWEN_MsgEngine__IsBinTyp(), GWEN_MsgEngine__IsIntTyp(), GWEN_MsgEngine__ReadValue(), GWEN_MSGENGINE_MAX_VALUE_LEN, GWEN_Text_DumpString(), GWEN_XMLNode_Dump(), and GWEN_XMLNode_GetProperty().
Referenced by GWEN_MsgEngine__ReadGroup().


| const char * GWEN_MsgEngine__findInValues | ( | GWEN_MSGENGINE * | e, |
| GWEN_XMLNODE * | node, | ||
| GWEN_XMLNODE * | dnode, | ||
| const char * | name, | ||
| unsigned int * | datasize ) |
Definition at line 1484 of file msgengine.c.
References DBG_DEBUG, DBG_VERBOUS, GWEN_LOGDOMAIN, GWEN_MsgEngine__TransformValue(), GWEN_XMLNode_GetChild(), GWEN_XMLNode_GetData(), GWEN_XMLNode_GetProperty(), GWEN_XMLNode_GetType(), GWEN_XMLNode_Next(), GWEN_XMLNodeTypeData, and GWEN_XMLNodeTypeTag.
Referenced by GWEN_MsgEngine__SearchForValue().


| GWEN_DB_NODE * GWEN_MsgEngine__GetGlobalValues | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 202 of file msgengine.c.
Referenced by GWEN_MsgEngine__TransformValue(), GWEN_MsgEngine_GetIntValue(), GWEN_MsgEngine_GetMode(), GWEN_MsgEngine_GetProtocolVersion(), GWEN_MsgEngine_GetValue(), GWEN_MsgEngine_SetIntValue(), GWEN_MsgEngine_SetMode(), GWEN_MsgEngine_SetProtocolVersion(), and GWEN_MsgEngine_SetValue().

| GWEN_XMLNODE * GWEN_MsgEngine__GetGroup | ( | GWEN_MSGENGINE * | e, |
| GWEN_XMLNODE * | node, | ||
| const char * | t, | ||
| int | version, | ||
| const char * | pvalue ) |
Definition at line 1556 of file msgengine.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, GWEN_LOGDOMAIN, GWEN_MsgEngine_GetMode(), GWEN_MsgEngine_GetProtocolVersion(), GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_GetData(), GWEN_XMLNode_GetFirstTag(), GWEN_XMLNode_GetNextTag(), and GWEN_XMLNode_GetProperty().
Referenced by GWEN_MsgEngine_GetGroup().


| int GWEN_MsgEngine__GetInline | ( | GWEN_MSGENGINE * | e, |
| GWEN_XMLNODE * | node, | ||
| GWEN_BUFFER * | mbuf ) |
Definition at line 694 of file msgengine.c.
References DBG_DEBUG, DBG_INFO, GWEN_Buffer_AppendString(), GWEN_LOGDOMAIN, GWEN_MsgEngine__IsBinTyp(), GWEN_Text_FromHexBuffer(), GWEN_XMLNode_GetData(), GWEN_XMLNode_GetFirstData(), and GWEN_XMLNode_GetProperty().
Referenced by GWEN_MsgEngine__WriteElement().


| int GWEN_MsgEngine__IsBinTyp | ( | GWEN_MSGENGINE * | e, |
| const char * | type ) |
Definition at line 676 of file msgengine.c.
References GWEN_DB_NodeType_Unknown, and GWEN_DB_NodeType_ValueBin.
Referenced by _groupReadElement(), GWEN_MsgEngine__GetInline(), GWEN_MsgEngine__TransformValue(), and GWEN_MsgEngine__WriteElement().

| int GWEN_MsgEngine__IsCharTyp | ( | GWEN_MSGENGINE * | e, |
| const char * | type ) |
Definition at line 637 of file msgengine.c.
References GWEN_DB_NodeType_Unknown, and GWEN_DB_NodeType_ValueChar.
Referenced by GWEN_MsgEngine__TransformValue(), and GWEN_MsgEngine__WriteElement().

| int GWEN_MsgEngine__IsIntTyp | ( | GWEN_MSGENGINE * | e, |
| const char * | type ) |
Definition at line 658 of file msgengine.c.
References GWEN_DB_NodeType_Unknown, and GWEN_DB_NodeType_ValueInt.
Referenced by _groupReadElement(), GWEN_MsgEngine__TransformValue(), and GWEN_MsgEngine__WriteElement().

| int GWEN_MsgEngine__ListElement | ( | GWEN_UNUSED GWEN_MSGENGINE * | e, |
| const char * | path, | ||
| GWEN_XMLNODE * | node, | ||
| GWEN_STRINGLIST * | sl, | ||
| GWEN_XMLNODE * | listNode, | ||
| uint32_t | flags ) |
Definition at line 2541 of file msgengine.c.
References DBG_ERROR, GWEN_LOGDOMAIN, GWEN_MSGENGINE_SHOW_FLAGS_NOSET, GWEN_StringList_FirstEntry(), GWEN_StringListEntry_Data(), GWEN_StringListEntry_Next(), GWEN_UNUSED, GWEN_XMLNode_AddChild(), GWEN_XMLNode_dup(), GWEN_XMLNode_GetProperty(), and GWEN_XMLNode_SetProperty().
Referenced by GWEN_MsgEngine__ListGroup().


| int GWEN_MsgEngine__ListGroup | ( | GWEN_MSGENGINE * | e, |
| const char * | path, | ||
| GWEN_XMLNODE * | node, | ||
| GWEN_STRINGLIST * | sl, | ||
| GWEN_XMLNODE * | listNode, | ||
| uint32_t | flags ) |
Definition at line 2604 of file msgengine.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, GWEN_LOGDOMAIN, GWEN_MsgEngine__ListElement(), GWEN_MsgEngine__ListGroup(), GWEN_MsgEngine_FindNodeByProperty(), GWEN_StringList_AppendString(), GWEN_XMLNode_AddChild(), GWEN_XMLNode_CopyProperties(), GWEN_XMLNode_dup(), GWEN_XMLNode_GetChild(), GWEN_XMLNode_GetData(), GWEN_XMLNode_GetProperty(), GWEN_XMLNode_GetType(), GWEN_XMLNode_Next(), GWEN_XMLNode_SetProperty(), GWEN_XMLNodeTypeData, and GWEN_XMLNodeTypeTag.
Referenced by GWEN_MsgEngine__ListGroup(), and GWEN_MsgEngine_ListMessage().


| int GWEN_MsgEngine__ReadGroup | ( | GWEN_MSGENGINE * | e, |
| GWEN_BUFFER * | msgbuf, | ||
| GWEN_XMLNODE * | node, | ||
| GWEN_XMLNODE * | rnode, | ||
| GWEN_DB_NODE * | gr, | ||
| const char * | delimiters, | ||
| uint32_t | flags ) |
Definition at line 3042 of file msgengine.c.
References _groupReadElement(), DBG_DEBUG, DBG_ERROR, DBG_INFO, DBG_NOTICE, DBG_VERBOUS, GWEN_Buffer_AppendByte(), GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetBytesLeft(), GWEN_Buffer_GetPos(), GWEN_Buffer_GetStart(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_IncrementPos(), GWEN_Buffer_new(), GWEN_Buffer_PeekByte(), GWEN_DB_GetGroup(), GWEN_LOGDOMAIN, GWEN_MsgEngine__ReadGroup(), GWEN_MsgEngine_FindNodeByProperty(), GWEN_PATH_FLAGS_CREATE_GROUP, GWEN_Text_DumpString(), GWEN_XMLNode_Dump(), GWEN_XMLNode_GetChild(), GWEN_XMLNode_GetData(), GWEN_XMLNode_GetProperty(), GWEN_XMLNode_GetType(), GWEN_XMLNode_Next(), and GWEN_XMLNodeTypeTag.
Referenced by GWEN_MsgEngine__ReadGroup(), and GWEN_MsgEngine_ParseMessage().


| int GWEN_MsgEngine__ReadValue | ( | GWEN_MSGENGINE * | e, |
| GWEN_BUFFER * | msgbuf, | ||
| GWEN_XMLNODE * | node, | ||
| GWEN_XMLNODE * | rnode, | ||
| GWEN_BUFFER * | vbuf, | ||
| const char * | delimiters, | ||
| uint32_t | flags ) |
Definition at line 2831 of file msgengine.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, DBG_WARN, GWEN_Buffer_AppendByte(), GWEN_Buffer_AppendBytes(), GWEN_Buffer_DecrementPos(), GWEN_Buffer_GetBytesLeft(), GWEN_Buffer_GetPos(), GWEN_Buffer_GetPosPointer(), GWEN_Buffer_GetStart(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_IncrementPos(), GWEN_Buffer_ReadByte(), GWEN_LOGDOMAIN, GWEN_MsgEngine_AddTrustInfo(), GWEN_MsgEngine_GetHighestTrustLevel(), GWEN_MSGENGINE_READ_FLAGS_TRUSTINFO, GWEN_XMLNode_Dump(), and GWEN_XMLNode_GetProperty().
Referenced by _groupReadElement().


| const char * GWEN_MsgEngine__SearchForValue | ( | GWEN_MSGENGINE * | e, |
| GWEN_XMLNODE * | node, | ||
| GWEN_XMLNODE_PATH * | nodePath, | ||
| const char * | name, | ||
| unsigned int * | datasize ) |
Definition at line 1402 of file msgengine.c.
References DBG_DEBUG, DBG_WARN, GWEN_LOGDOMAIN, GWEN_MsgEngine__findInValues(), GWEN_XMLNode_GetProperty(), and GWEN_XMLNode_Path_Surface().
Referenced by GWEN_MsgEngine__WriteElement().


| int GWEN_MsgEngine__ShowElement | ( | GWEN_UNUSED GWEN_MSGENGINE * | e, |
| const char * | path, | ||
| GWEN_XMLNODE * | node, | ||
| GWEN_STRINGLIST * | sl, | ||
| uint32_t | flags ) |
Definition at line 2174 of file msgengine.c.
References DBG_ERROR, GWEN_LOGDOMAIN, GWEN_MSGENGINE_SHOW_FLAGS_NOSET, GWEN_StringList_FirstEntry(), GWEN_StringListEntry_Data(), GWEN_StringListEntry_Next(), GWEN_UNUSED, and GWEN_XMLNode_GetProperty().
Referenced by GWEN_MsgEngine__ShowGroup().


| int GWEN_MsgEngine__ShowGroup | ( | GWEN_MSGENGINE * | e, |
| const char * | path, | ||
| GWEN_XMLNODE * | node, | ||
| GWEN_STRINGLIST * | sl, | ||
| uint32_t | flags ) |
Definition at line 2271 of file msgengine.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, GWEN_LOGDOMAIN, GWEN_MsgEngine__ShowElement(), GWEN_MsgEngine__ShowGroup(), GWEN_MsgEngine_FindNodeByProperty(), GWEN_StringList_AppendString(), GWEN_XMLNode_GetChild(), GWEN_XMLNode_GetData(), GWEN_XMLNode_GetProperty(), GWEN_XMLNode_GetType(), GWEN_XMLNode_Next(), GWEN_XMLNodeTypeData, and GWEN_XMLNodeTypeTag.
Referenced by GWEN_MsgEngine__ShowGroup(), and GWEN_MsgEngine_ShowMessage().


| const char * GWEN_MsgEngine__TransformValue | ( | GWEN_MSGENGINE * | e, |
| const char * | pvalue, | ||
| GWEN_XMLNODE * | node, | ||
| GWEN_XMLNODE * | dnode, | ||
| unsigned int * | datasize ) |
Definition at line 1156 of file msgengine.c.
References DBG_DEBUG, DBG_ERROR, DBG_NOTICE, GWEN_DB_FLAGS_DEFAULT, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_GetBinValue(), GWEN_DB_GetCharValue(), GWEN_DB_GetIntValue(), GWEN_DB_GetVariableType(), GWEN_DB_NodeType_Unknown, GWEN_DB_NodeType_ValueBin, GWEN_DB_NodeType_ValueChar, GWEN_DB_NodeType_ValueInt, GWEN_DB_SetIntValue(), GWEN_DB_VariableExists(), GWEN_LOGDOMAIN, GWEN_MsgEngine__GetGlobalValues(), GWEN_MsgEngine__IsBinTyp(), GWEN_MsgEngine__IsCharTyp(), GWEN_MsgEngine__IsIntTyp(), GWEN_Text_NumToString(), and GWEN_XMLNode_GetProperty().
Referenced by GWEN_MsgEngine__findInValues().


| int GWEN_MsgEngine__WriteElement | ( | GWEN_MSGENGINE * | e, |
| GWEN_BUFFER * | gbuf, | ||
| GWEN_XMLNODE * | node, | ||
| GWEN_DB_NODE * | gr, | ||
| int | loopNr, | ||
| int | isOptional, | ||
| GWEN_XMLNODE_PATH * | nodePath ) |
Definition at line 742 of file msgengine.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, DBG_WARN, GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_new(), GWEN_Buffer_SetStep(), GWEN_DB_Dump(), GWEN_DB_GetBinValue(), GWEN_DB_GetCharValue(), GWEN_DB_GetIntValue(), GWEN_DB_GetValueTypeByPath(), GWEN_DB_NodeType_Unknown, GWEN_DB_NodeType_ValueBin, GWEN_DB_NodeType_ValueChar, GWEN_DB_NodeType_ValueInt, GWEN_DB_ValueExists(), GWEN_LOGDOMAIN, GWEN_MsgEngine__GetInline(), GWEN_MsgEngine__IsBinTyp(), GWEN_MsgEngine__IsCharTyp(), GWEN_MsgEngine__IsIntTyp(), GWEN_MsgEngine__SearchForValue(), GWEN_MsgEngine__WriteValue(), GWEN_MsgEngine_GetMode(), GWEN_Text_NumToString(), GWEN_XMLNode_GetProperty(), GWEN_XMLNode_Path_dup(), and GWEN_XMLNode_Path_free().
Referenced by GWEN_MsgEngine__WriteGroup().


| int GWEN_MsgEngine__WriteGroup | ( | GWEN_MSGENGINE * | e, |
| GWEN_BUFFER * | gbuf, | ||
| GWEN_XMLNODE * | node, | ||
| GWEN_XMLNODE * | rnode, | ||
| GWEN_DB_NODE * | gr, | ||
| int | groupIsOptional, | ||
| GWEN_XMLNODE_PATH * | nodePath ) |
Definition at line 1709 of file msgengine.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, DBG_VERBOUS, GWEN_Buffer_AppendByte(), GWEN_Buffer_Crop(), GWEN_Buffer_GetPos(), GWEN_Buffer_SetPos(), GWEN_DB_Dump(), GWEN_DB_FindFirstGroup(), GWEN_DB_FindNextGroup(), GWEN_LOGDOMAIN, GWEN_MsgEngine__WriteElement(), GWEN_MsgEngine__WriteGroup(), GWEN_MsgEngine_GetGroup(), GWEN_XMLNode_Dump(), GWEN_XMLNode_GetChild(), GWEN_XMLNode_GetData(), GWEN_XMLNode_GetProperty(), GWEN_XMLNode_GetType(), GWEN_XMLNode_Next(), GWEN_XMLNode_Path_Dive(), GWEN_XMLNode_Path_Surface(), GWEN_XMLNodeTypeData, GWEN_XMLNodeTypeTag, and NULL.
Referenced by GWEN_MsgEngine__WriteGroup(), and GWEN_MsgEngine_CreateMessageFromNode().


| int GWEN_MsgEngine__WriteValue | ( | GWEN_MSGENGINE * | e, |
| GWEN_BUFFER * | gbuf, | ||
| GWEN_BUFFER * | data, | ||
| GWEN_XMLNODE * | node ) |
Definition at line 420 of file msgengine.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, DBG_WARN, GWEN_Buffer_AdjustUsedBytes(), GWEN_Buffer_AllocRoom(), GWEN_Buffer_AppendBuffer(), GWEN_Buffer_AppendByte(), GWEN_Buffer_GetPos(), GWEN_Buffer_GetPosPointer(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_IncrementPos(), GWEN_Buffer_ReadByte(), GWEN_LOGDOMAIN, and GWEN_XMLNode_GetProperty().
Referenced by GWEN_MsgEngine__WriteElement().


| int GWEN_MsgEngine_AddDefinitions | ( | GWEN_MSGENGINE * | e, |
| GWEN_XMLNODE * | node ) |
Definition at line 2126 of file msgengine.c.
References DBG_DEBUG, GWEN_LOGDOMAIN, GWEN_XMLNode_AddChild(), GWEN_XMLNode_dup(), GWEN_XMLNode_FindNode(), GWEN_XMLNode_GetChild(), GWEN_XMLNode_GetData(), GWEN_XMLNode_GetType(), GWEN_XMLNode_Next(), and GWEN_XMLNodeTypeTag.

| int GWEN_MsgEngine_AddTrustInfo | ( | GWEN_MSGENGINE * | e, |
| const char * | data, | ||
| unsigned int | size, | ||
| const char * | description, | ||
| GWEN_MSGENGINE_TRUSTLEVEL | trustLevel, | ||
| unsigned int | pos ) |
Definition at line 4044 of file msgengine.c.
References DBG_INFO, GWEN_LIST_ADD, GWEN_LOGDOMAIN, GWEN_MsgEngine_TrustedData_AddPos(), and GWEN_MsgEngine_TrustedData_new().
Referenced by GWEN_MsgEngine__ReadValue(), GWEN_MsgEngine_ReadMessage(), and GWEN_MsgEngine_SkipSegment().


| void GWEN_MsgEngine_Attach | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 114 of file msgengine.c.
| int GWEN_MsgEngine_CreateMessage | ( | GWEN_MSGENGINE * | e, |
| const char * | msgName, | ||
| int | msgVersion, | ||
| GWEN_BUFFER * | gbuf, | ||
| GWEN_DB_NODE * | msgData ) |
Definition at line 2105 of file msgengine.c.
References DBG_ERROR, GWEN_LOGDOMAIN, GWEN_MsgEngine_CreateMessageFromNode(), and GWEN_MsgEngine_FindGroupByProperty().

| int GWEN_MsgEngine_CreateMessageFromNode | ( | GWEN_MSGENGINE * | e, |
| GWEN_XMLNODE * | node, | ||
| GWEN_BUFFER * | gbuf, | ||
| GWEN_DB_NODE * | msgData ) |
Definition at line 2065 of file msgengine.c.
References DBG_INFO, GWEN_LOGDOMAIN, GWEN_MsgEngine__WriteGroup(), GWEN_XMLNode_GetData(), GWEN_XMLNode_Path_Dive(), GWEN_XMLNode_Path_free(), and GWEN_XMLNode_Path_new().
Referenced by GWEN_MsgEngine_CreateMessage().


| GWEN_XMLNODE * GWEN_MsgEngine_FindGroupByProperty | ( | GWEN_MSGENGINE * | e, |
| const char * | pname, | ||
| int | version, | ||
| const char * | pvalue ) |
Definition at line 964 of file msgengine.c.
References GWEN_MsgEngine_FindNodeByProperty().
Referenced by GWEN_MsgEngine_CreateMessage(), and GWEN_MsgEngine_ReadMessage().


| 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>".
Definition at line 974 of file msgengine.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, GWEN_LOGDOMAIN, GWEN_MsgEngine_GetMode(), GWEN_MsgEngine_GetProtocolVersion(), GWEN_XMLNode_GetChild(), GWEN_XMLNode_GetData(), GWEN_XMLNode_GetProperty(), GWEN_XMLNode_GetType(), GWEN_XMLNode_Next(), and GWEN_XMLNodeTypeTag.
Referenced by GWEN_MsgEngine__ListGroup(), GWEN_MsgEngine__ReadGroup(), GWEN_MsgEngine__ShowGroup(), GWEN_MsgEngine_FindGroupByProperty(), GWEN_MsgEngine_ListMessage(), GWEN_MsgEngine_ReadMessage(), and GWEN_MsgEngine_ShowMessage().


| GWEN_XMLNODE * GWEN_MsgEngine_FindNodeByPropertyStrictProto | ( | GWEN_MSGENGINE * | e, |
| const char * | t, | ||
| const char * | pname, | ||
| int | version, | ||
| const char * | pvalue ) |
Definition at line 1065 of file msgengine.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, GWEN_LOGDOMAIN, GWEN_MsgEngine_GetMode(), GWEN_MsgEngine_GetProtocolVersion(), GWEN_XMLNode_GetChild(), GWEN_XMLNode_GetData(), GWEN_XMLNode_GetProperty(), GWEN_XMLNode_GetType(), GWEN_XMLNode_Next(), and GWEN_XMLNodeTypeTag.

| void GWEN_MsgEngine_free | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 82 of file msgengine.c.
References GWEN_DB_Group_free(), GWEN_FREE_OBJECT, GWEN_INHERIT_FINI, GWEN_MsgEngine_TrustedData_free(), and GWEN_XMLNode_free().

| GWEN_MSGENGINE_BINTYPEREAD_PTR GWEN_MsgEngine_GetBinTypeReadFunction | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 348 of file msgengine.c.
| GWEN_MSGENGINE_BINTYPEWRITE_PTR GWEN_MsgEngine_GetBinTypeWriteFunction | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 365 of file msgengine.c.
| const char * GWEN_MsgEngine_GetCharsToEscape | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 146 of file msgengine.c.
| GWEN_XMLNODE * GWEN_MsgEngine_GetDefinitions | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 248 of file msgengine.c.
| const char * GWEN_MsgEngine_GetDelimiters | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 166 of file msgengine.c.
| char GWEN_MsgEngine_GetEscapeChar | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 129 of file msgengine.c.
| GWEN_MSGENGINE_GETGLOBALVALUES_PTR GWEN_MsgEngine_GetGetGlobalValuesFunction | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 277 of file msgengine.c.
| GWEN_XMLNODE * GWEN_MsgEngine_GetGroup | ( | GWEN_MSGENGINE * | e, |
| GWEN_XMLNODE * | node, | ||
| const GWEN_XMLNODE_PATH * | nodePath, | ||
| const char * | t, | ||
| int | version, | ||
| const char * | pvalue ) |
Definition at line 1636 of file msgengine.c.
References DBG_DEBUG, DBG_ERROR, GWEN_LOGDOMAIN, GWEN_MsgEngine__GetGroup(), GWEN_XMLNode_GetParent(), GWEN_XMLNode_Path_dup(), GWEN_XMLNode_Path_free(), and GWEN_XMLNode_Path_Surface().
Referenced by GWEN_MsgEngine__WriteGroup().


| int GWEN_MsgEngine_GetHighestTrustLevel | ( | GWEN_XMLNODE * | node, |
| GWEN_XMLNODE * | refnode ) |
Definition at line 1369 of file msgengine.c.
References GWEN_XMLNode_GetParent(), and GWEN_XMLNode_GetProperty().
Referenced by GWEN_MsgEngine__ReadValue().


| void * GWEN_MsgEngine_GetInheritorData | ( | const GWEN_MSGENGINE * | e | ) |
Definition at line 401 of file msgengine.c.
| int GWEN_MsgEngine_GetIntValue | ( | GWEN_MSGENGINE * | e, |
| const char * | path, | ||
| int | defValue ) |
Definition at line 3558 of file msgengine.c.
References GWEN_DB_GetIntValue(), and GWEN_MsgEngine__GetGlobalValues().

| const char * GWEN_MsgEngine_GetMode | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 191 of file msgengine.c.
References GWEN_DB_GetCharValue(), and GWEN_MsgEngine__GetGlobalValues().
Referenced by GWEN_MsgEngine__GetGroup(), GWEN_MsgEngine__WriteElement(), GWEN_MsgEngine_FindNodeByProperty(), and GWEN_MsgEngine_FindNodeByPropertyStrictProto().


| unsigned int GWEN_MsgEngine_GetProtocolVersion | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 221 of file msgengine.c.
References GWEN_DB_GetIntValue(), and GWEN_MsgEngine__GetGlobalValues().
Referenced by GWEN_MsgEngine__GetGroup(), GWEN_MsgEngine_FindNodeByProperty(), and GWEN_MsgEngine_FindNodeByPropertyStrictProto().


| GWEN_MSGENGINE_TYPECHECK_PTR GWEN_MsgEngine_GetTypeCheckFunction | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 328 of file msgengine.c.
| GWEN_MSGENGINE_TYPEREAD_PTR GWEN_MsgEngine_GetTypeReadFunction | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 294 of file msgengine.c.
| GWEN_MSGENGINE_TYPEWRITE_PTR GWEN_MsgEngine_GetTypeWriteFunction | ( | GWEN_MSGENGINE * | e | ) |
Definition at line 311 of file msgengine.c.
| const char * GWEN_MsgEngine_GetValue | ( | GWEN_MSGENGINE * | e, |
| const char * | path, | ||
| const char * | defValue ) |
Definition at line 3543 of file msgengine.c.
References GWEN_DB_GetCharValue(), and GWEN_MsgEngine__GetGlobalValues().

| 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.
Definition at line 2788 of file msgengine.c.
References DBG_ERROR, DBG_INFO, GWEN_LOGDOMAIN, GWEN_MsgEngine__ListGroup(), GWEN_MsgEngine_FindNodeByProperty(), GWEN_StringList_free(), GWEN_StringList_new(), GWEN_XMLNode_dup(), GWEN_XMLNode_free(), and GWEN_XMLNode_RemoveChildren().
Referenced by GWEN_MsgEngine_SkipSegment().


| GWEN_MSGENGINE * GWEN_MsgEngine_new | ( | void | ) |
Definition at line 66 of file msgengine.c.
References GWEN_DB_Group_new(), GWEN_INHERIT_INIT, GWEN_MsgEngine_new(), and GWEN_NEW_OBJECT.
Referenced by GWEN_MsgEngine_new().


| 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.
Definition at line 3486 of file msgengine.c.
References DBG_INFO, GWEN_LOGDOMAIN, and GWEN_MsgEngine__ReadGroup().
Referenced by GWEN_MsgEngine_ReadMessage().


| 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:
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.
| 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 |
Definition at line 3651 of file msgengine.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, DBG_NOTICE, GWEN_Buffer_GetBytesLeft(), GWEN_Buffer_GetPos(), GWEN_Buffer_GetStart(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_SetPos(), GWEN_DB_Dump(), GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_GetCharValue(), GWEN_DB_GetGroup(), GWEN_DB_GetIntValue(), GWEN_DB_Group_free(), GWEN_DB_Group_new(), GWEN_DB_SetIntValue(), GWEN_LOGDOMAIN, GWEN_MsgEngine_AddTrustInfo(), GWEN_MsgEngine_FindGroupByProperty(), GWEN_MsgEngine_FindNodeByProperty(), GWEN_MsgEngine_ParseMessage(), GWEN_MSGENGINE_READ_FLAGS_TRUSTINFO, GWEN_MsgEngine_SkipSegment(), GWEN_MsgEngineTrustLevelHigh, GWEN_PATH_FLAGS_CREATE_GROUP, GWEN_Text_DumpString(), and GWEN_XMLNode_GetProperty().
Referenced by GWEN_MsgEngine_SkipSegment().


| 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.
Definition at line 1333 of file msgengine.c.
References DBG_DEBUG, GWEN_LOGDOMAIN, GWEN_XMLNode_GetParent(), and GWEN_XMLNode_GetProperty().

| void GWEN_MsgEngine_SetBinTypeReadFunction | ( | GWEN_MSGENGINE * | e, |
| GWEN_MSGENGINE_BINTYPEREAD_PTR | p ) |
Definition at line 339 of file msgengine.c.
| void GWEN_MsgEngine_SetBinTypeWriteFunction | ( | GWEN_MSGENGINE * | e, |
| GWEN_MSGENGINE_BINTYPEWRITE_PTR | p ) |
Definition at line 356 of file msgengine.c.
| void GWEN_MsgEngine_SetCharsToEscape | ( | GWEN_MSGENGINE * | e, |
| const char * | c ) |
Definition at line 137 of file msgengine.c.
| void GWEN_MsgEngine_SetDefinitions | ( | GWEN_MSGENGINE * | e, |
| GWEN_XMLNODE * | n, | ||
| int | take ) |
| 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. |
Definition at line 255 of file msgengine.c.
References GWEN_XMLNode_free().

| void GWEN_MsgEngine_SetDelimiters | ( | GWEN_MSGENGINE * | e, |
| const char * | s ) |
Definition at line 154 of file msgengine.c.
| void GWEN_MsgEngine_SetEscapeChar | ( | GWEN_MSGENGINE * | e, |
| char | c ) |
Definition at line 121 of file msgengine.c.
| void GWEN_MsgEngine_SetFreeDataFunction | ( | GWEN_MSGENGINE * | e, |
| GWEN_MSGENGINE_FREEDATA_PTR | p ) |
Definition at line 391 of file msgengine.c.
References DBG_WARN, and GWEN_LOGDOMAIN.
| void GWEN_MsgEngine_SetGetCharValueFunction | ( | GWEN_MSGENGINE * | e, |
| GWEN_MSGENGINE_GETCHARVALUE_PTR | p ) |
Definition at line 373 of file msgengine.c.
| void GWEN_MsgEngine_SetGetGlobalValuesFunction | ( | GWEN_MSGENGINE * | e, |
| GWEN_MSGENGINE_GETGLOBALVALUES_PTR | p ) |
Definition at line 268 of file msgengine.c.
| void GWEN_MsgEngine_SetGetIntValueFunction | ( | GWEN_MSGENGINE * | e, |
| GWEN_MSGENGINE_GETINTVALUE_PTR | p ) |
Definition at line 382 of file msgengine.c.
| void GWEN_MsgEngine_SetInheritorData | ( | GWEN_MSGENGINE * | e, |
| void * | d ) |
Definition at line 409 of file msgengine.c.
References DBG_WARN, and GWEN_LOGDOMAIN.
| int GWEN_MsgEngine_SetIntValue | ( | GWEN_MSGENGINE * | e, |
| const char * | path, | ||
| int | value ) |
Definition at line 3526 of file msgengine.c.
References GWEN_DB_FLAGS_DEFAULT, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_SetIntValue(), and GWEN_MsgEngine__GetGlobalValues().

| void GWEN_MsgEngine_SetMode | ( | GWEN_MSGENGINE * | e, |
| const char * | mode ) |
Definition at line 174 of file msgengine.c.
References GWEN_DB_DeleteVar(), GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_SetCharValue(), and GWEN_MsgEngine__GetGlobalValues().

| void GWEN_MsgEngine_SetProtocolVersion | ( | GWEN_MSGENGINE * | e, |
| unsigned int | p ) |
Definition at line 232 of file msgengine.c.
References GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_SetIntValue(), and GWEN_MsgEngine__GetGlobalValues().

| void GWEN_MsgEngine_SetTypeCheckFunction | ( | GWEN_MSGENGINE * | e, |
| GWEN_MSGENGINE_TYPECHECK_PTR | p ) |
Definition at line 319 of file msgengine.c.
| void GWEN_MsgEngine_SetTypeReadFunction | ( | GWEN_MSGENGINE * | e, |
| GWEN_MSGENGINE_TYPEREAD_PTR | p ) |
Definition at line 285 of file msgengine.c.
| void GWEN_MsgEngine_SetTypeWriteFunction | ( | GWEN_MSGENGINE * | e, |
| GWEN_MSGENGINE_TYPEWRITE_PTR | p ) |
Definition at line 302 of file msgengine.c.
| 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.
Definition at line 3509 of file msgengine.c.
References GWEN_DB_FLAGS_DEFAULT, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_SetCharValue(), and GWEN_MsgEngine__GetGlobalValues().

| int GWEN_MsgEngine_ShowMessage | ( | GWEN_MSGENGINE * | e, |
| const char * | typ, | ||
| const char * | msgName, | ||
| int | msgVersion, | ||
| uint32_t | flags ) |
Deprecated, use GWEN_MsgEngine_ListMessage instead.
Definition at line 2481 of file msgengine.c.
References DBG_ERROR, DBG_INFO, GWEN_LOGDOMAIN, GWEN_MsgEngine__ShowGroup(), GWEN_MsgEngine_FindNodeByProperty(), GWEN_StringList_free(), and GWEN_StringList_new().

| int GWEN_MsgEngine_SkipSegment | ( | GWEN_UNUSED GWEN_MSGENGINE * | e, |
| GWEN_BUFFER * | msgbuf, | ||
| unsigned char | escapeChar, | ||
| unsigned char | delimiter ) |
Definition at line 3574 of file msgengine.c.
References DBG_ERROR, DBG_INFO, GWEN_Buffer_GetBytesLeft(), GWEN_Buffer_GetPos(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_IncrementPos(), GWEN_Buffer_ReadByte(), GWEN_LOGDOMAIN, and GWEN_UNUSED.
Referenced by GWEN_MsgEngine_ReadMessage(), and GWEN_MsgEngine_SkipSegment().


| 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.
Definition at line 4031 of file msgengine.c.
Referenced by GWEN_MsgEngine_SkipSegment().

| int GWEN_MsgEngine_TrustedData_AddPos | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td, |
| unsigned int | pos ) |
Definition at line 3913 of file msgengine.c.
Referenced by GWEN_MsgEngine_AddTrustInfo().

| int GWEN_MsgEngine_TrustedData_CreateReplacements | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |
Definition at line 3944 of file msgengine.c.
| void GWEN_MsgEngine_TrustedData_free | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |
Definition at line 3853 of file msgengine.c.
References GWEN_FREE_OBJECT.
Referenced by GWEN_MsgEngine_free().

| const char * GWEN_MsgEngine_TrustedData_GetData | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |
Definition at line 3873 of file msgengine.c.
| const char * GWEN_MsgEngine_TrustedData_GetDescription | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |
Definition at line 3889 of file msgengine.c.
| int GWEN_MsgEngine_TrustedData_GetFirstPos | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |
Definition at line 3925 of file msgengine.c.
References GWEN_MsgEngine_TrustedData_GetNextPos().

| GWEN_MSGENGINE_TRUSTEDDATA * GWEN_MsgEngine_TrustedData_GetNext | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |
Definition at line 3865 of file msgengine.c.
| int GWEN_MsgEngine_TrustedData_GetNextPos | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |
Definition at line 3934 of file msgengine.c.
Referenced by GWEN_MsgEngine_TrustedData_GetFirstPos().

| const char * GWEN_MsgEngine_TrustedData_GetReplacement | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |
Definition at line 3905 of file msgengine.c.
| unsigned int GWEN_MsgEngine_TrustedData_GetSize | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |
Definition at line 3881 of file msgengine.c.
| GWEN_MSGENGINE_TRUSTLEVEL GWEN_MsgEngine_TrustedData_GetTrustLevel | ( | GWEN_MSGENGINE_TRUSTEDDATA * | td | ) |
Definition at line 3897 of file msgengine.c.
| GWEN_MSGENGINE_TRUSTEDDATA * GWEN_MsgEngine_TrustedData_new | ( | const char * | data, |
| unsigned int | size, | ||
| const char * | description, | ||
| GWEN_MSGENGINE_TRUSTLEVEL | trustLevel ) |
Definition at line 3831 of file msgengine.c.
References GWEN_NEW_OBJECT.
Referenced by GWEN_MsgEngine_AddTrustInfo().
