|
| const char * | cmcp_log_level_to_name (cmcp_log_level_t lvl) |
| |
| int | cmcp_log_level_from_name (const char *name, cmcp_log_level_t *out_level) |
| |
| void | cmcp_id_init_none (cmcp_id_t *id) |
| |
| void | cmcp_id_init_null (cmcp_id_t *id) |
| |
| void | cmcp_id_init_int (cmcp_id_t *id, long long i) |
| |
| int | cmcp_id_init_string (cmcp_id_t *id, const char *s, size_t n) |
| |
| int | cmcp_id_copy (cmcp_id_t *dst, const cmcp_id_t *src) |
| |
| void | cmcp_id_clear (cmcp_id_t *id) |
| |
| int | cmcp_id_equal (const cmcp_id_t *a, const cmcp_id_t *b) |
| |
| void | cmcp_rpc_error_free (cmcp_rpc_error_t *e) |
| |
| void | cmcp_rpc_message_init (cmcp_rpc_message_t *m) |
| |
| void | cmcp_rpc_message_clear (cmcp_rpc_message_t *m) |
| |
| int | cmcp_rpc_parse (const char *text, size_t len, cmcp_rpc_message_t **out_msgs, size_t *out_count) |
| |
| void | cmcp_rpc_messages_free (cmcp_rpc_message_t *msgs, size_t count) |
| |
| int | cmcp_rpc_from_json (const cmcp_json_t *json, cmcp_rpc_message_t *out) |
| |
| cmcp_json_t * | cmcp_rpc_to_json (const cmcp_rpc_message_t *m) |
| |
| char * | cmcp_rpc_emit (const cmcp_rpc_message_t *m) |
| |
| char * | cmcp_rpc_emit_batch (const cmcp_rpc_message_t *msgs, size_t count) |
| |
| int | cmcp_rpc_make_request (cmcp_rpc_message_t *m, long long id, const char *method, cmcp_json_t *params) |
| |
| int | cmcp_rpc_make_request_str (cmcp_rpc_message_t *m, const char *id_str, size_t id_len, const char *method, cmcp_json_t *params) |
| |
| int | cmcp_rpc_make_notification (cmcp_rpc_message_t *m, const char *method, cmcp_json_t *params) |
| |
| int | cmcp_rpc_make_response (cmcp_rpc_message_t *m, const cmcp_id_t *id, cmcp_json_t *result) |
| |
| int | cmcp_rpc_make_error (cmcp_rpc_message_t *m, const cmcp_id_t *id, int code, const char *message, cmcp_json_t *data) |
| |
| cmcp_rpc_pending_t * | cmcp_rpc_pending_new (void) |
| |
| void | cmcp_rpc_pending_free (cmcp_rpc_pending_t *t) |
| |
| long long | cmcp_rpc_pending_register (cmcp_rpc_pending_t *t, void *userdata) |
| |
| int | cmcp_rpc_pending_take (cmcp_rpc_pending_t *t, long long id, void **out_userdata) |
| |
| size_t | cmcp_rpc_pending_count (cmcp_rpc_pending_t *t) |
| |
| void | cmcp_rpc_pending_set_max_inflight (cmcp_rpc_pending_t *t, size_t cap) |
| |
| size_t | cmcp_rpc_pending_max_inflight (cmcp_rpc_pending_t *t) |
| |
| int | cmcp_rpc_dispatch (const cmcp_rpc_message_t *in, const cmcp_rpc_route_t *routes, size_t n_routes, cmcp_rpc_message_t *out_response) |
| |
JSON-RPC 2.0 message shapes, capability structs, dispatch types.
Shared between server and client.
The "schema" of cMCP at the C-struct level: how a JSON-RPC request/response/notification looks in memory, what the server- and client-side capability objects carry, the JSON-RPC error-code constants. Most callers reach these through cmcp_server.h / cmcp_client.h rather than allocating these types directly.
Definition in file cmcp_types.h.