diff options
author | Scott Prager <splinterofchaos@gmail.com> | 2014-11-10 13:58:37 -0500 |
---|---|---|
committer | Scott Prager <splinterofchaos@gmail.com> | 2015-04-13 10:20:42 -0400 |
commit | 676133aa9b20923e387b77f95d5df55803a5842e (patch) | |
tree | 2772e7b0e622f69e817e9d78e6e5bfa4e6dd94e8 /src/nvim/api/private/defs.h | |
parent | 8d59e74f6ca619f9466cbb8bda107ec8bf399915 (diff) | |
download | rneovim-676133aa9b20923e387b77f95d5df55803a5842e.tar.gz rneovim-676133aa9b20923e387b77f95d5df55803a5842e.tar.bz2 rneovim-676133aa9b20923e387b77f95d5df55803a5842e.zip |
msgpack: Allow notifications to execute commands.
Consider: `let vim = rpcstart('nvim', ['--embed'])`
Allows `rpcnotify(vim, ...)` to work like an asynchronous
`rpcrequest(nvim, ...)`.
Helped-by: Michael Reed <m.reed@mykolab.com>
Helped-by: Justin M. Keyes <>
Diffstat (limited to 'src/nvim/api/private/defs.h')
-rw-r--r-- | src/nvim/api/private/defs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/api/private/defs.h b/src/nvim/api/private/defs.h index 76ac23a521..6c8e324649 100644 --- a/src/nvim/api/private/defs.h +++ b/src/nvim/api/private/defs.h @@ -22,6 +22,15 @@ typedef enum { kErrorTypeValidation } ErrorType; +typedef enum { + kMessageTypeRequest, + kMessageTypeResponse, + kMessageTypeNotification +} MessageType; + +/// Used as the message ID of notifications. +#define NO_RESPONSE UINT64_MAX + typedef struct { ErrorType type; char msg[1024]; |