16#include "tuya_cloud_types.h"
24#define JRPC_PASER_ERROR -32700
25#define JPRC_INVALID_REQUEST -32600
26#define JPRC_METHOD_NOT_FOUND -32601
59int jrpc_create_request(
jrpc_msg_t *msg,
char *method,
int id);
68int jrpc_create_response(
jrpc_msg_t *msg,
int id);
79int jrpc_create_error(
jrpc_msg_t *msg,
int id,
int code,
char *message);
88int jrpc_create_notification(
jrpc_msg_t *msg,
char *method);
100int jrpc_write_int(
jrpc_msg_t *msg, jrpc_type_t type,
char *key,
int value);
111int jrpc_write_string(
jrpc_msg_t *msg, jrpc_type_t type,
char *key,
char *value);
123int jrpc_read_int(
jrpc_msg_t *msg, jrpc_type_t type,
char *key,
int *value);
134int jrpc_read_string(
jrpc_msg_t *msg, jrpc_type_t type,
char *key,
char **value);
143int jrpc_read_method(
jrpc_msg_t *msg,
char **method);
153int jrpc_read_error(
jrpc_msg_t *msg,
int *code,
char **message);
165int jrpc_write_binary(
jrpc_msg_t *msg, jrpc_type_t type,
char *key, uint8_t *binary, uint16_t size);
177int jrpc_read_binary(
jrpc_msg_t *msg, jrpc_type_t type,
char *key, uint8_t **binary, uint16_t *size);
Definition: json_rpc.h:42
Definition: ty_cJSON.h:104