89 #define LWSJRPCBP_REQ_START_S "{\"jsonrpc\":\"2.0\",\"method\":\"%s\""
91 #define LWSJRPCBP_REQ_VERSION_S ",\"version\":\"%s\""
93 #define LWSJRPCBP_REQ_PARAMS ",\"params\":"
95 #define LWSJRPCBP_REQ_NOTIF_END "}"
97 #define LWSJRPCBP_REQ_ID_END_S ",\"id\":%s}"
104 #define LWSJRPCBP_RESP_RESULT "{\"jsonrpc\":\"2.0\",\"result\":"
106 #define LWSJRPCBP_RESP_ID_END_S ",\"id\":%s}"
109 #define LWSJRPCBP_RESP_ERROR_D "{\"jsonrpc\":\"2.0\",\"error\":{\"code\":%d"
111 #define LWSJRPCBP_RESP_ERROR_MSG_S ",\"message\":\"%s\""
113 #define LWSJRPCBP_RESP_ERROR_DATA ",\"data\":"
115 #define LWSJRPCBP_RESP_ERROR_END "}"
168 const char *buf,
size_t l,
struct lws_jrpc_obj **r);
@ LJRPC_CBRET_WANT_TO_EMIT
struct lws_jrpc_method lws_jrpc_method_t
LWS_VISIBLE LWS_EXTERN void * lws_jrpc_obj_get_opaque(const struct lws_jrpc_obj *r)
LWS_VISIBLE LWS_EXTERN void lws_jrpc_obj_destroy(struct lws_jrpc_obj **_r)
LWS_VISIBLE LWS_EXTERN struct lws_jrpc * lws_jrpc_create(const lws_jrpc_method_t *methods, void *opaque)
LWS_VISIBLE LWS_EXTERN void lws_jrpc_destroy(struct lws_jrpc **jrpc)
@ LWSJRPCWKE__SERVER_ERROR_LAST
@ LWSJRPCE__INVALID_MEMBERS
@ LWSJRPCWKE__INVALID_REQUEST
@ LWSJRPCWKE__INVALID_PARAMS
@ LWSJRPCWKE__SERVER_ERROR_FIRST
@ LWSJRPCWKE__INTERNAL_ERROR
@ LWSJRPCWKE__METHOD_NOT_FOUND
@ LWSJRPCWKE__PARSE_ERROR
LWS_VISIBLE LWS_EXTERN int lws_jrpc_obj_parse(struct lws_jrpc *jrpc, int type, void *opaque, const char *buf, size_t l, struct lws_jrpc_obj **r)
LWS_VISIBLE LWS_EXTERN const char * lws_jrpc_obj_id(const struct lws_jrpc_obj *r)
const char *const * paths
signed char(* lejp_callback)(struct lejp_ctx *ctx, char reason)