SOUND4 BIGVOICE.CL Library [1.1.6]
Loading...
Searching...
No Matches
Classes | Functions
Client's JSon config interfacing

Communicate with the instance. More...

Classes

struct  bigvoice_CClientInstance
 

Functions

struct bigvoice_CClientInstancebigvoice_NewClient (struct bigvoice_CInstance *instance)
 
void bigvoice_DeleteClient (struct bigvoice_CClientInstance *client)
 
const char * bigvoice_ProcessJson (struct bigvoice_CClientInstance *client, const char *json_str, int *need_save)
 
void bigvoice_FreeJsonAnswer (const char *json_str)
 
int bigvoice_SaveState (struct bigvoice_CInstance *instance)
 

Detailed Description

Allow low-level JSON configuration. see also JSON syntax

Function Documentation

◆ bigvoice_DeleteClient()

void bigvoice_DeleteClient ( struct bigvoice_CClientInstance client)

Deletes a client

Parameters
clientthe client instance

◆ bigvoice_FreeJsonAnswer()

void bigvoice_FreeJsonAnswer ( const char *  json_str)

Free a JSON answer returned by bigvoice_ProcessJson

Parameters
json_strthe JSON request

◆ bigvoice_NewClient()

struct bigvoice_CClientInstance * bigvoice_NewClient ( struct bigvoice_CInstance instance)

Creates a new client

Remarks
not needed if using a port for JSON socket in Update Management
Parameters
instancethe processing instance
Returns
A new client instance

◆ bigvoice_ProcessJson()

const char * bigvoice_ProcessJson ( struct bigvoice_CClientInstance client,
const char *  json_str,
int *  need_save 
)

Process a JSON request

For syntax, see JSON syntax

Note
In all library, all char* are UTF-8 encoded
Attention
the return value needs to be freed with bigvoice_FreeJsonAnswer
Parameters
clientthe client instance
json_strthe JSON request
need_saveon return will be 1 is saving is required (maybe delayed)
Returns
a JSON answer (to be freed with bigvoice_FreeJsonAnswer)

◆ bigvoice_SaveState()

int bigvoice_SaveState ( struct bigvoice_CInstance instance)

Save the current state

Needed when bigvoice_ProcessJson returned with need_save to 1. However it can be postponed as much as wanted.

Remarks
Works only when update thread is running
Parameters
instancethe processing instance
Returns
0 if success, <0 on error