28#define DISABLE_DEBUGLOG
32#include <gwenhywfar/misc.h>
33#include <gwenhywfar/debug.h>
34#include <gwenhywfar/text.h>
35#include <gwenhywfar/path.h>
46static void *
_handlePath(
const char *entry,
void *data,
int idx, uint32_t flags);
68 free(je->elementData);
78 return je->elementType;
95 return je->elementData;
104 free(je->elementData);
105 je->elementData=(s&&*s)?strdup(s):
NULL;
116 jeChild=GWEN_JsonElement_Tree2_GetFirstChild(je);
126 jeNext=GWEN_JsonElement_Tree2_GetNext(je);
141 return (je && idx==0)?je:
NULL;
161 if (t==0 || (currentType==t)) {
167 if (s2 && strcasecmp(s, s2)==0)
178 je2=GWEN_JsonElement_Tree2_GetFirstChild(je);
186 je=GWEN_JsonElement_Tree2_GetNext(je);
205 je=GWEN_JsonElement_Tree2_GetFirstChild(je);
void GWEN_JsonElement_SetType(GWEN_JSON_ELEM *je, int t)
GWEN_JSON_ELEM * GWEN_JsonElement_FindNextByTypeAndData(const GWEN_JSON_ELEM *je, int t, const char *s)
const char * GWEN_JsonElement_GetData(const GWEN_JSON_ELEM *je)
GWEN_JSON_ELEM * GWEN_JsonElement_FindByIdxTypeAndData(const GWEN_JSON_ELEM *jeSearch, int t, const char *s, int idx)
static void * _handlePath(const char *entry, void *data, int idx, uint32_t flags)
void GWEN_JsonElement_SetData(GWEN_JSON_ELEM *je, const char *s)
GWEN_JSON_ELEM * GWEN_JsonElement_FindFirstByTypeAndData(const GWEN_JSON_ELEM *je, int t, const char *s)
GWEN_JSON_ELEM * GWEN_JsonElement_GetElementByPath(GWEN_JSON_ELEM *je, const char *path, uint32_t flags)
GWEN_JSON_ELEM * GWEN_JsonElement_new(int t, const char *sData)
static GWEN_JSON_ELEM * _findByTypeAndData(GWEN_JSON_ELEM *je, int t, const char *s)
int GWEN_JsonElement_GetType(const GWEN_JSON_ELEM *je)
void GWEN_JsonElement_free(GWEN_JSON_ELEM *je)
@ GWEN_JSON_ELEMTYPE_OBJECT
@ GWEN_JSON_ELEMTYPE_ARRAY
@ GWEN_JSON_ELEMTYPE_UNKNOWN
struct GWEN_JSON_ELEM GWEN_JSON_ELEM
#define GWEN_FREE_OBJECT(varname)
#define GWEN_NEW_OBJECT(typ, varname)
void * GWEN_Path_HandleWithIdx(const char *path, void *data, uint32_t flags, GWEN_PATHIDXHANDLERPTR elementFunction)
#define GWEN_TREE2_FUNCTIONS(t, pr)
#define GWEN_TREE2_FINI(t, element, pr)
#define GWEN_TREE2_INIT(t, element, pr)