From de3a515123fa417ecce61efebe4bc117b010c657 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Thu, 16 Jun 2016 13:35:04 +0200 Subject: api: rename "msgpack_rpc/defs.h" to "api/private/dispatch.h" and use the header generator. --- src/nvim/api/private/dispatch.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/nvim/api/private/dispatch.h (limited to 'src/nvim/api') diff --git a/src/nvim/api/private/dispatch.h b/src/nvim/api/private/dispatch.h new file mode 100644 index 0000000000..9047752026 --- /dev/null +++ b/src/nvim/api/private/dispatch.h @@ -0,0 +1,21 @@ +#ifndef NVIM_API_PRIVATE_DISPATCH_H +#define NVIM_API_PRIVATE_DISPATCH_H + +#include "nvim/api/private/defs.h" + +/// The rpc_method_handlers table, used in msgpack_rpc_dispatch(), stores +/// functions of this type. +typedef struct { + Object (*fn)(uint64_t channel_id, + uint64_t request_id, + Array args, + Error *error); + bool async; // function is always safe to run immediately instead of being + // put in a request queue for handling when nvim waits for input. +} MsgpackRpcRequestHandler; + +#ifdef INCLUDE_GENERATED_DECLARATIONS +# include "api/private/dispatch.h.generated.h" +#endif + +#endif // NVIM_API_PRIVATE_DISPATCH_H -- cgit