#include "db_p.h"
#include <gwenhywfar/misc.h>
#include <gwenhywfar/debug.h>
#include <gwenhywfar/path.h>
#include <gwenhywfar/bufferedio.h>
#include <gwenhywfar/text.h>
#include <gwenhywfar/dbio.h>
#include <gwenhywfar/fslock.h>
#include <gwenhywfar/io_file.h>
#include <gwenhywfar/io_memory.h>
#include <gwenhywfar/iomanager.h>
#include <gwenhywfar/fastbuffer.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <sys/types.h>
#include "dbrw.c"
Go to the source code of this file.
void GWEN_DB_ClearNode | ( | GWEN_DB_NODE * | n | ) |
Definition at line 765 of file db.c.
Referenced by GWEN_DB_ClearGroup(), GWEN_DB_GetGroup(), GWEN_DB_SetBinValue(), GWEN_DB_SetCharValue(), GWEN_DB_SetIntValue(), and GWEN_DB_SetPtrValue().
void* GWEN_DB_count_cb | ( | GWEN_UNUSED GWEN_DB_NODE * | node, | |
void * | user_data | |||
) |
Definition at line 1533 of file db.c.
References NULL.
Referenced by GWEN_DB_Groups_Count(), GWEN_DB_Values_Count(), and GWEN_DB_Variables_Count().
GWEN_DB_NODE* GWEN_DB_FindGroup | ( | GWEN_DB_NODE * | n, | |
const char * | name, | |||
int | idx | |||
) |
Definition at line 567 of file db.c.
References DBG_ERROR, GWEN_DB_NodeType_Group, GWEN_LOGDOMAIN, and NULL.
Referenced by GWEN_DB_HandlePath().
GWEN_DB_NODE* GWEN_DB_FindVar | ( | GWEN_DB_NODE * | n, | |
const char * | name, | |||
int | idx | |||
) |
Definition at line 600 of file db.c.
References DBG_ERROR, GWEN_DB_NodeType_Group, GWEN_DB_NodeType_Var, GWEN_LOGDOMAIN, and NULL.
Referenced by GWEN_DB_GetVariableType(), and GWEN_DB_HandlePath().
GWEN_DB_NODE* GWEN_DB_GetNode | ( | GWEN_DB_NODE * | n, | |
const char * | path, | |||
uint32_t | flags | |||
) |
Definition at line 754 of file db.c.
References GWEN_DB_HandlePath(), and GWEN_Path_HandleWithIdx().
Referenced by GWEN_DB__ReadValues(), GWEN_DB_AddCharValue(), GWEN_DB_ClearGroup(), GWEN_DB_DeleteGroup(), GWEN_DB_DeleteVar(), GWEN_DB_GetGroup(), GWEN_DB_GetValue(), GWEN_DB_RemoveCharValue(), GWEN_DB_SetBinValue(), GWEN_DB_SetCharValue(), GWEN_DB_SetIntValue(), GWEN_DB_SetPtrValue(), and GWEN_DB_VariableExists().
GWEN_DB_NODE* GWEN_DB_GetValue | ( | GWEN_DB_NODE * | n, | |
const char * | path, | |||
int | idx | |||
) |
Definition at line 773 of file db.c.
References DBG_VERBOUS, GWEN_DB_GetNode(), GWEN_DB_NodeType_ValueChar, GWEN_DB_NodeType_ValueLast, GWEN_LOGDOMAIN, GWEN_PATH_FLAGS_NAMEMUSTEXIST, GWEN_PATH_FLAGS_PATHMUSTEXIST, GWEN_PATH_FLAGS_VARIABLE, and NULL.
Referenced by GWEN_DB_GetBinValue(), GWEN_DB_GetCharValue(), GWEN_DB_GetIntValue(), GWEN_DB_GetPtrValue(), GWEN_DB_GetValueTypeByPath(), and GWEN_DB_ValueExists().
void* GWEN_DB_HandlePath | ( | const char * | entry, | |
void * | data, | |||
int | idx, | |||
uint32_t | flags | |||
) |
Definition at line 637 of file db.c.
References DBG_INFO, DBG_VERBOUS, GWEN_DB_FindGroup(), GWEN_DB_FindVar(), GWEN_DB_FLAGS_INSERT, GWEN_DB_Group_new(), GWEN_DB_Node_Append(), GWEN_DB_Node_Insert(), GWEN_DB_Var_new(), GWEN_LOGDOMAIN, GWEN_PATH_FLAGS_CREATE_GROUP, GWEN_PATH_FLAGS_CREATE_VAR, GWEN_PATH_FLAGS_LAST, GWEN_PATH_FLAGS_NAMEMUSTEXIST, GWEN_PATH_FLAGS_NAMEMUSTNOTEXIST, GWEN_PATH_FLAGS_PATHCREATE, GWEN_PATH_FLAGS_PATHMUSTEXIST, GWEN_PATH_FLAGS_PATHMUSTNOTEXIST, and GWEN_PATH_FLAGS_VARIABLE.
Referenced by GWEN_DB_GetNode().
void GWEN_DB_Node_Append | ( | GWEN_DB_NODE * | parent, | |
GWEN_DB_NODE * | n | |||
) |
Definition at line 180 of file db.c.
References GWEN_DB_ModifyBranchFlagsUp(), GWEN_DB_Node_Append_UnDirty(), and GWEN_DB_NODE_FLAGS_DIRTY.
Referenced by GWEN_DB__ReadValues(), GWEN_DB_AddCharValue(), GWEN_DB_AddGroup(), GWEN_DB_AddGroupChildren(), GWEN_DB_HandlePath(), GWEN_DB_SetBinValue(), GWEN_DB_SetCharValue(), GWEN_DB_SetIntValue(), and GWEN_DB_SetPtrValue().
void GWEN_DB_Node_Append_UnDirty | ( | GWEN_DB_NODE * | parent, | |
GWEN_DB_NODE * | n | |||
) |
Definition at line 166 of file db.c.
References NULL.
Referenced by GWEN_DB_Node_Append(), and GWEN_DB_Node_dup().
GWEN_DB_NODE* GWEN_DB_Node_dup | ( | const GWEN_DB_NODE * | n | ) |
Definition at line 290 of file db.c.
References DBG_VERBOUS, DBG_WARN, GWEN_DB_Group_new(), GWEN_DB_Node_Append_UnDirty(), GWEN_DB_Node_free(), GWEN_DB_NodeType_Group, GWEN_DB_NodeType_ValueBin, GWEN_DB_NodeType_ValueChar, GWEN_DB_NodeType_ValueInt, GWEN_DB_NodeType_ValuePtr, GWEN_DB_NodeType_Var, GWEN_DB_ValueBin_new(), GWEN_DB_ValueChar_new(), GWEN_DB_ValueInt_new(), GWEN_DB_ValuePtr_new(), GWEN_DB_Var_new(), GWEN_LOGDOMAIN, and NULL.
Referenced by GWEN_DB_AddGroupChildren(), and GWEN_DB_Group_dup().
void GWEN_DB_Node_free | ( | GWEN_DB_NODE * | n | ) |
Definition at line 245 of file db.c.
References DBG_VERBOUS, DBG_WARN, GWEN_DB_NodeType_Group, GWEN_DB_NodeType_ValueBin, GWEN_DB_NodeType_ValueChar, GWEN_DB_NodeType_ValueInt, GWEN_DB_NodeType_ValuePtr, GWEN_DB_NodeType_Var, GWEN_FREE_OBJECT, GWEN_LIST_FINI, GWEN_LOGDOMAIN, and GWEN_Memory_dealloc().
Referenced by GWEN_DB_DeleteGroup(), GWEN_DB_DeleteVar(), GWEN_DB_Group_free(), GWEN_DB_Node_dup(), and GWEN_DB_RemoveCharValue().
void GWEN_DB_Node_Insert | ( | GWEN_DB_NODE * | parent, | |
GWEN_DB_NODE * | n | |||
) |
Definition at line 204 of file db.c.
References GWEN_DB_ModifyBranchFlagsUp(), GWEN_DB_NODE_FLAGS_DIRTY, and GWEN_DB_Node_InsertUnDirty().
Referenced by GWEN_DB_HandlePath(), GWEN_DB_InsertGroup(), GWEN_DB_SetBinValue(), GWEN_DB_SetCharValue(), GWEN_DB_SetIntValue(), and GWEN_DB_SetPtrValue().
void GWEN_DB_Node_InsertUnDirty | ( | GWEN_DB_NODE * | parent, | |
GWEN_DB_NODE * | n | |||
) |
Definition at line 190 of file db.c.
References NULL.
Referenced by GWEN_DB_Node_Insert().
GWEN_DB_NODE* GWEN_DB_Node_new | ( | GWEN_DB_NODE_TYPE | t | ) |
Definition at line 74 of file db.c.
References GWEN_LIST_INIT, and GWEN_NEW_OBJECT.
Referenced by GWEN_DB_Group_new(), GWEN_DB_ValueBin_new(), GWEN_DB_ValueChar_new(), GWEN_DB_ValueInt_new(), GWEN_DB_ValuePtr_new(), and GWEN_DB_Var_new().
void GWEN_DB_Node_Unlink | ( | GWEN_DB_NODE * | n | ) |
Definition at line 230 of file db.c.
References GWEN_DB_ModifyBranchFlagsUp(), GWEN_DB_NODE_FLAGS_DIRTY, and GWEN_DB_Node_Unlink_UnDirty().
Referenced by GWEN_DB_DeleteGroup(), GWEN_DB_DeleteVar(), GWEN_DB_RemoveCharValue(), and GWEN_DB_UnlinkGroup().
void GWEN_DB_Node_Unlink_UnDirty | ( | GWEN_DB_NODE * | n | ) |
Definition at line 214 of file db.c.
References DBG_WARN, GWEN_LOGDOMAIN, and NULL.
Referenced by GWEN_DB_Node_Unlink().
GWEN_DB_NODE* GWEN_DB_ValueBin_new | ( | const void * | data, | |
unsigned int | datasize | |||
) |
Definition at line 86 of file db.c.
References GWEN_DB_Node_new(), GWEN_DB_NodeType_ValueBin, and GWEN_Memory_malloc().
Referenced by GWEN_DB__ReadValues(), GWEN_DB_Node_dup(), and GWEN_DB_SetBinValue().
GWEN_DB_NODE* GWEN_DB_ValueChar_new | ( | const char * | data | ) |
Definition at line 113 of file db.c.
References GWEN_DB_Node_new(), GWEN_DB_NodeType_ValueChar, and GWEN_Memory_strdup().
Referenced by GWEN_DB__ReadValues(), GWEN_DB_AddCharValue(), GWEN_DB_Node_dup(), and GWEN_DB_SetCharValue().
GWEN_DB_NODE* GWEN_DB_ValueInt_new | ( | int | data | ) |
Definition at line 103 of file db.c.
References GWEN_DB_Node_new(), and GWEN_DB_NodeType_ValueInt.
Referenced by GWEN_DB__ReadValues(), GWEN_DB_Node_dup(), and GWEN_DB_SetIntValue().
GWEN_DB_NODE* GWEN_DB_ValuePtr_new | ( | void * | data | ) |
Definition at line 126 of file db.c.
References GWEN_DB_Node_new(), and GWEN_DB_NodeType_ValuePtr.
Referenced by GWEN_DB_Node_dup(), and GWEN_DB_SetPtrValue().
GWEN_DB_NODE* GWEN_DB_Var_new | ( | const char * | name | ) |
Definition at line 151 of file db.c.
References GWEN_DB_Node_new(), GWEN_DB_NodeType_Var, and GWEN_Memory_strdup().
Referenced by GWEN_DB_HandlePath(), and GWEN_DB_Node_dup().