Communicate with the instance.
More...
Allow low-level JSON configuration. see also JSON syntax
◆ cloudx1_DeleteClient()
Deletes a client
- Parameters
-
client | the client instance |
◆ cloudx1_FreeJsonAnswer()
void cloudx1_FreeJsonAnswer |
( |
const char * |
json_str | ) |
|
◆ cloudx1_NewClient()
Creates a new client
- Parameters
-
instance | the processing instance |
- Returns
- A new client instance
◆ cloudx1_ProcessJson()
const char * cloudx1_ProcessJson |
( |
struct cloudx1_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 cloudx1_FreeJsonAnswer
- Parameters
-
client | the client instance |
json_str | the JSON request |
need_save | on return will be 1 is saving is required (maybe delayed) |
- Returns
- a JSON answer (to be freed with cloudx1_FreeJsonAnswer)
◆ cloudx1_SaveState()
Save the current state
Needed when cloudx1_ProcessJson returned with need_save to 1. However it can be postponed as much as wanted.
- Parameters
-
instance | the processing instance |
- Returns
- 0 if success, <0 on error