diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-10-20 07:35:10 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-10-21 11:05:49 -0300 |
commit | b280308ac649da61e2a0f40a222eae21af5352c9 (patch) | |
tree | 1ef8433c2aa55e1a5013c05836dc0cbf931a101c /src/nvim/os/msgpack_rpc.h | |
parent | 6e268cd0d40a3652a68b486bdbb421d39295ab48 (diff) | |
download | rneovim-b280308ac649da61e2a0f40a222eae21af5352c9.tar.gz rneovim-b280308ac649da61e2a0f40a222eae21af5352c9.tar.bz2 rneovim-b280308ac649da61e2a0f40a222eae21af5352c9.zip |
msgpack-rpc: Create subdirectory for msgpack-rpc modules
Create the msgpack_rpc subdirectory and move all modules that deal with
msgpack-rpc to it. Also merge msgpack_rpc.c into msgpack_rpc/helpers.c
Diffstat (limited to 'src/nvim/os/msgpack_rpc.h')
-rw-r--r-- | src/nvim/os/msgpack_rpc.h | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/nvim/os/msgpack_rpc.h b/src/nvim/os/msgpack_rpc.h deleted file mode 100644 index 3476d791ea..0000000000 --- a/src/nvim/os/msgpack_rpc.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef NVIM_OS_MSGPACK_RPC_H -#define NVIM_OS_MSGPACK_RPC_H - -#include <stdint.h> - -#include <msgpack.h> - -#include "nvim/func_attr.h" -#include "nvim/api/private/defs.h" -#include "nvim/os/wstream.h" - -typedef enum { - kUnpackResultOk, /// Successfully parsed a document - kUnpackResultFail, /// Got unexpected input - kUnpackResultNeedMore /// Need more data -} UnpackResult; - -/// The rpc_method_handlers table, used in msgpack_rpc_dispatch(), stores -/// functions of this type. -typedef Object (*rpc_method_handler_fn)(uint64_t channel_id, - msgpack_object *req, - Error *error); - - -/// Initializes the msgpack-rpc method table -void msgpack_rpc_init(void); - -void msgpack_rpc_init_function_metadata(Dictionary *metadata); - -/// Dispatches to the actual API function after basic payload validation by -/// `msgpack_rpc_call`. It is responsible for validating/converting arguments -/// to C types, and converting the return value back to msgpack types. -/// The implementation is generated at compile time with metadata extracted -/// from the api/*.h headers, -/// -/// @param channel_id The channel id -/// @param method_id The method id -/// @param req The parsed request object -/// @param error Pointer to error structure -/// @return Some object -Object msgpack_rpc_dispatch(uint64_t channel_id, - msgpack_object *req, - Error *error) - FUNC_ATTR_NONNULL_ARG(2) FUNC_ATTR_NONNULL_ARG(3); - - -#ifdef INCLUDE_GENERATED_DECLARATIONS -# include "os/msgpack_rpc.h.generated.h" -#endif - -#endif // NVIM_OS_MSGPACK_RPC_H |