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 <msgpack.h>
5 #include <stdbool.h>
6 #include <uv.h>
7 
9 #include "nvim/event/process.h"
10 #include "nvim/event/socket.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[1];
31  bool closed;
32  msgpack_unpacker *unpacker;
33  uint32_t next_request_id;
34  kvec_t(ChannelCallFrame *) call_stack;
36 } RpcState;
37 
38 #endif // NVIM_MSGPACK_RPC_CHANNEL_DEFS_H
RequestEvent::channel
Channel * channel
Definition: channel_defs.h:23
object
Definition: defs.h:115
Channel
Definition: channel.h:68
process.h
kvec_t
#define kvec_t(type)
Definition: kvec.h:53
MessageType
MessageType
Definition: defs.h:32
RequestEvent
Definition: channel_defs.h:21
RpcState::unpacker
msgpack_unpacker * unpacker
Definition: channel_defs.h:32
ChannelCallFrame::result
Object result
Definition: channel_defs.h:18
RequestEvent::type
MessageType type
Definition: channel_defs.h:22
RequestEvent::args
Array args
Definition: channel_defs.h:25
Array
Definition: defs.h:88
defs.h
RequestEvent::request_id
uint32_t request_id
Definition: channel_defs.h:26
RequestEvent::handler
MsgpackRpcRequestHandler handler
Definition: channel_defs.h:24
MsgpackRpcRequestHandler
Definition: dispatch.h:12
RpcState
Definition: channel_defs.h:29
RpcState::info
Dictionary info
Definition: channel_defs.h:35
ChannelCallFrame::returned
bool returned
Definition: channel_defs.h:17
Dictionary
Definition: defs.h:95
cstr_t
const typedef char * cstr_t
Definition: map_defs.h:6
socket.h
ChannelCallFrame
Definition: channel_defs.h:15
RpcState::next_request_id
uint32_t next_request_id
Definition: channel_defs.h:33
ChannelCallFrame::request_id
uint32_t request_id
Definition: channel_defs.h:16
vim.h
PMap
#define PMap(T)
Definition: map_defs.h:10
RpcState::closed
bool closed
Definition: channel_defs.h:31