db.h
Go to the documentation of this file.
/***************************************************************************
begin : Tue Sep 09 2003
copyright : (C) 2003-2010 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
* MA 02111-1307 USA *
* *
***************************************************************************/
#ifndef GWENHYWFAR_DB_H
#define GWENHYWFAR_DB_H
#include <gwenhywfar/gwenhywfarapi.h>
#include <gwenhywfar/path.h>
#include <gwenhywfar/fastbuffer.h>
#include <gwenhywfar/types.h>
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
#define GWEN_DB_LINE_MAXSIZE 1024
#define GWEN_DB_FLAGS_ALLOW_EMPTY_STREAM 0x00008000
#define GWEN_DB_FLAGS_OVERWRITE_VARS 0x00010000
#define GWEN_DB_FLAGS_OVERWRITE_GROUPS 0x00020000
#define GWEN_DB_FLAGS_QUOTE_VARNAMES 0x00040000
#define GWEN_DB_FLAGS_QUOTE_VALUES 0x00080000
#define GWEN_DB_FLAGS_WRITE_SUBGROUPS 0x00100000
#define GWEN_DB_FLAGS_DETAILED_GROUPS 0x00200000
#define GWEN_DB_FLAGS_INDEND 0x00400000
#define GWEN_DB_FLAGS_ADD_GROUP_NEWLINES 0x00800000
#define GWEN_DB_FLAGS_USE_COLON 0x01000000
#define GWEN_DB_FLAGS_UNTIL_EMPTY_LINE 0x02000000
#define GWEN_DB_FLAGS_OMIT_TYPES 0x04000000
#define GWEN_DB_FLAGS_APPEND_FILE 0x08000000
#define GWEN_DB_FLAGS_ESCAPE_CHARVALUES 0x10000000
#define GWEN_DB_FLAGS_UNESCAPE_CHARVALUES 0x10000000
#define GWEN_DB_FLAGS_LOCKFILE 0x20000000
#define GWEN_DB_FLAGS_INSERT 0x40000000
#define GWEN_DB_FLAGS_DOSMODE 0x80000000
#define GWEN_DB_FLAGS_DEFAULT \
(\
GWEN_DB_FLAGS_QUOTE_VALUES | \
GWEN_DB_FLAGS_WRITE_SUBGROUPS | \
GWEN_DB_FLAGS_DETAILED_GROUPS | \
GWEN_DB_FLAGS_INDEND | \
GWEN_DB_FLAGS_ADD_GROUP_NEWLINES | \
GWEN_DB_FLAGS_ESCAPE_CHARVALUES | \
GWEN_DB_FLAGS_UNESCAPE_CHARVALUES\
)
#define GWEN_DB_FLAGS_COMPACT \
(\
GWEN_DB_FLAGS_QUOTE_VALUES | \
GWEN_DB_FLAGS_WRITE_SUBGROUPS | \
GWEN_DB_FLAGS_ESCAPE_CHARVALUES | \
GWEN_DB_FLAGS_UNESCAPE_CHARVALUES\
)
#define GWEN_DB_FLAGS_HTTP \
(\
GWEN_DB_FLAGS_USE_COLON |\
GWEN_DB_FLAGS_UNTIL_EMPTY_LINE |\
GWEN_DB_FLAGS_OMIT_TYPES | \
GWEN_DB_FLAGS_DOSMODE \
)
#define GWEN_DB_NODE_FLAGS_DIRTY 0x00000001
#define GWEN_DB_NODE_FLAGS_VOLATILE 0x00000002
#define GWEN_DB_NODE_FLAGS_INHERIT_HASH_MECHANISM 0x00000004
#define GWEN_DB_NODE_FLAGS_SAFE 0x00000008
#define GWEN_DB_DEFAULT_LOCK_TIMEOUT 1000
typedef struct GWEN_DB_NODE GWEN_DB_NODE;
typedef enum {
GWEN_DB_NodeType_Unknown=-1,
GWEN_DB_NodeType_Group=0,
GWEN_DB_NodeType_Var,
GWEN_DB_NodeType_ValueChar,
GWEN_DB_NodeType_ValueInt,
GWEN_DB_NodeType_ValueBin,
GWEN_DB_NodeType_ValuePtr,
GWEN_DB_NodeType_ValueLast
} GWEN_DB_NODE_TYPE;
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_Group_new(const char *name);
GWENHYWFAR_API
void GWEN_DB_Group_free(GWEN_DB_NODE *n);
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_Group_dup(const GWEN_DB_NODE *n);
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_GetFirstGroup(GWEN_DB_NODE *n);
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_GetNextGroup(GWEN_DB_NODE *n);
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_FindFirstGroup(GWEN_DB_NODE *n, const char *name);
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_FindNextGroup(GWEN_DB_NODE *n, const char *name);
typedef void *(*GWEN_DB_NODES_CB)(GWEN_DB_NODE *node, void *user_data);
GWENHYWFAR_API
void *GWEN_DB_Groups_Foreach(GWEN_DB_NODE *node, GWEN_DB_NODES_CB func,
void *user_data);
GWENHYWFAR_API
unsigned int GWEN_DB_Groups_Count(const GWEN_DB_NODE *node);
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_GetParentGroup(GWEN_DB_NODE *n);
GWENHYWFAR_API
const char *GWEN_DB_GetCharValue(GWEN_DB_NODE *n,
const char *path,
int idx,
const char *defVal);
GWENHYWFAR_API
int GWEN_DB_SetCharValue(GWEN_DB_NODE *n,
uint32_t flags,
const char *path,
const char *val);
GWENHYWFAR_API
int GWEN_DB_SetCharValueFromInt(GWEN_DB_NODE *n,
uint32_t flags,
const char *path,
int val);
GWENHYWFAR_API
int GWEN_DB_AddCharValue(GWEN_DB_NODE *n,
const char *path,
const char *val,
int senseCase,
int check);
GWENHYWFAR_API
int GWEN_DB_RemoveCharValue(GWEN_DB_NODE *n,
const char *path,
const char *val,
int senseCase);
GWENHYWFAR_API
int GWEN_DB_GetIntValue(GWEN_DB_NODE *n,
const char *path,
int idx,
int defVal);
GWENHYWFAR_API
int GWEN_DB_SetIntValue(GWEN_DB_NODE *n,
uint32_t flags,
const char *path,
int val);
GWENHYWFAR_API
const void *GWEN_DB_GetBinValue(GWEN_DB_NODE *n,
const char *path,
int idx,
const void *defVal,
unsigned int defValSize,
unsigned int *returnValueSize);
GWENHYWFAR_API
int GWEN_DB_SetBinValue(GWEN_DB_NODE *n,
uint32_t flags,
const char *path,
const void *val,
unsigned int valSize);
GWENHYWFAR_API
void *GWEN_DB_GetPtrValue(GWEN_DB_NODE *n,
const char *path,
int idx,
void *defVal);
GWENHYWFAR_API
int GWEN_DB_SetPtrValue(GWEN_DB_NODE *n,
uint32_t flags,
const char *path,
void *val);
GWENHYWFAR_API
int GWEN_DB_WriteVarValueToBuffer(GWEN_DB_NODE *n, const char *path, int index, GWEN_BUFFER *dstBuf);
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_GetGroup(GWEN_DB_NODE *n,
uint32_t flags,
const char *path);
GWENHYWFAR_API
const char *GWEN_DB_GroupName(GWEN_DB_NODE *n);
GWENHYWFAR_API
void GWEN_DB_GroupRename(GWEN_DB_NODE *n, const char *newname);
GWENHYWFAR_API
int GWEN_DB_AddGroup(GWEN_DB_NODE *parent, GWEN_DB_NODE *node);
GWENHYWFAR_API
int GWEN_DB_InsertGroup(GWEN_DB_NODE *parent, GWEN_DB_NODE *node);
GWENHYWFAR_API
int GWEN_DB_AddGroupChildren(GWEN_DB_NODE *n, GWEN_DB_NODE *nn);
GWENHYWFAR_API
void GWEN_DB_UnlinkGroup(GWEN_DB_NODE *n);
GWENHYWFAR_API
int GWEN_DB_DeleteGroup(GWEN_DB_NODE *n,
const char *path);
GWENHYWFAR_API
int GWEN_DB_ClearGroup(GWEN_DB_NODE *n,
const char *path);
GWENHYWFAR_API
int GWEN_DB_IsGroup(const GWEN_DB_NODE *n);
GWENHYWFAR_API
uint32_t GWEN_DB_GetNodeFlags(const GWEN_DB_NODE *n);
GWENHYWFAR_API
void GWEN_DB_SetNodeFlags(GWEN_DB_NODE *n,
uint32_t flags);
GWENHYWFAR_API
void GWEN_DB_ModifyBranchFlagsUp(GWEN_DB_NODE *n,
uint32_t newflags,
uint32_t mask);
GWENHYWFAR_API
void GWEN_DB_ModifyBranchFlagsDown(GWEN_DB_NODE *n,
uint32_t newflags,
uint32_t mask);
GWENHYWFAR_API
int GWEN_DB_ReadFromFastBuffer(GWEN_DB_NODE *n,
GWEN_FAST_BUFFER *fb,
uint32_t dbflags);
GWENHYWFAR_API
int GWEN_DB_ReadFromIo(GWEN_DB_NODE *n, GWEN_SYNCIO *sio, uint32_t dbflags);
GWENHYWFAR_API
int GWEN_DB_ReadFile(GWEN_DB_NODE *n,
const char *fname,
uint32_t dbflags);
GWENHYWFAR_API
int GWEN_DB_ReadFromString(GWEN_DB_NODE *n,
const char *str,
int len,
uint32_t dbflags);
GWENHYWFAR_API
int GWEN_DB_WriteToFastBuffer(GWEN_DB_NODE *node,
GWEN_FAST_BUFFER *fb,
uint32_t dbflags);
GWENHYWFAR_API
int GWEN_DB_WriteToIo(GWEN_DB_NODE *node,
GWEN_SYNCIO *sio,
uint32_t dbflags);
GWENHYWFAR_API
int GWEN_DB_WriteFile(GWEN_DB_NODE *n,
const char *fname,
uint32_t dbflags);
GWENHYWFAR_API
int GWEN_DB_WriteToBuffer(GWEN_DB_NODE *n,
GWEN_BUFFER *buf,
uint32_t dbflags);
GWENHYWFAR_API
int GWEN_DB_ReadFileAs(GWEN_DB_NODE *n,
const char *fname,
const char *type,
GWEN_DB_NODE *params,
uint32_t dbflags);
GWENHYWFAR_API
int GWEN_DB_WriteFileAs(GWEN_DB_NODE *n,
const char *fname,
const char *type,
GWEN_DB_NODE *params,
uint32_t dbflags);
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_GetFirstVar(GWEN_DB_NODE *n);
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_GetNextVar(GWEN_DB_NODE *n);
GWENHYWFAR_API
const char *GWEN_DB_VariableName(GWEN_DB_NODE *n);
GWENHYWFAR_API
void GWEN_DB_VariableRename(GWEN_DB_NODE *n, const char *newname);
GWENHYWFAR_API
void *GWEN_DB_Variables_Foreach(GWEN_DB_NODE *node, GWEN_DB_NODES_CB func,
void *user_data);
GWENHYWFAR_API
unsigned int GWEN_DB_Variables_Count(const GWEN_DB_NODE *node);
GWENHYWFAR_API
GWEN_DB_NODE_TYPE GWEN_DB_GetVariableType(GWEN_DB_NODE *n,
const char *p);
GWENHYWFAR_API
int GWEN_DB_DeleteVar(GWEN_DB_NODE *n,
const char *path);
GWENHYWFAR_API
int GWEN_DB_VariableExists(GWEN_DB_NODE *n,
const char *path);
GWENHYWFAR_API
int GWEN_DB_ValueExists(GWEN_DB_NODE *n,
const char *path,
unsigned int idx);
GWENHYWFAR_API
int GWEN_DB_IsVariable(const GWEN_DB_NODE *n);
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_FindFirstVar(GWEN_DB_NODE *n, const char *name);
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_FindNextVar(GWEN_DB_NODE *n, const char *name);
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_GetFirstValue(GWEN_DB_NODE *n);
GWENHYWFAR_API
GWEN_DB_NODE *GWEN_DB_GetNextValue(GWEN_DB_NODE *n);
GWENHYWFAR_API
void *GWEN_DB_Values_Foreach(GWEN_DB_NODE *node, GWEN_DB_NODES_CB func,
void *user_data);
GWENHYWFAR_API
unsigned int GWEN_DB_Values_Count(const GWEN_DB_NODE *node);
GWENHYWFAR_API
GWEN_DB_NODE_TYPE GWEN_DB_GetValueType(GWEN_DB_NODE *n);
GWENHYWFAR_API
GWEN_DB_NODE_TYPE GWEN_DB_GetValueTypeByPath(GWEN_DB_NODE *n,
const char *p,
unsigned int i);
GWENHYWFAR_API
const char *GWEN_DB_GetCharValueFromNode(const GWEN_DB_NODE *n);
GWENHYWFAR_API
int GWEN_DB_SetCharValueInNode(GWEN_DB_NODE *n, const char *s);
GWENHYWFAR_API
int GWEN_DB_GetIntValueFromNode(const GWEN_DB_NODE *n);
GWENHYWFAR_API
const void *GWEN_DB_GetBinValueFromNode(const GWEN_DB_NODE *n,
unsigned int *size);
GWENHYWFAR_API
int GWEN_DB_IsValue(const GWEN_DB_NODE *n);
GWENHYWFAR_API
void GWEN_DB_Dump(GWEN_DB_NODE *n, int insert);
GWENHYWFAR_API
int GWEN_DB_ReplaceVars(GWEN_DB_NODE *db, const char *s, GWEN_BUFFER *dbuf);
#ifdef __cplusplus
}
#endif
#endif
GWEN_DB_WriteToFastBuffer
GWENHYWFAR_API int GWEN_DB_WriteToFastBuffer(GWEN_DB_NODE *node, GWEN_FAST_BUFFER *fb, uint32_t dbflags)
GWEN_DB_ReadFromString
GWENHYWFAR_API int GWEN_DB_ReadFromString(GWEN_DB_NODE *n, const char *str, int len, uint32_t dbflags)
GWEN_DB_AddGroup
GWENHYWFAR_API int GWEN_DB_AddGroup(GWEN_DB_NODE *parent, GWEN_DB_NODE *node)
GWEN_DB_Dump
GWENHYWFAR_API void GWEN_DB_Dump(GWEN_DB_NODE *n, int insert)
GWEN_DB_GetFirstValue
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_GetFirstValue(GWEN_DB_NODE *n)
GWEN_DB_Group_new
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_Group_new(const char *name)
GWEN_DB_SetCharValueFromInt
GWENHYWFAR_API int GWEN_DB_SetCharValueFromInt(GWEN_DB_NODE *n, uint32_t flags, const char *path, int val)
GWEN_DB_DeleteVar
GWENHYWFAR_API int GWEN_DB_DeleteVar(GWEN_DB_NODE *n, const char *path)
GWEN_DB_GetFirstVar
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_GetFirstVar(GWEN_DB_NODE *n)
GWEN_DB_GetIntValue
GWENHYWFAR_API int GWEN_DB_GetIntValue(GWEN_DB_NODE *n, const char *path, int idx, int defVal)
GWEN_DB_GetNextVar
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_GetNextVar(GWEN_DB_NODE *n)
GWEN_DB_ReadFile
GWENHYWFAR_API int GWEN_DB_ReadFile(GWEN_DB_NODE *n, const char *fname, uint32_t dbflags)
GWEN_DB_GetParentGroup
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_GetParentGroup(GWEN_DB_NODE *n)
GWEN_DB_SetBinValue
GWENHYWFAR_API int GWEN_DB_SetBinValue(GWEN_DB_NODE *n, uint32_t flags, const char *path, const void *val, unsigned int valSize)
GWEN_DB_VariableExists
GWENHYWFAR_API int GWEN_DB_VariableExists(GWEN_DB_NODE *n, const char *path)
GWEN_DB_VariableName
GWENHYWFAR_API const char * GWEN_DB_VariableName(GWEN_DB_NODE *n)
GWEN_DB_Group_free
GWENHYWFAR_API void GWEN_DB_Group_free(GWEN_DB_NODE *n)
GWEN_DB_GetPtrValue
GWENHYWFAR_API void * GWEN_DB_GetPtrValue(GWEN_DB_NODE *n, const char *path, int idx, void *defVal)
GWEN_DB_NODES_CB
void *(* GWEN_DB_NODES_CB)(GWEN_DB_NODE *node, void *user_data)
Definition db.h:378
GWEN_DB_ModifyBranchFlagsUp
GWENHYWFAR_API void GWEN_DB_ModifyBranchFlagsUp(GWEN_DB_NODE *n, uint32_t newflags, uint32_t mask)
GWEN_DB_IsValue
GWENHYWFAR_API int GWEN_DB_IsValue(const GWEN_DB_NODE *n)
GWEN_DB_Variables_Foreach
GWENHYWFAR_API void * GWEN_DB_Variables_Foreach(GWEN_DB_NODE *node, GWEN_DB_NODES_CB func, void *user_data)
GWEN_DB_GetNodeFlags
GWENHYWFAR_API uint32_t GWEN_DB_GetNodeFlags(const GWEN_DB_NODE *n)
GWEN_DB_Variables_Count
GWENHYWFAR_API unsigned int GWEN_DB_Variables_Count(const GWEN_DB_NODE *node)
GWEN_DB_SetPtrValue
GWENHYWFAR_API int GWEN_DB_SetPtrValue(GWEN_DB_NODE *n, uint32_t flags, const char *path, void *val)
GWEN_DB_GetNextGroup
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_GetNextGroup(GWEN_DB_NODE *n)
GWEN_DB_FindNextGroup
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_FindNextGroup(GWEN_DB_NODE *n, const char *name)
GWEN_DB_WriteVarValueToBuffer
GWENHYWFAR_API int GWEN_DB_WriteVarValueToBuffer(GWEN_DB_NODE *n, const char *path, int index, GWEN_BUFFER *dstBuf)
GWEN_DB_GetCharValueFromNode
GWENHYWFAR_API const char * GWEN_DB_GetCharValueFromNode(const GWEN_DB_NODE *n)
GWEN_DB_ValueExists
GWENHYWFAR_API int GWEN_DB_ValueExists(GWEN_DB_NODE *n, const char *path, unsigned int idx)
GWEN_DB_ReadFromIo
GWENHYWFAR_API int GWEN_DB_ReadFromIo(GWEN_DB_NODE *n, GWEN_SYNCIO *sio, uint32_t dbflags)
GWEN_DB_WriteToIo
GWENHYWFAR_API int GWEN_DB_WriteToIo(GWEN_DB_NODE *node, GWEN_SYNCIO *sio, uint32_t dbflags)
GWEN_DB_ModifyBranchFlagsDown
GWENHYWFAR_API void GWEN_DB_ModifyBranchFlagsDown(GWEN_DB_NODE *n, uint32_t newflags, uint32_t mask)
GWEN_DB_DeleteGroup
GWENHYWFAR_API int GWEN_DB_DeleteGroup(GWEN_DB_NODE *n, const char *path)
GWEN_DB_WriteFile
GWENHYWFAR_API int GWEN_DB_WriteFile(GWEN_DB_NODE *n, const char *fname, uint32_t dbflags)
GWEN_DB_ReadFromFastBuffer
GWENHYWFAR_API int GWEN_DB_ReadFromFastBuffer(GWEN_DB_NODE *n, GWEN_FAST_BUFFER *fb, uint32_t dbflags)
GWEN_DB_ReplaceVars
GWENHYWFAR_API int GWEN_DB_ReplaceVars(GWEN_DB_NODE *db, const char *s, GWEN_BUFFER *dbuf)
GWEN_DB_Group_dup
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_Group_dup(const GWEN_DB_NODE *n)
GWEN_DB_SetNodeFlags
GWENHYWFAR_API void GWEN_DB_SetNodeFlags(GWEN_DB_NODE *n, uint32_t flags)
GWEN_DB_WriteToBuffer
GWENHYWFAR_API int GWEN_DB_WriteToBuffer(GWEN_DB_NODE *n, GWEN_BUFFER *buf, uint32_t dbflags)
GWEN_DB_SetIntValue
GWENHYWFAR_API int GWEN_DB_SetIntValue(GWEN_DB_NODE *n, uint32_t flags, const char *path, int val)
GWEN_DB_VariableRename
GWENHYWFAR_API void GWEN_DB_VariableRename(GWEN_DB_NODE *n, const char *newname)
GWEN_DB_GetBinValue
GWENHYWFAR_API const void * GWEN_DB_GetBinValue(GWEN_DB_NODE *n, const char *path, int idx, const void *defVal, unsigned int defValSize, unsigned int *returnValueSize)
GWEN_DB_NODE_TYPE
GWEN_DB_NODE_TYPE
Definition db.h:233
GWEN_DB_NodeType_ValueInt
@ GWEN_DB_NodeType_ValueInt
Definition db.h:243
GWEN_DB_NodeType_Group
@ GWEN_DB_NodeType_Group
Definition db.h:237
GWEN_DB_NodeType_ValueChar
@ GWEN_DB_NodeType_ValueChar
Definition db.h:241
GWEN_DB_NodeType_ValuePtr
@ GWEN_DB_NodeType_ValuePtr
Definition db.h:247
GWEN_DB_NodeType_ValueLast
@ GWEN_DB_NodeType_ValueLast
Definition db.h:249
GWEN_DB_NodeType_Var
@ GWEN_DB_NodeType_Var
Definition db.h:239
GWEN_DB_NodeType_Unknown
@ GWEN_DB_NodeType_Unknown
Definition db.h:235
GWEN_DB_NodeType_ValueBin
@ GWEN_DB_NodeType_ValueBin
Definition db.h:245
GWEN_DB_GetBinValueFromNode
GWENHYWFAR_API const void * GWEN_DB_GetBinValueFromNode(const GWEN_DB_NODE *n, unsigned int *size)
GWEN_DB_GetNextValue
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_GetNextValue(GWEN_DB_NODE *n)
GWEN_DB_Values_Count
GWENHYWFAR_API unsigned int GWEN_DB_Values_Count(const GWEN_DB_NODE *node)
GWEN_DB_Groups_Count
GWENHYWFAR_API unsigned int GWEN_DB_Groups_Count(const GWEN_DB_NODE *node)
GWEN_DB_IsVariable
GWENHYWFAR_API int GWEN_DB_IsVariable(const GWEN_DB_NODE *n)
GWEN_DB_RemoveCharValue
GWENHYWFAR_API int GWEN_DB_RemoveCharValue(GWEN_DB_NODE *n, const char *path, const char *val, int senseCase)
GWEN_DB_AddGroupChildren
GWENHYWFAR_API int GWEN_DB_AddGroupChildren(GWEN_DB_NODE *n, GWEN_DB_NODE *nn)
GWEN_DB_Values_Foreach
GWENHYWFAR_API void * GWEN_DB_Values_Foreach(GWEN_DB_NODE *node, GWEN_DB_NODES_CB func, void *user_data)
GWEN_DB_FindFirstVar
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_FindFirstVar(GWEN_DB_NODE *n, const char *name)
GWEN_DB_GetValueType
GWENHYWFAR_API GWEN_DB_NODE_TYPE GWEN_DB_GetValueType(GWEN_DB_NODE *n)
GWEN_DB_SetCharValue
GWENHYWFAR_API int GWEN_DB_SetCharValue(GWEN_DB_NODE *n, uint32_t flags, const char *path, const char *val)
GWEN_DB_WriteFileAs
GWENHYWFAR_API int GWEN_DB_WriteFileAs(GWEN_DB_NODE *n, const char *fname, const char *type, GWEN_DB_NODE *params, uint32_t dbflags)
GWEN_DB_IsGroup
GWENHYWFAR_API int GWEN_DB_IsGroup(const GWEN_DB_NODE *n)
GWEN_DB_AddCharValue
GWENHYWFAR_API int GWEN_DB_AddCharValue(GWEN_DB_NODE *n, const char *path, const char *val, int senseCase, int check)
GWEN_DB_GetIntValueFromNode
GWENHYWFAR_API int GWEN_DB_GetIntValueFromNode(const GWEN_DB_NODE *n)
GWEN_DB_GetFirstGroup
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_GetFirstGroup(GWEN_DB_NODE *n)
GWEN_DB_GroupName
GWENHYWFAR_API const char * GWEN_DB_GroupName(GWEN_DB_NODE *n)
GWEN_DB_GroupRename
GWENHYWFAR_API void GWEN_DB_GroupRename(GWEN_DB_NODE *n, const char *newname)
GWEN_DB_SetCharValueInNode
GWENHYWFAR_API int GWEN_DB_SetCharValueInNode(GWEN_DB_NODE *n, const char *s)
GWEN_DB_FindNextVar
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_FindNextVar(GWEN_DB_NODE *n, const char *name)
GWEN_DB_ReadFileAs
GWENHYWFAR_API int GWEN_DB_ReadFileAs(GWEN_DB_NODE *n, const char *fname, const char *type, GWEN_DB_NODE *params, uint32_t dbflags)
GWEN_DB_InsertGroup
GWENHYWFAR_API int GWEN_DB_InsertGroup(GWEN_DB_NODE *parent, GWEN_DB_NODE *node)
GWEN_DB_GetCharValue
GWENHYWFAR_API const char * GWEN_DB_GetCharValue(GWEN_DB_NODE *n, const char *path, int idx, const char *defVal)
GWEN_DB_ClearGroup
GWENHYWFAR_API int GWEN_DB_ClearGroup(GWEN_DB_NODE *n, const char *path)
GWEN_DB_FindFirstGroup
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_FindFirstGroup(GWEN_DB_NODE *n, const char *name)
GWEN_DB_NODE
struct GWEN_DB_NODE GWEN_DB_NODE
Definition db.h:228
GWEN_DB_UnlinkGroup
GWENHYWFAR_API void GWEN_DB_UnlinkGroup(GWEN_DB_NODE *n)
GWEN_DB_GetVariableType
GWENHYWFAR_API GWEN_DB_NODE_TYPE GWEN_DB_GetVariableType(GWEN_DB_NODE *n, const char *p)
GWEN_DB_GetGroup
GWENHYWFAR_API GWEN_DB_NODE * GWEN_DB_GetGroup(GWEN_DB_NODE *n, uint32_t flags, const char *path)
GWEN_DB_GetValueTypeByPath
GWENHYWFAR_API GWEN_DB_NODE_TYPE GWEN_DB_GetValueTypeByPath(GWEN_DB_NODE *n, const char *p, unsigned int i)
GWEN_DB_Groups_Foreach
GWENHYWFAR_API void * GWEN_DB_Groups_Foreach(GWEN_DB_NODE *node, GWEN_DB_NODES_CB func, void *user_data)
fastbuffer.h
GWEN_BUFFER
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
Definition buffer.h:38
gwenhywfarapi.h
GWENHYWFAR_API
#define GWENHYWFAR_API
Definition gwenhywfarapi.h:67
path.h
GWEN_FAST_BUFFER
Definition fastbuffer.h:29
GWEN_SYNCIO
struct GWEN_SYNCIO GWEN_SYNCIO
Definition syncio.h:40
types.h