mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
Implement msgpack-rpc helper module
Still missing the `msgpack_rpc_dispatch` function which will be automatically generated by a script
This commit is contained in:
30
src/msgpack_rpc.h
Normal file
30
src/msgpack_rpc.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef NEOVIM_MSGPACK_RPC_H
|
||||
#define NEOVIM_MSGPACK_RPC_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <msgpack.h>
|
||||
|
||||
bool msgpack_rpc_call(msgpack_object *req, msgpack_packer *res);
|
||||
bool msgpack_rpc_dispatch(msgpack_object *req, msgpack_packer *res);
|
||||
void msgpack_rpc_response(msgpack_object *req, msgpack_packer *res);
|
||||
void msgpack_rpc_success(msgpack_object *req, msgpack_packer *res);
|
||||
bool msgpack_rpc_error(msgpack_object *req, msgpack_packer *res, char *msg);
|
||||
char **msgpack_rpc_array_argument(msgpack_object *obj);
|
||||
char *msgpack_rpc_raw_argument(msgpack_object *obj);
|
||||
uint32_t msgpack_rpc_integer_argument(msgpack_object *obj);
|
||||
bool msgpack_rpc_array_result(char **result,
|
||||
msgpack_object *req,
|
||||
msgpack_packer *res);
|
||||
bool msgpack_rpc_raw_result(char *result,
|
||||
msgpack_object *req,
|
||||
msgpack_packer *res);
|
||||
bool msgpack_rpc_integer_result(uint32_t result,
|
||||
msgpack_object *req,
|
||||
msgpack_packer *res);
|
||||
bool msgpack_rpc_void_result(msgpack_object *req, msgpack_packer *res);
|
||||
|
||||
|
||||
#endif // NEOVIM_MSGPACK_RPC_H
|
||||
|
Reference in New Issue
Block a user