1 #ifndef JSON_APP_API_H_INCLUDED 2 #define JSON_APP_API_H_INCLUDED 18 #include <lib/assert.h> 19 #define JSON_APP_PARANOID(x) assert(x) 21 #define JSON_APP_PARANOID(x) 38 #define JSON_BASE_ID (0x100) 68 #ifdef JSON_APP_HAS_FLOAT 96 #ifdef JSON_APP_HAS_FLOAT 114 return &Val->u.AsString;
129 #ifdef JSON_APP_HAS_FLOAT 139 return Val->u.AsFloat;
152 return Val->u.AsBool;
void JsonAppClientConnect()
En mobil klient har tilkoblet på serveren.
int JsonAppGetStructBegin(struct toc_var_context_t *State, int Id, int Index)
beginnelse av "get" opphandler for structur.
Applikasjon-spesifikk parameter beskrivelse.
Lett string gjennomføring.
int JsonAppSet(struct toc_var_context_t *State, int Id, int Index, struct val_t *Val)
"set" opphandler.
int JsonAppPullBegin(struct toc_file_context_t *State, uint8_t Id, const char *File)
Beginnelse av "file pull" operasjon.
int JsonAppSetStructBegin(struct toc_var_context_t *State, int Id, int Index)
beginnelse av "set" opphandler for structur.
int JsonAppPushBegin(struct toc_file_context_t *State, uint8_t Id, const char *File, unsigned Size)
Beginnelse av "file push" operasjon.
static int JsonValAsBool(const struct val_t *Val)
val_t tilgangsmetod, gir bool verdi
static float JsonValAsFloat(const struct val_t *Val)
val_t tilgangsmetod, gir float verdi
int JsonAppPush(struct toc_file_context_t *State, unsigned Pos, unsigned Size, const void *Data)
Opdatere en porsjon av fil i "file push" operasjon.
int JsonAppPullEnd(struct toc_file_context_t *State)
"file pull" operasjon er ferdig.
void JsonAppClientDisconnect()
En mobil klienten var frakoblet fra serveren.
int JsonAppSetStructEnd(struct toc_var_context_t *State, int Id, int Index)
slutt av "set" opphandler for structur.
int JsonAppPushEnd(struct toc_file_context_t *State)
"file push" operasjon er ferdig.
int JsonAppGet(struct toc_var_context_t *State, int Id, int Index, struct val_t *Val)
"get" opphandler.
static const struct tiny_seq_t * JsonValAsString(const struct val_t *Val)
val_t tilgangsmetod, gir string verdi
val_type_t
Enumen settes typen på generel verdi.
int JsonAppPull(struct toc_file_context_t *State, unsigned Pos, unsigned Size, void *Data)
Lese en porsjon av fil i "file pull" operasjon.
static int JsonValAsInt(const struct val_t *Val)
val_t tilgangsmetod, gir integer verdi
int JsonAppGetStructEnd(struct toc_var_context_t *State, int Id, int Index)
slutt av "get" opphandler for structur.
int JsonAppClear()
slutt av alle opphandlere for structurer.
void JsonAppGetToc(struct toc_blob_t *Ptr)
Gir "table of content" (TOC).
static bool JsonTocIsArray(const struct toc_t *Entry)