api: rename "msgpack_rpc/defs.h" to "api/private/dispatch.h" and use the header generator.

This commit is contained in:
Björn Linse
2016-06-16 13:35:04 +02:00
parent 5e59916e84
commit de3a515123
8 changed files with 36 additions and 39 deletions

View File

@@ -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