channel_defs.h
Go to the documentation of this file.
1 #ifndef NVIM_MSGPACK_RPC_CHANNEL_DEFS_H
2 #define NVIM_MSGPACK_RPC_CHANNEL_DEFS_H
3 
4 #include <stdbool.h>
5 #include <uv.h>
6 #include <msgpack.h>
7 
9 #include "nvim/event/socket.h"
10 #include "nvim/event/process.h"
11 #include "nvim/vim.h"
12 
13 typedef struct Channel Channel;
14 
15 typedef struct {
16  uint32_t request_id;
17  bool returned, errored;
20 
21 typedef struct {
26  uint32_t request_id;
27 } RequestEvent;
28 
29 typedef struct {
30  PMap(cstr_t) *subscribed_events;
31  bool closed;
32  msgpack_unpacker *unpacker;
33  uint32_t next_request_id;
34  kvec_t(ChannelCallFrame *) call_stack;
35  Dictionary info;
36 } RpcState;
37 
38 #endif // NVIM_MSGPACK_RPC_CHANNEL_DEFS_H
uint32_t request_id
Definition: channel_defs.h:26
uint32_t next_request_id
Definition: channel_defs.h:33
Definition: channel.h:57
#define PMap(T)
Definition: map_defs.h:10
Channel * channel
Definition: channel_defs.h:23
Object result
Definition: channel_defs.h:18
Definition: defs.h:114
const char * cstr_t
Definition: map_defs.h:6
msgpack_unpacker * unpacker
Definition: channel_defs.h:32
Definition: channel_defs.h:29
Definition: defs.h:87
Array args
Definition: channel_defs.h:25
MessageType type
Definition: channel_defs.h:22
MsgpackRpcRequestHandler handler
Definition: channel_defs.h:24
Definition: defs.h:94
Definition: channel_defs.h:21
MessageType
Definition: defs.h:31
bool returned
Definition: channel_defs.h:17
#define kvec_t(type)
Definition: kvec.h:53
Definition: channel_defs.h:15
bool closed
Definition: channel_defs.h:31
uint32_t request_id
Definition: channel_defs.h:16
Definition: dispatch.h:12