1 // Auto generated 2017-10-31 14:35:34.305529 from nvim API level:2
2 #include "auto/neovimapi2.h"
3 #include "neovimconnector.h"
4 #include "msgpackrequest.h"
5 #include "msgpackiodevice.h"
6 #include "util.h"
7 
8 namespace NeovimQt {
9 /* Unpack Neovim EXT types Window, Buffer Tabpage which are all
10  * uint64_t see Neovim:msgpack_rpc_to_
11  */
unpackBufferApi2(MsgpackIODevice * dev,const char * in,quint32 size)12 QVariant unpackBufferApi2(MsgpackIODevice *dev, const char* in, quint32 size)
13 {
14 	msgpack_unpacked result;
15 	msgpack_unpacked_init(&result);
16 	msgpack_unpack_return ret = msgpack_unpack_next(&result, in, size, NULL);
17 
18 	QVariant variant;
19 
20 	if (ret == MSGPACK_UNPACK_SUCCESS) {
21 		switch (result.data.type) {
22 			case MSGPACK_OBJECT_NEGATIVE_INTEGER:
23 				variant = (qint64)result.data.via.i64;
24 				break;
25 			case MSGPACK_OBJECT_POSITIVE_INTEGER:
26 				variant = (quint64)result.data.via.u64;
27 				break;
28 			default:
29 				// TODO it would be nice if we could call back MsgpackIoDevice method or primitive types here
30 				qWarning() << "Unsupported type found for EXT type" << result.data.type << result.data;
31 		}
32 	}
33 
34 	msgpack_unpacked_destroy(&result);
35 	return variant;
36 }
37 #define unpackWindowApi2 unpackBufferApi2
38 #define unpackTabpageApi2 unpackBufferApi2
39 
NeovimApi2(NeovimConnector * c)40 NeovimApi2::NeovimApi2(NeovimConnector *c)
41 :m_c(c)
42 {
43 	// EXT types
44 		m_c->m_dev->registerExtType(0, unpackBufferApi2);
45 		m_c->m_dev->registerExtType(1, unpackWindowApi2);
46 		m_c->m_dev->registerExtType(2, unpackTabpageApi2);
47 		connect(m_c->m_dev, &MsgpackIODevice::notification,
48 			this, &NeovimApi2::neovimNotification);
49 }
50 
51 // Slots
nvim_buf_line_count(int64_t buffer)52 MsgpackRequest* NeovimApi2::nvim_buf_line_count(int64_t buffer)
53 {
54 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_line_count", 1);
55 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_LINE_COUNT);
56 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
57 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
58 	m_c->m_dev->send(buffer);
59 	return r;
60 }
buffer_get_line(int64_t buffer,int64_t index)61 MsgpackRequest* NeovimApi2::buffer_get_line(int64_t buffer, int64_t index)
62 {
63 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_get_line", 2);
64 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_GET_LINE);
65 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
66 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
67 	m_c->m_dev->send(buffer);
68 	m_c->m_dev->send(index);
69 	return r;
70 }
buffer_set_line(int64_t buffer,int64_t index,QByteArray line)71 MsgpackRequest* NeovimApi2::buffer_set_line(int64_t buffer, int64_t index, QByteArray line)
72 {
73 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_set_line", 3);
74 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_SET_LINE);
75 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
76 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
77 	m_c->m_dev->send(buffer);
78 	m_c->m_dev->send(index);
79 	m_c->m_dev->send(line);
80 	return r;
81 }
buffer_del_line(int64_t buffer,int64_t index)82 MsgpackRequest* NeovimApi2::buffer_del_line(int64_t buffer, int64_t index)
83 {
84 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_del_line", 2);
85 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_DEL_LINE);
86 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
87 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
88 	m_c->m_dev->send(buffer);
89 	m_c->m_dev->send(index);
90 	return r;
91 }
buffer_get_line_slice(int64_t buffer,int64_t start,int64_t end,bool include_start,bool include_end)92 MsgpackRequest* NeovimApi2::buffer_get_line_slice(int64_t buffer, int64_t start, int64_t end, bool include_start, bool include_end)
93 {
94 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_get_line_slice", 5);
95 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_GET_LINE_SLICE);
96 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
97 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
98 	m_c->m_dev->send(buffer);
99 	m_c->m_dev->send(start);
100 	m_c->m_dev->send(end);
101 	m_c->m_dev->send(include_start);
102 	m_c->m_dev->send(include_end);
103 	return r;
104 }
nvim_buf_get_lines(int64_t buffer,int64_t start,int64_t end,bool strict_indexing)105 MsgpackRequest* NeovimApi2::nvim_buf_get_lines(int64_t buffer, int64_t start, int64_t end, bool strict_indexing)
106 {
107 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_get_lines", 4);
108 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_LINES);
109 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
110 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
111 	m_c->m_dev->send(buffer);
112 	m_c->m_dev->send(start);
113 	m_c->m_dev->send(end);
114 	m_c->m_dev->send(strict_indexing);
115 	return r;
116 }
buffer_set_line_slice(int64_t buffer,int64_t start,int64_t end,bool include_start,bool include_end,QList<QByteArray> replacement)117 MsgpackRequest* NeovimApi2::buffer_set_line_slice(int64_t buffer, int64_t start, int64_t end, bool include_start, bool include_end, QList<QByteArray> replacement)
118 {
119 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_set_line_slice", 6);
120 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_SET_LINE_SLICE);
121 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
122 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
123 	m_c->m_dev->send(buffer);
124 	m_c->m_dev->send(start);
125 	m_c->m_dev->send(end);
126 	m_c->m_dev->send(include_start);
127 	m_c->m_dev->send(include_end);
128 	m_c->m_dev->sendArrayOf(replacement);
129 	return r;
130 }
nvim_buf_set_lines(int64_t buffer,int64_t start,int64_t end,bool strict_indexing,QList<QByteArray> replacement)131 MsgpackRequest* NeovimApi2::nvim_buf_set_lines(int64_t buffer, int64_t start, int64_t end, bool strict_indexing, QList<QByteArray> replacement)
132 {
133 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_set_lines", 5);
134 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_SET_LINES);
135 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
136 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
137 	m_c->m_dev->send(buffer);
138 	m_c->m_dev->send(start);
139 	m_c->m_dev->send(end);
140 	m_c->m_dev->send(strict_indexing);
141 	m_c->m_dev->sendArrayOf(replacement);
142 	return r;
143 }
nvim_buf_get_var(int64_t buffer,QByteArray name)144 MsgpackRequest* NeovimApi2::nvim_buf_get_var(int64_t buffer, QByteArray name)
145 {
146 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_get_var", 2);
147 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_VAR);
148 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
149 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
150 	m_c->m_dev->send(buffer);
151 	m_c->m_dev->send(name);
152 	return r;
153 }
nvim_buf_get_changedtick(int64_t buffer)154 MsgpackRequest* NeovimApi2::nvim_buf_get_changedtick(int64_t buffer)
155 {
156 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_get_changedtick", 1);
157 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_CHANGEDTICK);
158 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
159 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
160 	m_c->m_dev->send(buffer);
161 	return r;
162 }
nvim_buf_set_var(int64_t buffer,QByteArray name,QVariant value)163 MsgpackRequest* NeovimApi2::nvim_buf_set_var(int64_t buffer, QByteArray name, QVariant value)
164 {
165 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_set_var", 3);
166 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_SET_VAR);
167 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
168 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
169 	m_c->m_dev->send(buffer);
170 	m_c->m_dev->send(name);
171 	m_c->m_dev->send(value);
172 	return r;
173 }
nvim_buf_del_var(int64_t buffer,QByteArray name)174 MsgpackRequest* NeovimApi2::nvim_buf_del_var(int64_t buffer, QByteArray name)
175 {
176 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_del_var", 2);
177 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_DEL_VAR);
178 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
179 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
180 	m_c->m_dev->send(buffer);
181 	m_c->m_dev->send(name);
182 	return r;
183 }
buffer_set_var(int64_t buffer,QByteArray name,QVariant value)184 MsgpackRequest* NeovimApi2::buffer_set_var(int64_t buffer, QByteArray name, QVariant value)
185 {
186 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_set_var", 3);
187 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_SET_VAR);
188 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
189 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
190 	m_c->m_dev->send(buffer);
191 	m_c->m_dev->send(name);
192 	m_c->m_dev->send(value);
193 	return r;
194 }
buffer_del_var(int64_t buffer,QByteArray name)195 MsgpackRequest* NeovimApi2::buffer_del_var(int64_t buffer, QByteArray name)
196 {
197 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_del_var", 2);
198 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_DEL_VAR);
199 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
200 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
201 	m_c->m_dev->send(buffer);
202 	m_c->m_dev->send(name);
203 	return r;
204 }
nvim_buf_get_option(int64_t buffer,QByteArray name)205 MsgpackRequest* NeovimApi2::nvim_buf_get_option(int64_t buffer, QByteArray name)
206 {
207 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_get_option", 2);
208 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_OPTION);
209 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
210 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
211 	m_c->m_dev->send(buffer);
212 	m_c->m_dev->send(name);
213 	return r;
214 }
nvim_buf_set_option(int64_t buffer,QByteArray name,QVariant value)215 MsgpackRequest* NeovimApi2::nvim_buf_set_option(int64_t buffer, QByteArray name, QVariant value)
216 {
217 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_set_option", 3);
218 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_SET_OPTION);
219 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
220 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
221 	m_c->m_dev->send(buffer);
222 	m_c->m_dev->send(name);
223 	m_c->m_dev->send(value);
224 	return r;
225 }
nvim_buf_get_number(int64_t buffer)226 MsgpackRequest* NeovimApi2::nvim_buf_get_number(int64_t buffer)
227 {
228 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_get_number", 1);
229 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_NUMBER);
230 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
231 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
232 	m_c->m_dev->send(buffer);
233 	return r;
234 }
nvim_buf_get_name(int64_t buffer)235 MsgpackRequest* NeovimApi2::nvim_buf_get_name(int64_t buffer)
236 {
237 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_get_name", 1);
238 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_NAME);
239 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
240 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
241 	m_c->m_dev->send(buffer);
242 	return r;
243 }
nvim_buf_set_name(int64_t buffer,QByteArray name)244 MsgpackRequest* NeovimApi2::nvim_buf_set_name(int64_t buffer, QByteArray name)
245 {
246 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_set_name", 2);
247 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_SET_NAME);
248 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
249 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
250 	m_c->m_dev->send(buffer);
251 	m_c->m_dev->send(name);
252 	return r;
253 }
nvim_buf_is_valid(int64_t buffer)254 MsgpackRequest* NeovimApi2::nvim_buf_is_valid(int64_t buffer)
255 {
256 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_is_valid", 1);
257 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_IS_VALID);
258 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
259 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
260 	m_c->m_dev->send(buffer);
261 	return r;
262 }
buffer_insert(int64_t buffer,int64_t lnum,QList<QByteArray> lines)263 MsgpackRequest* NeovimApi2::buffer_insert(int64_t buffer, int64_t lnum, QList<QByteArray> lines)
264 {
265 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_insert", 3);
266 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_INSERT);
267 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
268 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
269 	m_c->m_dev->send(buffer);
270 	m_c->m_dev->send(lnum);
271 	m_c->m_dev->sendArrayOf(lines);
272 	return r;
273 }
nvim_buf_get_mark(int64_t buffer,QByteArray name)274 MsgpackRequest* NeovimApi2::nvim_buf_get_mark(int64_t buffer, QByteArray name)
275 {
276 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_get_mark", 2);
277 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_MARK);
278 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
279 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
280 	m_c->m_dev->send(buffer);
281 	m_c->m_dev->send(name);
282 	return r;
283 }
nvim_buf_add_highlight(int64_t buffer,int64_t src_id,QByteArray hl_group,int64_t line,int64_t col_start,int64_t col_end)284 MsgpackRequest* NeovimApi2::nvim_buf_add_highlight(int64_t buffer, int64_t src_id, QByteArray hl_group, int64_t line, int64_t col_start, int64_t col_end)
285 {
286 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_add_highlight", 6);
287 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_ADD_HIGHLIGHT);
288 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
289 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
290 	m_c->m_dev->send(buffer);
291 	m_c->m_dev->send(src_id);
292 	m_c->m_dev->send(hl_group);
293 	m_c->m_dev->send(line);
294 	m_c->m_dev->send(col_start);
295 	m_c->m_dev->send(col_end);
296 	return r;
297 }
nvim_buf_clear_highlight(int64_t buffer,int64_t src_id,int64_t line_start,int64_t line_end)298 MsgpackRequest* NeovimApi2::nvim_buf_clear_highlight(int64_t buffer, int64_t src_id, int64_t line_start, int64_t line_end)
299 {
300 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_buf_clear_highlight", 4);
301 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_BUF_CLEAR_HIGHLIGHT);
302 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
303 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
304 	m_c->m_dev->send(buffer);
305 	m_c->m_dev->send(src_id);
306 	m_c->m_dev->send(line_start);
307 	m_c->m_dev->send(line_end);
308 	return r;
309 }
nvim_tabpage_list_wins(int64_t tabpage)310 MsgpackRequest* NeovimApi2::nvim_tabpage_list_wins(int64_t tabpage)
311 {
312 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_tabpage_list_wins", 1);
313 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_LIST_WINS);
314 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
315 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
316 	m_c->m_dev->send(tabpage);
317 	return r;
318 }
nvim_tabpage_get_var(int64_t tabpage,QByteArray name)319 MsgpackRequest* NeovimApi2::nvim_tabpage_get_var(int64_t tabpage, QByteArray name)
320 {
321 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_tabpage_get_var", 2);
322 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_GET_VAR);
323 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
324 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
325 	m_c->m_dev->send(tabpage);
326 	m_c->m_dev->send(name);
327 	return r;
328 }
nvim_tabpage_set_var(int64_t tabpage,QByteArray name,QVariant value)329 MsgpackRequest* NeovimApi2::nvim_tabpage_set_var(int64_t tabpage, QByteArray name, QVariant value)
330 {
331 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_tabpage_set_var", 3);
332 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_SET_VAR);
333 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
334 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
335 	m_c->m_dev->send(tabpage);
336 	m_c->m_dev->send(name);
337 	m_c->m_dev->send(value);
338 	return r;
339 }
nvim_tabpage_del_var(int64_t tabpage,QByteArray name)340 MsgpackRequest* NeovimApi2::nvim_tabpage_del_var(int64_t tabpage, QByteArray name)
341 {
342 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_tabpage_del_var", 2);
343 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_DEL_VAR);
344 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
345 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
346 	m_c->m_dev->send(tabpage);
347 	m_c->m_dev->send(name);
348 	return r;
349 }
tabpage_set_var(int64_t tabpage,QByteArray name,QVariant value)350 MsgpackRequest* NeovimApi2::tabpage_set_var(int64_t tabpage, QByteArray name, QVariant value)
351 {
352 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("tabpage_set_var", 3);
353 	r->setFunction(NeovimApi2::NEOVIM_FN_TABPAGE_SET_VAR);
354 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
355 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
356 	m_c->m_dev->send(tabpage);
357 	m_c->m_dev->send(name);
358 	m_c->m_dev->send(value);
359 	return r;
360 }
tabpage_del_var(int64_t tabpage,QByteArray name)361 MsgpackRequest* NeovimApi2::tabpage_del_var(int64_t tabpage, QByteArray name)
362 {
363 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("tabpage_del_var", 2);
364 	r->setFunction(NeovimApi2::NEOVIM_FN_TABPAGE_DEL_VAR);
365 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
366 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
367 	m_c->m_dev->send(tabpage);
368 	m_c->m_dev->send(name);
369 	return r;
370 }
nvim_tabpage_get_win(int64_t tabpage)371 MsgpackRequest* NeovimApi2::nvim_tabpage_get_win(int64_t tabpage)
372 {
373 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_tabpage_get_win", 1);
374 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_GET_WIN);
375 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
376 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
377 	m_c->m_dev->send(tabpage);
378 	return r;
379 }
nvim_tabpage_get_number(int64_t tabpage)380 MsgpackRequest* NeovimApi2::nvim_tabpage_get_number(int64_t tabpage)
381 {
382 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_tabpage_get_number", 1);
383 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_GET_NUMBER);
384 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
385 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
386 	m_c->m_dev->send(tabpage);
387 	return r;
388 }
nvim_tabpage_is_valid(int64_t tabpage)389 MsgpackRequest* NeovimApi2::nvim_tabpage_is_valid(int64_t tabpage)
390 {
391 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_tabpage_is_valid", 1);
392 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_IS_VALID);
393 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
394 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
395 	m_c->m_dev->send(tabpage);
396 	return r;
397 }
nvim_ui_attach(int64_t width,int64_t height,QVariantMap options)398 MsgpackRequest* NeovimApi2::nvim_ui_attach(int64_t width, int64_t height, QVariantMap options)
399 {
400 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_ui_attach", 3);
401 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_UI_ATTACH);
402 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
403 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
404 	m_c->m_dev->send(width);
405 	m_c->m_dev->send(height);
406 	m_c->m_dev->send(options);
407 	return r;
408 }
ui_attach(int64_t width,int64_t height,bool enable_rgb)409 MsgpackRequest* NeovimApi2::ui_attach(int64_t width, int64_t height, bool enable_rgb)
410 {
411 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("ui_attach", 3);
412 	r->setFunction(NeovimApi2::NEOVIM_FN_UI_ATTACH);
413 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
414 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
415 	m_c->m_dev->send(width);
416 	m_c->m_dev->send(height);
417 	m_c->m_dev->send(enable_rgb);
418 	return r;
419 }
nvim_ui_detach()420 MsgpackRequest* NeovimApi2::nvim_ui_detach()
421 {
422 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_ui_detach", 0);
423 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_UI_DETACH);
424 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
425 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
426 	return r;
427 }
nvim_ui_try_resize(int64_t width,int64_t height)428 MsgpackRequest* NeovimApi2::nvim_ui_try_resize(int64_t width, int64_t height)
429 {
430 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_ui_try_resize", 2);
431 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_UI_TRY_RESIZE);
432 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
433 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
434 	m_c->m_dev->send(width);
435 	m_c->m_dev->send(height);
436 	return r;
437 }
nvim_ui_set_option(QByteArray name,QVariant value)438 MsgpackRequest* NeovimApi2::nvim_ui_set_option(QByteArray name, QVariant value)
439 {
440 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_ui_set_option", 2);
441 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_UI_SET_OPTION);
442 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
443 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
444 	m_c->m_dev->send(name);
445 	m_c->m_dev->send(value);
446 	return r;
447 }
nvim_command(QByteArray command)448 MsgpackRequest* NeovimApi2::nvim_command(QByteArray command)
449 {
450 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_command", 1);
451 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_COMMAND);
452 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
453 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
454 	m_c->m_dev->send(command);
455 	return r;
456 }
nvim_feedkeys(QByteArray keys,QByteArray mode,bool escape_csi)457 MsgpackRequest* NeovimApi2::nvim_feedkeys(QByteArray keys, QByteArray mode, bool escape_csi)
458 {
459 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_feedkeys", 3);
460 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_FEEDKEYS);
461 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
462 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
463 	m_c->m_dev->send(keys);
464 	m_c->m_dev->send(mode);
465 	m_c->m_dev->send(escape_csi);
466 	return r;
467 }
nvim_input(QByteArray keys)468 MsgpackRequest* NeovimApi2::nvim_input(QByteArray keys)
469 {
470 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_input", 1);
471 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_INPUT);
472 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
473 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
474 	m_c->m_dev->send(keys);
475 	return r;
476 }
nvim_replace_termcodes(QByteArray str,bool from_part,bool do_lt,bool special)477 MsgpackRequest* NeovimApi2::nvim_replace_termcodes(QByteArray str, bool from_part, bool do_lt, bool special)
478 {
479 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_replace_termcodes", 4);
480 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_REPLACE_TERMCODES);
481 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
482 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
483 	m_c->m_dev->send(str);
484 	m_c->m_dev->send(from_part);
485 	m_c->m_dev->send(do_lt);
486 	m_c->m_dev->send(special);
487 	return r;
488 }
nvim_command_output(QByteArray str)489 MsgpackRequest* NeovimApi2::nvim_command_output(QByteArray str)
490 {
491 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_command_output", 1);
492 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_COMMAND_OUTPUT);
493 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
494 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
495 	m_c->m_dev->send(str);
496 	return r;
497 }
nvim_eval(QByteArray expr)498 MsgpackRequest* NeovimApi2::nvim_eval(QByteArray expr)
499 {
500 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_eval", 1);
501 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_EVAL);
502 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
503 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
504 	m_c->m_dev->send(expr);
505 	return r;
506 }
nvim_call_function(QByteArray fname,QVariantList args)507 MsgpackRequest* NeovimApi2::nvim_call_function(QByteArray fname, QVariantList args)
508 {
509 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_call_function", 2);
510 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_CALL_FUNCTION);
511 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
512 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
513 	m_c->m_dev->send(fname);
514 	m_c->m_dev->send(args);
515 	return r;
516 }
nvim_strwidth(QByteArray str)517 MsgpackRequest* NeovimApi2::nvim_strwidth(QByteArray str)
518 {
519 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_strwidth", 1);
520 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_STRWIDTH);
521 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
522 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
523 	m_c->m_dev->send(str);
524 	return r;
525 }
nvim_list_runtime_paths()526 MsgpackRequest* NeovimApi2::nvim_list_runtime_paths()
527 {
528 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_list_runtime_paths", 0);
529 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_LIST_RUNTIME_PATHS);
530 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
531 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
532 	return r;
533 }
nvim_set_current_dir(QByteArray dir)534 MsgpackRequest* NeovimApi2::nvim_set_current_dir(QByteArray dir)
535 {
536 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_set_current_dir", 1);
537 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_DIR);
538 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
539 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
540 	m_c->m_dev->send(dir);
541 	return r;
542 }
nvim_get_current_line()543 MsgpackRequest* NeovimApi2::nvim_get_current_line()
544 {
545 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_get_current_line", 0);
546 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_GET_CURRENT_LINE);
547 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
548 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
549 	return r;
550 }
nvim_set_current_line(QByteArray line)551 MsgpackRequest* NeovimApi2::nvim_set_current_line(QByteArray line)
552 {
553 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_set_current_line", 1);
554 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_LINE);
555 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
556 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
557 	m_c->m_dev->send(line);
558 	return r;
559 }
nvim_del_current_line()560 MsgpackRequest* NeovimApi2::nvim_del_current_line()
561 {
562 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_del_current_line", 0);
563 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_DEL_CURRENT_LINE);
564 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
565 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
566 	return r;
567 }
nvim_get_var(QByteArray name)568 MsgpackRequest* NeovimApi2::nvim_get_var(QByteArray name)
569 {
570 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_get_var", 1);
571 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_GET_VAR);
572 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
573 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
574 	m_c->m_dev->send(name);
575 	return r;
576 }
nvim_set_var(QByteArray name,QVariant value)577 MsgpackRequest* NeovimApi2::nvim_set_var(QByteArray name, QVariant value)
578 {
579 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_set_var", 2);
580 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_SET_VAR);
581 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
582 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
583 	m_c->m_dev->send(name);
584 	m_c->m_dev->send(value);
585 	return r;
586 }
nvim_del_var(QByteArray name)587 MsgpackRequest* NeovimApi2::nvim_del_var(QByteArray name)
588 {
589 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_del_var", 1);
590 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_DEL_VAR);
591 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
592 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
593 	m_c->m_dev->send(name);
594 	return r;
595 }
vim_set_var(QByteArray name,QVariant value)596 MsgpackRequest* NeovimApi2::vim_set_var(QByteArray name, QVariant value)
597 {
598 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_set_var", 2);
599 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_SET_VAR);
600 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
601 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
602 	m_c->m_dev->send(name);
603 	m_c->m_dev->send(value);
604 	return r;
605 }
vim_del_var(QByteArray name)606 MsgpackRequest* NeovimApi2::vim_del_var(QByteArray name)
607 {
608 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_del_var", 1);
609 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_DEL_VAR);
610 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
611 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
612 	m_c->m_dev->send(name);
613 	return r;
614 }
nvim_get_vvar(QByteArray name)615 MsgpackRequest* NeovimApi2::nvim_get_vvar(QByteArray name)
616 {
617 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_get_vvar", 1);
618 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_GET_VVAR);
619 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
620 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
621 	m_c->m_dev->send(name);
622 	return r;
623 }
nvim_get_option(QByteArray name)624 MsgpackRequest* NeovimApi2::nvim_get_option(QByteArray name)
625 {
626 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_get_option", 1);
627 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_GET_OPTION);
628 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
629 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
630 	m_c->m_dev->send(name);
631 	return r;
632 }
nvim_set_option(QByteArray name,QVariant value)633 MsgpackRequest* NeovimApi2::nvim_set_option(QByteArray name, QVariant value)
634 {
635 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_set_option", 2);
636 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_SET_OPTION);
637 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
638 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
639 	m_c->m_dev->send(name);
640 	m_c->m_dev->send(value);
641 	return r;
642 }
nvim_out_write(QByteArray str)643 MsgpackRequest* NeovimApi2::nvim_out_write(QByteArray str)
644 {
645 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_out_write", 1);
646 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_OUT_WRITE);
647 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
648 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
649 	m_c->m_dev->send(str);
650 	return r;
651 }
nvim_err_write(QByteArray str)652 MsgpackRequest* NeovimApi2::nvim_err_write(QByteArray str)
653 {
654 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_err_write", 1);
655 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_ERR_WRITE);
656 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
657 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
658 	m_c->m_dev->send(str);
659 	return r;
660 }
nvim_err_writeln(QByteArray str)661 MsgpackRequest* NeovimApi2::nvim_err_writeln(QByteArray str)
662 {
663 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_err_writeln", 1);
664 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_ERR_WRITELN);
665 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
666 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
667 	m_c->m_dev->send(str);
668 	return r;
669 }
nvim_list_bufs()670 MsgpackRequest* NeovimApi2::nvim_list_bufs()
671 {
672 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_list_bufs", 0);
673 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_LIST_BUFS);
674 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
675 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
676 	return r;
677 }
nvim_get_current_buf()678 MsgpackRequest* NeovimApi2::nvim_get_current_buf()
679 {
680 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_get_current_buf", 0);
681 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_GET_CURRENT_BUF);
682 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
683 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
684 	return r;
685 }
nvim_set_current_buf(int64_t buffer)686 MsgpackRequest* NeovimApi2::nvim_set_current_buf(int64_t buffer)
687 {
688 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_set_current_buf", 1);
689 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_BUF);
690 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
691 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
692 	m_c->m_dev->send(buffer);
693 	return r;
694 }
nvim_list_wins()695 MsgpackRequest* NeovimApi2::nvim_list_wins()
696 {
697 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_list_wins", 0);
698 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_LIST_WINS);
699 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
700 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
701 	return r;
702 }
nvim_get_current_win()703 MsgpackRequest* NeovimApi2::nvim_get_current_win()
704 {
705 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_get_current_win", 0);
706 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_GET_CURRENT_WIN);
707 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
708 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
709 	return r;
710 }
nvim_set_current_win(int64_t window)711 MsgpackRequest* NeovimApi2::nvim_set_current_win(int64_t window)
712 {
713 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_set_current_win", 1);
714 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_WIN);
715 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
716 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
717 	m_c->m_dev->send(window);
718 	return r;
719 }
nvim_list_tabpages()720 MsgpackRequest* NeovimApi2::nvim_list_tabpages()
721 {
722 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_list_tabpages", 0);
723 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_LIST_TABPAGES);
724 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
725 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
726 	return r;
727 }
nvim_get_current_tabpage()728 MsgpackRequest* NeovimApi2::nvim_get_current_tabpage()
729 {
730 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_get_current_tabpage", 0);
731 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_GET_CURRENT_TABPAGE);
732 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
733 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
734 	return r;
735 }
nvim_set_current_tabpage(int64_t tabpage)736 MsgpackRequest* NeovimApi2::nvim_set_current_tabpage(int64_t tabpage)
737 {
738 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_set_current_tabpage", 1);
739 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_TABPAGE);
740 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
741 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
742 	m_c->m_dev->send(tabpage);
743 	return r;
744 }
nvim_subscribe(QByteArray event)745 MsgpackRequest* NeovimApi2::nvim_subscribe(QByteArray event)
746 {
747 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_subscribe", 1);
748 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_SUBSCRIBE);
749 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
750 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
751 	m_c->m_dev->send(event);
752 	return r;
753 }
nvim_unsubscribe(QByteArray event)754 MsgpackRequest* NeovimApi2::nvim_unsubscribe(QByteArray event)
755 {
756 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_unsubscribe", 1);
757 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_UNSUBSCRIBE);
758 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
759 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
760 	m_c->m_dev->send(event);
761 	return r;
762 }
nvim_get_color_by_name(QByteArray name)763 MsgpackRequest* NeovimApi2::nvim_get_color_by_name(QByteArray name)
764 {
765 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_get_color_by_name", 1);
766 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_GET_COLOR_BY_NAME);
767 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
768 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
769 	m_c->m_dev->send(name);
770 	return r;
771 }
nvim_get_color_map()772 MsgpackRequest* NeovimApi2::nvim_get_color_map()
773 {
774 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_get_color_map", 0);
775 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_GET_COLOR_MAP);
776 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
777 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
778 	return r;
779 }
nvim_get_mode()780 MsgpackRequest* NeovimApi2::nvim_get_mode()
781 {
782 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_get_mode", 0);
783 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_GET_MODE);
784 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
785 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
786 	return r;
787 }
nvim_get_api_info()788 MsgpackRequest* NeovimApi2::nvim_get_api_info()
789 {
790 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_get_api_info", 0);
791 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_GET_API_INFO);
792 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
793 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
794 	return r;
795 }
nvim_call_atomic(QVariantList calls)796 MsgpackRequest* NeovimApi2::nvim_call_atomic(QVariantList calls)
797 {
798 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_call_atomic", 1);
799 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_CALL_ATOMIC);
800 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
801 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
802 	m_c->m_dev->send(calls);
803 	return r;
804 }
nvim_win_get_buf(int64_t window)805 MsgpackRequest* NeovimApi2::nvim_win_get_buf(int64_t window)
806 {
807 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_get_buf", 1);
808 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_BUF);
809 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
810 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
811 	m_c->m_dev->send(window);
812 	return r;
813 }
nvim_win_get_cursor(int64_t window)814 MsgpackRequest* NeovimApi2::nvim_win_get_cursor(int64_t window)
815 {
816 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_get_cursor", 1);
817 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_CURSOR);
818 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
819 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
820 	m_c->m_dev->send(window);
821 	return r;
822 }
nvim_win_set_cursor(int64_t window,QPoint pos)823 MsgpackRequest* NeovimApi2::nvim_win_set_cursor(int64_t window, QPoint pos)
824 {
825 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_set_cursor", 2);
826 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_CURSOR);
827 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
828 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
829 	m_c->m_dev->send(window);
830 	m_c->m_dev->send(pos);
831 	return r;
832 }
nvim_win_get_height(int64_t window)833 MsgpackRequest* NeovimApi2::nvim_win_get_height(int64_t window)
834 {
835 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_get_height", 1);
836 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_HEIGHT);
837 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
838 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
839 	m_c->m_dev->send(window);
840 	return r;
841 }
nvim_win_set_height(int64_t window,int64_t height)842 MsgpackRequest* NeovimApi2::nvim_win_set_height(int64_t window, int64_t height)
843 {
844 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_set_height", 2);
845 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_HEIGHT);
846 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
847 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
848 	m_c->m_dev->send(window);
849 	m_c->m_dev->send(height);
850 	return r;
851 }
nvim_win_get_width(int64_t window)852 MsgpackRequest* NeovimApi2::nvim_win_get_width(int64_t window)
853 {
854 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_get_width", 1);
855 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_WIDTH);
856 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
857 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
858 	m_c->m_dev->send(window);
859 	return r;
860 }
nvim_win_set_width(int64_t window,int64_t width)861 MsgpackRequest* NeovimApi2::nvim_win_set_width(int64_t window, int64_t width)
862 {
863 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_set_width", 2);
864 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_WIDTH);
865 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
866 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
867 	m_c->m_dev->send(window);
868 	m_c->m_dev->send(width);
869 	return r;
870 }
nvim_win_get_var(int64_t window,QByteArray name)871 MsgpackRequest* NeovimApi2::nvim_win_get_var(int64_t window, QByteArray name)
872 {
873 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_get_var", 2);
874 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_VAR);
875 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
876 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
877 	m_c->m_dev->send(window);
878 	m_c->m_dev->send(name);
879 	return r;
880 }
nvim_win_set_var(int64_t window,QByteArray name,QVariant value)881 MsgpackRequest* NeovimApi2::nvim_win_set_var(int64_t window, QByteArray name, QVariant value)
882 {
883 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_set_var", 3);
884 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_VAR);
885 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
886 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
887 	m_c->m_dev->send(window);
888 	m_c->m_dev->send(name);
889 	m_c->m_dev->send(value);
890 	return r;
891 }
nvim_win_del_var(int64_t window,QByteArray name)892 MsgpackRequest* NeovimApi2::nvim_win_del_var(int64_t window, QByteArray name)
893 {
894 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_del_var", 2);
895 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_DEL_VAR);
896 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
897 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
898 	m_c->m_dev->send(window);
899 	m_c->m_dev->send(name);
900 	return r;
901 }
window_set_var(int64_t window,QByteArray name,QVariant value)902 MsgpackRequest* NeovimApi2::window_set_var(int64_t window, QByteArray name, QVariant value)
903 {
904 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_set_var", 3);
905 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_SET_VAR);
906 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
907 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
908 	m_c->m_dev->send(window);
909 	m_c->m_dev->send(name);
910 	m_c->m_dev->send(value);
911 	return r;
912 }
window_del_var(int64_t window,QByteArray name)913 MsgpackRequest* NeovimApi2::window_del_var(int64_t window, QByteArray name)
914 {
915 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_del_var", 2);
916 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_DEL_VAR);
917 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
918 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
919 	m_c->m_dev->send(window);
920 	m_c->m_dev->send(name);
921 	return r;
922 }
nvim_win_get_option(int64_t window,QByteArray name)923 MsgpackRequest* NeovimApi2::nvim_win_get_option(int64_t window, QByteArray name)
924 {
925 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_get_option", 2);
926 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_OPTION);
927 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
928 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
929 	m_c->m_dev->send(window);
930 	m_c->m_dev->send(name);
931 	return r;
932 }
nvim_win_set_option(int64_t window,QByteArray name,QVariant value)933 MsgpackRequest* NeovimApi2::nvim_win_set_option(int64_t window, QByteArray name, QVariant value)
934 {
935 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_set_option", 3);
936 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_OPTION);
937 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
938 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
939 	m_c->m_dev->send(window);
940 	m_c->m_dev->send(name);
941 	m_c->m_dev->send(value);
942 	return r;
943 }
nvim_win_get_position(int64_t window)944 MsgpackRequest* NeovimApi2::nvim_win_get_position(int64_t window)
945 {
946 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_get_position", 1);
947 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_POSITION);
948 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
949 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
950 	m_c->m_dev->send(window);
951 	return r;
952 }
nvim_win_get_tabpage(int64_t window)953 MsgpackRequest* NeovimApi2::nvim_win_get_tabpage(int64_t window)
954 {
955 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_get_tabpage", 1);
956 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_TABPAGE);
957 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
958 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
959 	m_c->m_dev->send(window);
960 	return r;
961 }
nvim_win_get_number(int64_t window)962 MsgpackRequest* NeovimApi2::nvim_win_get_number(int64_t window)
963 {
964 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_get_number", 1);
965 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_NUMBER);
966 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
967 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
968 	m_c->m_dev->send(window);
969 	return r;
970 }
nvim_win_is_valid(int64_t window)971 MsgpackRequest* NeovimApi2::nvim_win_is_valid(int64_t window)
972 {
973 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("nvim_win_is_valid", 1);
974 	r->setFunction(NeovimApi2::NEOVIM_FN_NVIM_WIN_IS_VALID);
975 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
976 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
977 	m_c->m_dev->send(window);
978 	return r;
979 }
buffer_line_count(int64_t buffer)980 MsgpackRequest* NeovimApi2::buffer_line_count(int64_t buffer)
981 {
982 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_line_count", 1);
983 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_LINE_COUNT);
984 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
985 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
986 	m_c->m_dev->send(buffer);
987 	return r;
988 }
buffer_get_lines(int64_t buffer,int64_t start,int64_t end,bool strict_indexing)989 MsgpackRequest* NeovimApi2::buffer_get_lines(int64_t buffer, int64_t start, int64_t end, bool strict_indexing)
990 {
991 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_get_lines", 4);
992 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_GET_LINES);
993 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
994 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
995 	m_c->m_dev->send(buffer);
996 	m_c->m_dev->send(start);
997 	m_c->m_dev->send(end);
998 	m_c->m_dev->send(strict_indexing);
999 	return r;
1000 }
buffer_set_lines(int64_t buffer,int64_t start,int64_t end,bool strict_indexing,QList<QByteArray> replacement)1001 MsgpackRequest* NeovimApi2::buffer_set_lines(int64_t buffer, int64_t start, int64_t end, bool strict_indexing, QList<QByteArray> replacement)
1002 {
1003 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_set_lines", 5);
1004 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_SET_LINES);
1005 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1006 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1007 	m_c->m_dev->send(buffer);
1008 	m_c->m_dev->send(start);
1009 	m_c->m_dev->send(end);
1010 	m_c->m_dev->send(strict_indexing);
1011 	m_c->m_dev->sendArrayOf(replacement);
1012 	return r;
1013 }
buffer_get_var(int64_t buffer,QByteArray name)1014 MsgpackRequest* NeovimApi2::buffer_get_var(int64_t buffer, QByteArray name)
1015 {
1016 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_get_var", 2);
1017 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_GET_VAR);
1018 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1019 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1020 	m_c->m_dev->send(buffer);
1021 	m_c->m_dev->send(name);
1022 	return r;
1023 }
buffer_get_option(int64_t buffer,QByteArray name)1024 MsgpackRequest* NeovimApi2::buffer_get_option(int64_t buffer, QByteArray name)
1025 {
1026 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_get_option", 2);
1027 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_GET_OPTION);
1028 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1029 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1030 	m_c->m_dev->send(buffer);
1031 	m_c->m_dev->send(name);
1032 	return r;
1033 }
buffer_set_option(int64_t buffer,QByteArray name,QVariant value)1034 MsgpackRequest* NeovimApi2::buffer_set_option(int64_t buffer, QByteArray name, QVariant value)
1035 {
1036 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_set_option", 3);
1037 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_SET_OPTION);
1038 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1039 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1040 	m_c->m_dev->send(buffer);
1041 	m_c->m_dev->send(name);
1042 	m_c->m_dev->send(value);
1043 	return r;
1044 }
buffer_get_number(int64_t buffer)1045 MsgpackRequest* NeovimApi2::buffer_get_number(int64_t buffer)
1046 {
1047 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_get_number", 1);
1048 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_GET_NUMBER);
1049 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1050 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1051 	m_c->m_dev->send(buffer);
1052 	return r;
1053 }
buffer_get_name(int64_t buffer)1054 MsgpackRequest* NeovimApi2::buffer_get_name(int64_t buffer)
1055 {
1056 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_get_name", 1);
1057 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_GET_NAME);
1058 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1059 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1060 	m_c->m_dev->send(buffer);
1061 	return r;
1062 }
buffer_set_name(int64_t buffer,QByteArray name)1063 MsgpackRequest* NeovimApi2::buffer_set_name(int64_t buffer, QByteArray name)
1064 {
1065 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_set_name", 2);
1066 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_SET_NAME);
1067 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1068 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1069 	m_c->m_dev->send(buffer);
1070 	m_c->m_dev->send(name);
1071 	return r;
1072 }
buffer_is_valid(int64_t buffer)1073 MsgpackRequest* NeovimApi2::buffer_is_valid(int64_t buffer)
1074 {
1075 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_is_valid", 1);
1076 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_IS_VALID);
1077 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1078 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1079 	m_c->m_dev->send(buffer);
1080 	return r;
1081 }
buffer_get_mark(int64_t buffer,QByteArray name)1082 MsgpackRequest* NeovimApi2::buffer_get_mark(int64_t buffer, QByteArray name)
1083 {
1084 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_get_mark", 2);
1085 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_GET_MARK);
1086 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1087 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1088 	m_c->m_dev->send(buffer);
1089 	m_c->m_dev->send(name);
1090 	return r;
1091 }
buffer_add_highlight(int64_t buffer,int64_t src_id,QByteArray hl_group,int64_t line,int64_t col_start,int64_t col_end)1092 MsgpackRequest* NeovimApi2::buffer_add_highlight(int64_t buffer, int64_t src_id, QByteArray hl_group, int64_t line, int64_t col_start, int64_t col_end)
1093 {
1094 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_add_highlight", 6);
1095 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_ADD_HIGHLIGHT);
1096 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1097 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1098 	m_c->m_dev->send(buffer);
1099 	m_c->m_dev->send(src_id);
1100 	m_c->m_dev->send(hl_group);
1101 	m_c->m_dev->send(line);
1102 	m_c->m_dev->send(col_start);
1103 	m_c->m_dev->send(col_end);
1104 	return r;
1105 }
buffer_clear_highlight(int64_t buffer,int64_t src_id,int64_t line_start,int64_t line_end)1106 MsgpackRequest* NeovimApi2::buffer_clear_highlight(int64_t buffer, int64_t src_id, int64_t line_start, int64_t line_end)
1107 {
1108 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("buffer_clear_highlight", 4);
1109 	r->setFunction(NeovimApi2::NEOVIM_FN_BUFFER_CLEAR_HIGHLIGHT);
1110 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1111 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1112 	m_c->m_dev->send(buffer);
1113 	m_c->m_dev->send(src_id);
1114 	m_c->m_dev->send(line_start);
1115 	m_c->m_dev->send(line_end);
1116 	return r;
1117 }
tabpage_get_windows(int64_t tabpage)1118 MsgpackRequest* NeovimApi2::tabpage_get_windows(int64_t tabpage)
1119 {
1120 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("tabpage_get_windows", 1);
1121 	r->setFunction(NeovimApi2::NEOVIM_FN_TABPAGE_GET_WINDOWS);
1122 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1123 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1124 	m_c->m_dev->send(tabpage);
1125 	return r;
1126 }
tabpage_get_var(int64_t tabpage,QByteArray name)1127 MsgpackRequest* NeovimApi2::tabpage_get_var(int64_t tabpage, QByteArray name)
1128 {
1129 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("tabpage_get_var", 2);
1130 	r->setFunction(NeovimApi2::NEOVIM_FN_TABPAGE_GET_VAR);
1131 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1132 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1133 	m_c->m_dev->send(tabpage);
1134 	m_c->m_dev->send(name);
1135 	return r;
1136 }
tabpage_get_window(int64_t tabpage)1137 MsgpackRequest* NeovimApi2::tabpage_get_window(int64_t tabpage)
1138 {
1139 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("tabpage_get_window", 1);
1140 	r->setFunction(NeovimApi2::NEOVIM_FN_TABPAGE_GET_WINDOW);
1141 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1142 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1143 	m_c->m_dev->send(tabpage);
1144 	return r;
1145 }
tabpage_is_valid(int64_t tabpage)1146 MsgpackRequest* NeovimApi2::tabpage_is_valid(int64_t tabpage)
1147 {
1148 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("tabpage_is_valid", 1);
1149 	r->setFunction(NeovimApi2::NEOVIM_FN_TABPAGE_IS_VALID);
1150 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1151 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1152 	m_c->m_dev->send(tabpage);
1153 	return r;
1154 }
ui_detach()1155 MsgpackRequest* NeovimApi2::ui_detach()
1156 {
1157 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("ui_detach", 0);
1158 	r->setFunction(NeovimApi2::NEOVIM_FN_UI_DETACH);
1159 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1160 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1161 	return r;
1162 }
ui_try_resize(int64_t width,int64_t height)1163 MsgpackRequest* NeovimApi2::ui_try_resize(int64_t width, int64_t height)
1164 {
1165 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("ui_try_resize", 2);
1166 	r->setFunction(NeovimApi2::NEOVIM_FN_UI_TRY_RESIZE);
1167 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1168 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1169 	m_c->m_dev->send(width);
1170 	m_c->m_dev->send(height);
1171 	return r;
1172 }
vim_command(QByteArray command)1173 MsgpackRequest* NeovimApi2::vim_command(QByteArray command)
1174 {
1175 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_command", 1);
1176 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_COMMAND);
1177 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1178 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1179 	m_c->m_dev->send(command);
1180 	return r;
1181 }
vim_feedkeys(QByteArray keys,QByteArray mode,bool escape_csi)1182 MsgpackRequest* NeovimApi2::vim_feedkeys(QByteArray keys, QByteArray mode, bool escape_csi)
1183 {
1184 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_feedkeys", 3);
1185 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_FEEDKEYS);
1186 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1187 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1188 	m_c->m_dev->send(keys);
1189 	m_c->m_dev->send(mode);
1190 	m_c->m_dev->send(escape_csi);
1191 	return r;
1192 }
vim_input(QByteArray keys)1193 MsgpackRequest* NeovimApi2::vim_input(QByteArray keys)
1194 {
1195 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_input", 1);
1196 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_INPUT);
1197 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1198 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1199 	m_c->m_dev->send(keys);
1200 	return r;
1201 }
vim_replace_termcodes(QByteArray str,bool from_part,bool do_lt,bool special)1202 MsgpackRequest* NeovimApi2::vim_replace_termcodes(QByteArray str, bool from_part, bool do_lt, bool special)
1203 {
1204 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_replace_termcodes", 4);
1205 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_REPLACE_TERMCODES);
1206 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1207 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1208 	m_c->m_dev->send(str);
1209 	m_c->m_dev->send(from_part);
1210 	m_c->m_dev->send(do_lt);
1211 	m_c->m_dev->send(special);
1212 	return r;
1213 }
vim_command_output(QByteArray str)1214 MsgpackRequest* NeovimApi2::vim_command_output(QByteArray str)
1215 {
1216 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_command_output", 1);
1217 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_COMMAND_OUTPUT);
1218 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1219 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1220 	m_c->m_dev->send(str);
1221 	return r;
1222 }
vim_eval(QByteArray expr)1223 MsgpackRequest* NeovimApi2::vim_eval(QByteArray expr)
1224 {
1225 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_eval", 1);
1226 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_EVAL);
1227 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1228 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1229 	m_c->m_dev->send(expr);
1230 	return r;
1231 }
vim_call_function(QByteArray fname,QVariantList args)1232 MsgpackRequest* NeovimApi2::vim_call_function(QByteArray fname, QVariantList args)
1233 {
1234 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_call_function", 2);
1235 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_CALL_FUNCTION);
1236 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1237 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1238 	m_c->m_dev->send(fname);
1239 	m_c->m_dev->send(args);
1240 	return r;
1241 }
vim_strwidth(QByteArray str)1242 MsgpackRequest* NeovimApi2::vim_strwidth(QByteArray str)
1243 {
1244 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_strwidth", 1);
1245 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_STRWIDTH);
1246 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1247 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1248 	m_c->m_dev->send(str);
1249 	return r;
1250 }
vim_list_runtime_paths()1251 MsgpackRequest* NeovimApi2::vim_list_runtime_paths()
1252 {
1253 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_list_runtime_paths", 0);
1254 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_LIST_RUNTIME_PATHS);
1255 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1256 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1257 	return r;
1258 }
vim_change_directory(QByteArray dir)1259 MsgpackRequest* NeovimApi2::vim_change_directory(QByteArray dir)
1260 {
1261 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_change_directory", 1);
1262 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_CHANGE_DIRECTORY);
1263 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1264 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1265 	m_c->m_dev->send(dir);
1266 	return r;
1267 }
vim_get_current_line()1268 MsgpackRequest* NeovimApi2::vim_get_current_line()
1269 {
1270 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_get_current_line", 0);
1271 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_GET_CURRENT_LINE);
1272 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1273 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1274 	return r;
1275 }
vim_set_current_line(QByteArray line)1276 MsgpackRequest* NeovimApi2::vim_set_current_line(QByteArray line)
1277 {
1278 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_set_current_line", 1);
1279 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_SET_CURRENT_LINE);
1280 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1281 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1282 	m_c->m_dev->send(line);
1283 	return r;
1284 }
vim_del_current_line()1285 MsgpackRequest* NeovimApi2::vim_del_current_line()
1286 {
1287 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_del_current_line", 0);
1288 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_DEL_CURRENT_LINE);
1289 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1290 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1291 	return r;
1292 }
vim_get_var(QByteArray name)1293 MsgpackRequest* NeovimApi2::vim_get_var(QByteArray name)
1294 {
1295 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_get_var", 1);
1296 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_GET_VAR);
1297 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1298 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1299 	m_c->m_dev->send(name);
1300 	return r;
1301 }
vim_get_vvar(QByteArray name)1302 MsgpackRequest* NeovimApi2::vim_get_vvar(QByteArray name)
1303 {
1304 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_get_vvar", 1);
1305 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_GET_VVAR);
1306 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1307 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1308 	m_c->m_dev->send(name);
1309 	return r;
1310 }
vim_get_option(QByteArray name)1311 MsgpackRequest* NeovimApi2::vim_get_option(QByteArray name)
1312 {
1313 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_get_option", 1);
1314 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_GET_OPTION);
1315 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1316 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1317 	m_c->m_dev->send(name);
1318 	return r;
1319 }
vim_set_option(QByteArray name,QVariant value)1320 MsgpackRequest* NeovimApi2::vim_set_option(QByteArray name, QVariant value)
1321 {
1322 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_set_option", 2);
1323 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_SET_OPTION);
1324 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1325 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1326 	m_c->m_dev->send(name);
1327 	m_c->m_dev->send(value);
1328 	return r;
1329 }
vim_out_write(QByteArray str)1330 MsgpackRequest* NeovimApi2::vim_out_write(QByteArray str)
1331 {
1332 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_out_write", 1);
1333 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_OUT_WRITE);
1334 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1335 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1336 	m_c->m_dev->send(str);
1337 	return r;
1338 }
vim_err_write(QByteArray str)1339 MsgpackRequest* NeovimApi2::vim_err_write(QByteArray str)
1340 {
1341 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_err_write", 1);
1342 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_ERR_WRITE);
1343 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1344 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1345 	m_c->m_dev->send(str);
1346 	return r;
1347 }
vim_report_error(QByteArray str)1348 MsgpackRequest* NeovimApi2::vim_report_error(QByteArray str)
1349 {
1350 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_report_error", 1);
1351 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_REPORT_ERROR);
1352 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1353 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1354 	m_c->m_dev->send(str);
1355 	return r;
1356 }
vim_get_buffers()1357 MsgpackRequest* NeovimApi2::vim_get_buffers()
1358 {
1359 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_get_buffers", 0);
1360 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_GET_BUFFERS);
1361 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1362 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1363 	return r;
1364 }
vim_get_current_buffer()1365 MsgpackRequest* NeovimApi2::vim_get_current_buffer()
1366 {
1367 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_get_current_buffer", 0);
1368 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_GET_CURRENT_BUFFER);
1369 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1370 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1371 	return r;
1372 }
vim_set_current_buffer(int64_t buffer)1373 MsgpackRequest* NeovimApi2::vim_set_current_buffer(int64_t buffer)
1374 {
1375 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_set_current_buffer", 1);
1376 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_SET_CURRENT_BUFFER);
1377 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1378 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1379 	m_c->m_dev->send(buffer);
1380 	return r;
1381 }
vim_get_windows()1382 MsgpackRequest* NeovimApi2::vim_get_windows()
1383 {
1384 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_get_windows", 0);
1385 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_GET_WINDOWS);
1386 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1387 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1388 	return r;
1389 }
vim_get_current_window()1390 MsgpackRequest* NeovimApi2::vim_get_current_window()
1391 {
1392 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_get_current_window", 0);
1393 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_GET_CURRENT_WINDOW);
1394 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1395 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1396 	return r;
1397 }
vim_set_current_window(int64_t window)1398 MsgpackRequest* NeovimApi2::vim_set_current_window(int64_t window)
1399 {
1400 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_set_current_window", 1);
1401 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_SET_CURRENT_WINDOW);
1402 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1403 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1404 	m_c->m_dev->send(window);
1405 	return r;
1406 }
vim_get_tabpages()1407 MsgpackRequest* NeovimApi2::vim_get_tabpages()
1408 {
1409 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_get_tabpages", 0);
1410 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_GET_TABPAGES);
1411 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1412 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1413 	return r;
1414 }
vim_get_current_tabpage()1415 MsgpackRequest* NeovimApi2::vim_get_current_tabpage()
1416 {
1417 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_get_current_tabpage", 0);
1418 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_GET_CURRENT_TABPAGE);
1419 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1420 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1421 	return r;
1422 }
vim_set_current_tabpage(int64_t tabpage)1423 MsgpackRequest* NeovimApi2::vim_set_current_tabpage(int64_t tabpage)
1424 {
1425 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_set_current_tabpage", 1);
1426 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_SET_CURRENT_TABPAGE);
1427 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1428 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1429 	m_c->m_dev->send(tabpage);
1430 	return r;
1431 }
vim_subscribe(QByteArray event)1432 MsgpackRequest* NeovimApi2::vim_subscribe(QByteArray event)
1433 {
1434 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_subscribe", 1);
1435 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_SUBSCRIBE);
1436 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1437 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1438 	m_c->m_dev->send(event);
1439 	return r;
1440 }
vim_unsubscribe(QByteArray event)1441 MsgpackRequest* NeovimApi2::vim_unsubscribe(QByteArray event)
1442 {
1443 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_unsubscribe", 1);
1444 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_UNSUBSCRIBE);
1445 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1446 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1447 	m_c->m_dev->send(event);
1448 	return r;
1449 }
vim_name_to_color(QByteArray name)1450 MsgpackRequest* NeovimApi2::vim_name_to_color(QByteArray name)
1451 {
1452 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_name_to_color", 1);
1453 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_NAME_TO_COLOR);
1454 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1455 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1456 	m_c->m_dev->send(name);
1457 	return r;
1458 }
vim_get_color_map()1459 MsgpackRequest* NeovimApi2::vim_get_color_map()
1460 {
1461 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("vim_get_color_map", 0);
1462 	r->setFunction(NeovimApi2::NEOVIM_FN_VIM_GET_COLOR_MAP);
1463 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1464 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1465 	return r;
1466 }
window_get_buffer(int64_t window)1467 MsgpackRequest* NeovimApi2::window_get_buffer(int64_t window)
1468 {
1469 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_get_buffer", 1);
1470 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_GET_BUFFER);
1471 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1472 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1473 	m_c->m_dev->send(window);
1474 	return r;
1475 }
window_get_cursor(int64_t window)1476 MsgpackRequest* NeovimApi2::window_get_cursor(int64_t window)
1477 {
1478 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_get_cursor", 1);
1479 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_GET_CURSOR);
1480 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1481 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1482 	m_c->m_dev->send(window);
1483 	return r;
1484 }
window_set_cursor(int64_t window,QPoint pos)1485 MsgpackRequest* NeovimApi2::window_set_cursor(int64_t window, QPoint pos)
1486 {
1487 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_set_cursor", 2);
1488 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_SET_CURSOR);
1489 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1490 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1491 	m_c->m_dev->send(window);
1492 	m_c->m_dev->send(pos);
1493 	return r;
1494 }
window_get_height(int64_t window)1495 MsgpackRequest* NeovimApi2::window_get_height(int64_t window)
1496 {
1497 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_get_height", 1);
1498 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_GET_HEIGHT);
1499 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1500 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1501 	m_c->m_dev->send(window);
1502 	return r;
1503 }
window_set_height(int64_t window,int64_t height)1504 MsgpackRequest* NeovimApi2::window_set_height(int64_t window, int64_t height)
1505 {
1506 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_set_height", 2);
1507 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_SET_HEIGHT);
1508 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1509 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1510 	m_c->m_dev->send(window);
1511 	m_c->m_dev->send(height);
1512 	return r;
1513 }
window_get_width(int64_t window)1514 MsgpackRequest* NeovimApi2::window_get_width(int64_t window)
1515 {
1516 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_get_width", 1);
1517 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_GET_WIDTH);
1518 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1519 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1520 	m_c->m_dev->send(window);
1521 	return r;
1522 }
window_set_width(int64_t window,int64_t width)1523 MsgpackRequest* NeovimApi2::window_set_width(int64_t window, int64_t width)
1524 {
1525 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_set_width", 2);
1526 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_SET_WIDTH);
1527 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1528 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1529 	m_c->m_dev->send(window);
1530 	m_c->m_dev->send(width);
1531 	return r;
1532 }
window_get_var(int64_t window,QByteArray name)1533 MsgpackRequest* NeovimApi2::window_get_var(int64_t window, QByteArray name)
1534 {
1535 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_get_var", 2);
1536 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_GET_VAR);
1537 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1538 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1539 	m_c->m_dev->send(window);
1540 	m_c->m_dev->send(name);
1541 	return r;
1542 }
window_get_option(int64_t window,QByteArray name)1543 MsgpackRequest* NeovimApi2::window_get_option(int64_t window, QByteArray name)
1544 {
1545 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_get_option", 2);
1546 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_GET_OPTION);
1547 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1548 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1549 	m_c->m_dev->send(window);
1550 	m_c->m_dev->send(name);
1551 	return r;
1552 }
window_set_option(int64_t window,QByteArray name,QVariant value)1553 MsgpackRequest* NeovimApi2::window_set_option(int64_t window, QByteArray name, QVariant value)
1554 {
1555 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_set_option", 3);
1556 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_SET_OPTION);
1557 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1558 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1559 	m_c->m_dev->send(window);
1560 	m_c->m_dev->send(name);
1561 	m_c->m_dev->send(value);
1562 	return r;
1563 }
window_get_position(int64_t window)1564 MsgpackRequest* NeovimApi2::window_get_position(int64_t window)
1565 {
1566 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_get_position", 1);
1567 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_GET_POSITION);
1568 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1569 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1570 	m_c->m_dev->send(window);
1571 	return r;
1572 }
window_get_tabpage(int64_t window)1573 MsgpackRequest* NeovimApi2::window_get_tabpage(int64_t window)
1574 {
1575 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_get_tabpage", 1);
1576 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_GET_TABPAGE);
1577 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1578 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1579 	m_c->m_dev->send(window);
1580 	return r;
1581 }
window_is_valid(int64_t window)1582 MsgpackRequest* NeovimApi2::window_is_valid(int64_t window)
1583 {
1584 	MsgpackRequest *r = m_c->m_dev->startRequestUnchecked("window_is_valid", 1);
1585 	r->setFunction(NeovimApi2::NEOVIM_FN_WINDOW_IS_VALID);
1586 	connect(r, &MsgpackRequest::finished, this, &NeovimApi2::handleResponse);
1587 	connect(r, &MsgpackRequest::error, this, &NeovimApi2::handleResponseError);
1588 	m_c->m_dev->send(window);
1589 	return r;
1590 }
1591 
1592 // Handlers
1593 
handleResponseError(quint32 msgid,quint64 fun,const QVariant & res)1594 void NeovimApi2::handleResponseError(quint32 msgid, quint64 fun, const QVariant& res)
1595 {
1596 
1597 	// TODO: support Neovim error types Exception/Validation/etc
1598 	QString errMsg;
1599 	const QVariantList asList = res.toList();
1600 	if (asList.size() >= 2) {
1601 		if (asList.at(1).canConvert<QByteArray>()) {
1602 			errMsg = m_c->m_dev->decode(asList.at(1).toByteArray());
1603 		} else {
1604 			errMsg = tr("Received unsupported Neovim error type");
1605 		}
1606 	}
1607 
1608 	switch(fun) {
1609 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_LINE_COUNT:
1610 		emit err_nvim_buf_line_count(errMsg, res);
1611 		break;
1612 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_LINE:
1613 		emit err_buffer_get_line(errMsg, res);
1614 		break;
1615 	case NeovimApi2::NEOVIM_FN_BUFFER_SET_LINE:
1616 		emit err_buffer_set_line(errMsg, res);
1617 		break;
1618 	case NeovimApi2::NEOVIM_FN_BUFFER_DEL_LINE:
1619 		emit err_buffer_del_line(errMsg, res);
1620 		break;
1621 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_LINE_SLICE:
1622 		emit err_buffer_get_line_slice(errMsg, res);
1623 		break;
1624 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_LINES:
1625 		emit err_nvim_buf_get_lines(errMsg, res);
1626 		break;
1627 	case NeovimApi2::NEOVIM_FN_BUFFER_SET_LINE_SLICE:
1628 		emit err_buffer_set_line_slice(errMsg, res);
1629 		break;
1630 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_SET_LINES:
1631 		emit err_nvim_buf_set_lines(errMsg, res);
1632 		break;
1633 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_VAR:
1634 		emit err_nvim_buf_get_var(errMsg, res);
1635 		break;
1636 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_CHANGEDTICK:
1637 		emit err_nvim_buf_get_changedtick(errMsg, res);
1638 		break;
1639 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_SET_VAR:
1640 		emit err_nvim_buf_set_var(errMsg, res);
1641 		break;
1642 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_DEL_VAR:
1643 		emit err_nvim_buf_del_var(errMsg, res);
1644 		break;
1645 	case NeovimApi2::NEOVIM_FN_BUFFER_SET_VAR:
1646 		emit err_buffer_set_var(errMsg, res);
1647 		break;
1648 	case NeovimApi2::NEOVIM_FN_BUFFER_DEL_VAR:
1649 		emit err_buffer_del_var(errMsg, res);
1650 		break;
1651 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_OPTION:
1652 		emit err_nvim_buf_get_option(errMsg, res);
1653 		break;
1654 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_SET_OPTION:
1655 		emit err_nvim_buf_set_option(errMsg, res);
1656 		break;
1657 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_NUMBER:
1658 		emit err_nvim_buf_get_number(errMsg, res);
1659 		break;
1660 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_NAME:
1661 		emit err_nvim_buf_get_name(errMsg, res);
1662 		break;
1663 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_SET_NAME:
1664 		emit err_nvim_buf_set_name(errMsg, res);
1665 		break;
1666 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_IS_VALID:
1667 		emit err_nvim_buf_is_valid(errMsg, res);
1668 		break;
1669 	case NeovimApi2::NEOVIM_FN_BUFFER_INSERT:
1670 		emit err_buffer_insert(errMsg, res);
1671 		break;
1672 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_MARK:
1673 		emit err_nvim_buf_get_mark(errMsg, res);
1674 		break;
1675 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_ADD_HIGHLIGHT:
1676 		emit err_nvim_buf_add_highlight(errMsg, res);
1677 		break;
1678 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_CLEAR_HIGHLIGHT:
1679 		emit err_nvim_buf_clear_highlight(errMsg, res);
1680 		break;
1681 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_LIST_WINS:
1682 		emit err_nvim_tabpage_list_wins(errMsg, res);
1683 		break;
1684 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_GET_VAR:
1685 		emit err_nvim_tabpage_get_var(errMsg, res);
1686 		break;
1687 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_SET_VAR:
1688 		emit err_nvim_tabpage_set_var(errMsg, res);
1689 		break;
1690 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_DEL_VAR:
1691 		emit err_nvim_tabpage_del_var(errMsg, res);
1692 		break;
1693 	case NeovimApi2::NEOVIM_FN_TABPAGE_SET_VAR:
1694 		emit err_tabpage_set_var(errMsg, res);
1695 		break;
1696 	case NeovimApi2::NEOVIM_FN_TABPAGE_DEL_VAR:
1697 		emit err_tabpage_del_var(errMsg, res);
1698 		break;
1699 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_GET_WIN:
1700 		emit err_nvim_tabpage_get_win(errMsg, res);
1701 		break;
1702 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_GET_NUMBER:
1703 		emit err_nvim_tabpage_get_number(errMsg, res);
1704 		break;
1705 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_IS_VALID:
1706 		emit err_nvim_tabpage_is_valid(errMsg, res);
1707 		break;
1708 	case NeovimApi2::NEOVIM_FN_NVIM_UI_ATTACH:
1709 		emit err_nvim_ui_attach(errMsg, res);
1710 		break;
1711 	case NeovimApi2::NEOVIM_FN_UI_ATTACH:
1712 		emit err_ui_attach(errMsg, res);
1713 		break;
1714 	case NeovimApi2::NEOVIM_FN_NVIM_UI_DETACH:
1715 		emit err_nvim_ui_detach(errMsg, res);
1716 		break;
1717 	case NeovimApi2::NEOVIM_FN_NVIM_UI_TRY_RESIZE:
1718 		emit err_nvim_ui_try_resize(errMsg, res);
1719 		break;
1720 	case NeovimApi2::NEOVIM_FN_NVIM_UI_SET_OPTION:
1721 		emit err_nvim_ui_set_option(errMsg, res);
1722 		break;
1723 	case NeovimApi2::NEOVIM_FN_NVIM_COMMAND:
1724 		emit err_nvim_command(errMsg, res);
1725 		break;
1726 	case NeovimApi2::NEOVIM_FN_NVIM_FEEDKEYS:
1727 		emit err_nvim_feedkeys(errMsg, res);
1728 		break;
1729 	case NeovimApi2::NEOVIM_FN_NVIM_INPUT:
1730 		emit err_nvim_input(errMsg, res);
1731 		break;
1732 	case NeovimApi2::NEOVIM_FN_NVIM_REPLACE_TERMCODES:
1733 		emit err_nvim_replace_termcodes(errMsg, res);
1734 		break;
1735 	case NeovimApi2::NEOVIM_FN_NVIM_COMMAND_OUTPUT:
1736 		emit err_nvim_command_output(errMsg, res);
1737 		break;
1738 	case NeovimApi2::NEOVIM_FN_NVIM_EVAL:
1739 		emit err_nvim_eval(errMsg, res);
1740 		break;
1741 	case NeovimApi2::NEOVIM_FN_NVIM_CALL_FUNCTION:
1742 		emit err_nvim_call_function(errMsg, res);
1743 		break;
1744 	case NeovimApi2::NEOVIM_FN_NVIM_STRWIDTH:
1745 		emit err_nvim_strwidth(errMsg, res);
1746 		break;
1747 	case NeovimApi2::NEOVIM_FN_NVIM_LIST_RUNTIME_PATHS:
1748 		emit err_nvim_list_runtime_paths(errMsg, res);
1749 		break;
1750 	case NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_DIR:
1751 		emit err_nvim_set_current_dir(errMsg, res);
1752 		break;
1753 	case NeovimApi2::NEOVIM_FN_NVIM_GET_CURRENT_LINE:
1754 		emit err_nvim_get_current_line(errMsg, res);
1755 		break;
1756 	case NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_LINE:
1757 		emit err_nvim_set_current_line(errMsg, res);
1758 		break;
1759 	case NeovimApi2::NEOVIM_FN_NVIM_DEL_CURRENT_LINE:
1760 		emit err_nvim_del_current_line(errMsg, res);
1761 		break;
1762 	case NeovimApi2::NEOVIM_FN_NVIM_GET_VAR:
1763 		emit err_nvim_get_var(errMsg, res);
1764 		break;
1765 	case NeovimApi2::NEOVIM_FN_NVIM_SET_VAR:
1766 		emit err_nvim_set_var(errMsg, res);
1767 		break;
1768 	case NeovimApi2::NEOVIM_FN_NVIM_DEL_VAR:
1769 		emit err_nvim_del_var(errMsg, res);
1770 		break;
1771 	case NeovimApi2::NEOVIM_FN_VIM_SET_VAR:
1772 		emit err_vim_set_var(errMsg, res);
1773 		break;
1774 	case NeovimApi2::NEOVIM_FN_VIM_DEL_VAR:
1775 		emit err_vim_del_var(errMsg, res);
1776 		break;
1777 	case NeovimApi2::NEOVIM_FN_NVIM_GET_VVAR:
1778 		emit err_nvim_get_vvar(errMsg, res);
1779 		break;
1780 	case NeovimApi2::NEOVIM_FN_NVIM_GET_OPTION:
1781 		emit err_nvim_get_option(errMsg, res);
1782 		break;
1783 	case NeovimApi2::NEOVIM_FN_NVIM_SET_OPTION:
1784 		emit err_nvim_set_option(errMsg, res);
1785 		break;
1786 	case NeovimApi2::NEOVIM_FN_NVIM_OUT_WRITE:
1787 		emit err_nvim_out_write(errMsg, res);
1788 		break;
1789 	case NeovimApi2::NEOVIM_FN_NVIM_ERR_WRITE:
1790 		emit err_nvim_err_write(errMsg, res);
1791 		break;
1792 	case NeovimApi2::NEOVIM_FN_NVIM_ERR_WRITELN:
1793 		emit err_nvim_err_writeln(errMsg, res);
1794 		break;
1795 	case NeovimApi2::NEOVIM_FN_NVIM_LIST_BUFS:
1796 		emit err_nvim_list_bufs(errMsg, res);
1797 		break;
1798 	case NeovimApi2::NEOVIM_FN_NVIM_GET_CURRENT_BUF:
1799 		emit err_nvim_get_current_buf(errMsg, res);
1800 		break;
1801 	case NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_BUF:
1802 		emit err_nvim_set_current_buf(errMsg, res);
1803 		break;
1804 	case NeovimApi2::NEOVIM_FN_NVIM_LIST_WINS:
1805 		emit err_nvim_list_wins(errMsg, res);
1806 		break;
1807 	case NeovimApi2::NEOVIM_FN_NVIM_GET_CURRENT_WIN:
1808 		emit err_nvim_get_current_win(errMsg, res);
1809 		break;
1810 	case NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_WIN:
1811 		emit err_nvim_set_current_win(errMsg, res);
1812 		break;
1813 	case NeovimApi2::NEOVIM_FN_NVIM_LIST_TABPAGES:
1814 		emit err_nvim_list_tabpages(errMsg, res);
1815 		break;
1816 	case NeovimApi2::NEOVIM_FN_NVIM_GET_CURRENT_TABPAGE:
1817 		emit err_nvim_get_current_tabpage(errMsg, res);
1818 		break;
1819 	case NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_TABPAGE:
1820 		emit err_nvim_set_current_tabpage(errMsg, res);
1821 		break;
1822 	case NeovimApi2::NEOVIM_FN_NVIM_SUBSCRIBE:
1823 		emit err_nvim_subscribe(errMsg, res);
1824 		break;
1825 	case NeovimApi2::NEOVIM_FN_NVIM_UNSUBSCRIBE:
1826 		emit err_nvim_unsubscribe(errMsg, res);
1827 		break;
1828 	case NeovimApi2::NEOVIM_FN_NVIM_GET_COLOR_BY_NAME:
1829 		emit err_nvim_get_color_by_name(errMsg, res);
1830 		break;
1831 	case NeovimApi2::NEOVIM_FN_NVIM_GET_COLOR_MAP:
1832 		emit err_nvim_get_color_map(errMsg, res);
1833 		break;
1834 	case NeovimApi2::NEOVIM_FN_NVIM_GET_MODE:
1835 		emit err_nvim_get_mode(errMsg, res);
1836 		break;
1837 	case NeovimApi2::NEOVIM_FN_NVIM_GET_API_INFO:
1838 		emit err_nvim_get_api_info(errMsg, res);
1839 		break;
1840 	case NeovimApi2::NEOVIM_FN_NVIM_CALL_ATOMIC:
1841 		emit err_nvim_call_atomic(errMsg, res);
1842 		break;
1843 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_BUF:
1844 		emit err_nvim_win_get_buf(errMsg, res);
1845 		break;
1846 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_CURSOR:
1847 		emit err_nvim_win_get_cursor(errMsg, res);
1848 		break;
1849 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_CURSOR:
1850 		emit err_nvim_win_set_cursor(errMsg, res);
1851 		break;
1852 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_HEIGHT:
1853 		emit err_nvim_win_get_height(errMsg, res);
1854 		break;
1855 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_HEIGHT:
1856 		emit err_nvim_win_set_height(errMsg, res);
1857 		break;
1858 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_WIDTH:
1859 		emit err_nvim_win_get_width(errMsg, res);
1860 		break;
1861 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_WIDTH:
1862 		emit err_nvim_win_set_width(errMsg, res);
1863 		break;
1864 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_VAR:
1865 		emit err_nvim_win_get_var(errMsg, res);
1866 		break;
1867 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_VAR:
1868 		emit err_nvim_win_set_var(errMsg, res);
1869 		break;
1870 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_DEL_VAR:
1871 		emit err_nvim_win_del_var(errMsg, res);
1872 		break;
1873 	case NeovimApi2::NEOVIM_FN_WINDOW_SET_VAR:
1874 		emit err_window_set_var(errMsg, res);
1875 		break;
1876 	case NeovimApi2::NEOVIM_FN_WINDOW_DEL_VAR:
1877 		emit err_window_del_var(errMsg, res);
1878 		break;
1879 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_OPTION:
1880 		emit err_nvim_win_get_option(errMsg, res);
1881 		break;
1882 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_OPTION:
1883 		emit err_nvim_win_set_option(errMsg, res);
1884 		break;
1885 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_POSITION:
1886 		emit err_nvim_win_get_position(errMsg, res);
1887 		break;
1888 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_TABPAGE:
1889 		emit err_nvim_win_get_tabpage(errMsg, res);
1890 		break;
1891 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_NUMBER:
1892 		emit err_nvim_win_get_number(errMsg, res);
1893 		break;
1894 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_IS_VALID:
1895 		emit err_nvim_win_is_valid(errMsg, res);
1896 		break;
1897 	case NeovimApi2::NEOVIM_FN_BUFFER_LINE_COUNT:
1898 		emit err_buffer_line_count(errMsg, res);
1899 		break;
1900 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_LINES:
1901 		emit err_buffer_get_lines(errMsg, res);
1902 		break;
1903 	case NeovimApi2::NEOVIM_FN_BUFFER_SET_LINES:
1904 		emit err_buffer_set_lines(errMsg, res);
1905 		break;
1906 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_VAR:
1907 		emit err_buffer_get_var(errMsg, res);
1908 		break;
1909 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_OPTION:
1910 		emit err_buffer_get_option(errMsg, res);
1911 		break;
1912 	case NeovimApi2::NEOVIM_FN_BUFFER_SET_OPTION:
1913 		emit err_buffer_set_option(errMsg, res);
1914 		break;
1915 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_NUMBER:
1916 		emit err_buffer_get_number(errMsg, res);
1917 		break;
1918 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_NAME:
1919 		emit err_buffer_get_name(errMsg, res);
1920 		break;
1921 	case NeovimApi2::NEOVIM_FN_BUFFER_SET_NAME:
1922 		emit err_buffer_set_name(errMsg, res);
1923 		break;
1924 	case NeovimApi2::NEOVIM_FN_BUFFER_IS_VALID:
1925 		emit err_buffer_is_valid(errMsg, res);
1926 		break;
1927 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_MARK:
1928 		emit err_buffer_get_mark(errMsg, res);
1929 		break;
1930 	case NeovimApi2::NEOVIM_FN_BUFFER_ADD_HIGHLIGHT:
1931 		emit err_buffer_add_highlight(errMsg, res);
1932 		break;
1933 	case NeovimApi2::NEOVIM_FN_BUFFER_CLEAR_HIGHLIGHT:
1934 		emit err_buffer_clear_highlight(errMsg, res);
1935 		break;
1936 	case NeovimApi2::NEOVIM_FN_TABPAGE_GET_WINDOWS:
1937 		emit err_tabpage_get_windows(errMsg, res);
1938 		break;
1939 	case NeovimApi2::NEOVIM_FN_TABPAGE_GET_VAR:
1940 		emit err_tabpage_get_var(errMsg, res);
1941 		break;
1942 	case NeovimApi2::NEOVIM_FN_TABPAGE_GET_WINDOW:
1943 		emit err_tabpage_get_window(errMsg, res);
1944 		break;
1945 	case NeovimApi2::NEOVIM_FN_TABPAGE_IS_VALID:
1946 		emit err_tabpage_is_valid(errMsg, res);
1947 		break;
1948 	case NeovimApi2::NEOVIM_FN_UI_DETACH:
1949 		emit err_ui_detach(errMsg, res);
1950 		break;
1951 	case NeovimApi2::NEOVIM_FN_UI_TRY_RESIZE:
1952 		emit err_ui_try_resize(errMsg, res);
1953 		break;
1954 	case NeovimApi2::NEOVIM_FN_VIM_COMMAND:
1955 		emit err_vim_command(errMsg, res);
1956 		break;
1957 	case NeovimApi2::NEOVIM_FN_VIM_FEEDKEYS:
1958 		emit err_vim_feedkeys(errMsg, res);
1959 		break;
1960 	case NeovimApi2::NEOVIM_FN_VIM_INPUT:
1961 		emit err_vim_input(errMsg, res);
1962 		break;
1963 	case NeovimApi2::NEOVIM_FN_VIM_REPLACE_TERMCODES:
1964 		emit err_vim_replace_termcodes(errMsg, res);
1965 		break;
1966 	case NeovimApi2::NEOVIM_FN_VIM_COMMAND_OUTPUT:
1967 		emit err_vim_command_output(errMsg, res);
1968 		break;
1969 	case NeovimApi2::NEOVIM_FN_VIM_EVAL:
1970 		emit err_vim_eval(errMsg, res);
1971 		break;
1972 	case NeovimApi2::NEOVIM_FN_VIM_CALL_FUNCTION:
1973 		emit err_vim_call_function(errMsg, res);
1974 		break;
1975 	case NeovimApi2::NEOVIM_FN_VIM_STRWIDTH:
1976 		emit err_vim_strwidth(errMsg, res);
1977 		break;
1978 	case NeovimApi2::NEOVIM_FN_VIM_LIST_RUNTIME_PATHS:
1979 		emit err_vim_list_runtime_paths(errMsg, res);
1980 		break;
1981 	case NeovimApi2::NEOVIM_FN_VIM_CHANGE_DIRECTORY:
1982 		emit err_vim_change_directory(errMsg, res);
1983 		break;
1984 	case NeovimApi2::NEOVIM_FN_VIM_GET_CURRENT_LINE:
1985 		emit err_vim_get_current_line(errMsg, res);
1986 		break;
1987 	case NeovimApi2::NEOVIM_FN_VIM_SET_CURRENT_LINE:
1988 		emit err_vim_set_current_line(errMsg, res);
1989 		break;
1990 	case NeovimApi2::NEOVIM_FN_VIM_DEL_CURRENT_LINE:
1991 		emit err_vim_del_current_line(errMsg, res);
1992 		break;
1993 	case NeovimApi2::NEOVIM_FN_VIM_GET_VAR:
1994 		emit err_vim_get_var(errMsg, res);
1995 		break;
1996 	case NeovimApi2::NEOVIM_FN_VIM_GET_VVAR:
1997 		emit err_vim_get_vvar(errMsg, res);
1998 		break;
1999 	case NeovimApi2::NEOVIM_FN_VIM_GET_OPTION:
2000 		emit err_vim_get_option(errMsg, res);
2001 		break;
2002 	case NeovimApi2::NEOVIM_FN_VIM_SET_OPTION:
2003 		emit err_vim_set_option(errMsg, res);
2004 		break;
2005 	case NeovimApi2::NEOVIM_FN_VIM_OUT_WRITE:
2006 		emit err_vim_out_write(errMsg, res);
2007 		break;
2008 	case NeovimApi2::NEOVIM_FN_VIM_ERR_WRITE:
2009 		emit err_vim_err_write(errMsg, res);
2010 		break;
2011 	case NeovimApi2::NEOVIM_FN_VIM_REPORT_ERROR:
2012 		emit err_vim_report_error(errMsg, res);
2013 		break;
2014 	case NeovimApi2::NEOVIM_FN_VIM_GET_BUFFERS:
2015 		emit err_vim_get_buffers(errMsg, res);
2016 		break;
2017 	case NeovimApi2::NEOVIM_FN_VIM_GET_CURRENT_BUFFER:
2018 		emit err_vim_get_current_buffer(errMsg, res);
2019 		break;
2020 	case NeovimApi2::NEOVIM_FN_VIM_SET_CURRENT_BUFFER:
2021 		emit err_vim_set_current_buffer(errMsg, res);
2022 		break;
2023 	case NeovimApi2::NEOVIM_FN_VIM_GET_WINDOWS:
2024 		emit err_vim_get_windows(errMsg, res);
2025 		break;
2026 	case NeovimApi2::NEOVIM_FN_VIM_GET_CURRENT_WINDOW:
2027 		emit err_vim_get_current_window(errMsg, res);
2028 		break;
2029 	case NeovimApi2::NEOVIM_FN_VIM_SET_CURRENT_WINDOW:
2030 		emit err_vim_set_current_window(errMsg, res);
2031 		break;
2032 	case NeovimApi2::NEOVIM_FN_VIM_GET_TABPAGES:
2033 		emit err_vim_get_tabpages(errMsg, res);
2034 		break;
2035 	case NeovimApi2::NEOVIM_FN_VIM_GET_CURRENT_TABPAGE:
2036 		emit err_vim_get_current_tabpage(errMsg, res);
2037 		break;
2038 	case NeovimApi2::NEOVIM_FN_VIM_SET_CURRENT_TABPAGE:
2039 		emit err_vim_set_current_tabpage(errMsg, res);
2040 		break;
2041 	case NeovimApi2::NEOVIM_FN_VIM_SUBSCRIBE:
2042 		emit err_vim_subscribe(errMsg, res);
2043 		break;
2044 	case NeovimApi2::NEOVIM_FN_VIM_UNSUBSCRIBE:
2045 		emit err_vim_unsubscribe(errMsg, res);
2046 		break;
2047 	case NeovimApi2::NEOVIM_FN_VIM_NAME_TO_COLOR:
2048 		emit err_vim_name_to_color(errMsg, res);
2049 		break;
2050 	case NeovimApi2::NEOVIM_FN_VIM_GET_COLOR_MAP:
2051 		emit err_vim_get_color_map(errMsg, res);
2052 		break;
2053 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_BUFFER:
2054 		emit err_window_get_buffer(errMsg, res);
2055 		break;
2056 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_CURSOR:
2057 		emit err_window_get_cursor(errMsg, res);
2058 		break;
2059 	case NeovimApi2::NEOVIM_FN_WINDOW_SET_CURSOR:
2060 		emit err_window_set_cursor(errMsg, res);
2061 		break;
2062 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_HEIGHT:
2063 		emit err_window_get_height(errMsg, res);
2064 		break;
2065 	case NeovimApi2::NEOVIM_FN_WINDOW_SET_HEIGHT:
2066 		emit err_window_set_height(errMsg, res);
2067 		break;
2068 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_WIDTH:
2069 		emit err_window_get_width(errMsg, res);
2070 		break;
2071 	case NeovimApi2::NEOVIM_FN_WINDOW_SET_WIDTH:
2072 		emit err_window_set_width(errMsg, res);
2073 		break;
2074 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_VAR:
2075 		emit err_window_get_var(errMsg, res);
2076 		break;
2077 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_OPTION:
2078 		emit err_window_get_option(errMsg, res);
2079 		break;
2080 	case NeovimApi2::NEOVIM_FN_WINDOW_SET_OPTION:
2081 		emit err_window_set_option(errMsg, res);
2082 		break;
2083 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_POSITION:
2084 		emit err_window_get_position(errMsg, res);
2085 		break;
2086 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_TABPAGE:
2087 		emit err_window_get_tabpage(errMsg, res);
2088 		break;
2089 	case NeovimApi2::NEOVIM_FN_WINDOW_IS_VALID:
2090 		emit err_window_is_valid(errMsg, res);
2091 		break;
2092 	default:
2093 		m_c->setError(NeovimConnector::RuntimeMsgpackError, QString("Received error for function that should not fail: %s").arg(fun));
2094 	}
2095 }
2096 
handleResponse(quint32 msgid,quint64 fun,const QVariant & res)2097 void NeovimApi2::handleResponse(quint32 msgid, quint64 fun, const QVariant& res)
2098 {
2099 	switch(fun) {
2100 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_LINE_COUNT:
2101 		{
2102 			int64_t data;
2103 			if (decode(res, data)) {
2104 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_buf_line_count");
2105 				return;
2106 			} else {
2107 				emit on_nvim_buf_line_count(data);
2108 			}
2109 
2110 		}
2111 		break;
2112 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_LINE:
2113 		{
2114 			QByteArray data;
2115 			if (decode(res, data)) {
2116 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for buffer_get_line");
2117 				return;
2118 			} else {
2119 				emit on_buffer_get_line(data);
2120 			}
2121 
2122 		}
2123 		break;
2124 	case NeovimApi2::NEOVIM_FN_BUFFER_SET_LINE:
2125 		{
2126 			emit on_buffer_set_line();
2127 
2128 		}
2129 		break;
2130 	case NeovimApi2::NEOVIM_FN_BUFFER_DEL_LINE:
2131 		{
2132 			emit on_buffer_del_line();
2133 
2134 		}
2135 		break;
2136 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_LINE_SLICE:
2137 		{
2138 			QList<QByteArray> data;
2139 			if (decode(res, data)) {
2140 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for buffer_get_line_slice");
2141 				return;
2142 			} else {
2143 				emit on_buffer_get_line_slice(data);
2144 			}
2145 
2146 		}
2147 		break;
2148 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_LINES:
2149 		{
2150 			QList<QByteArray> data;
2151 			if (decode(res, data)) {
2152 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_buf_get_lines");
2153 				return;
2154 			} else {
2155 				emit on_nvim_buf_get_lines(data);
2156 			}
2157 
2158 		}
2159 		break;
2160 	case NeovimApi2::NEOVIM_FN_BUFFER_SET_LINE_SLICE:
2161 		{
2162 			emit on_buffer_set_line_slice();
2163 
2164 		}
2165 		break;
2166 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_SET_LINES:
2167 		{
2168 			emit on_nvim_buf_set_lines();
2169 
2170 		}
2171 		break;
2172 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_VAR:
2173 		{
2174 			QVariant data;
2175 			if (decode(res, data)) {
2176 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_buf_get_var");
2177 				return;
2178 			} else {
2179 				emit on_nvim_buf_get_var(data);
2180 			}
2181 
2182 		}
2183 		break;
2184 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_CHANGEDTICK:
2185 		{
2186 			int64_t data;
2187 			if (decode(res, data)) {
2188 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_buf_get_changedtick");
2189 				return;
2190 			} else {
2191 				emit on_nvim_buf_get_changedtick(data);
2192 			}
2193 
2194 		}
2195 		break;
2196 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_SET_VAR:
2197 		{
2198 			emit on_nvim_buf_set_var();
2199 
2200 		}
2201 		break;
2202 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_DEL_VAR:
2203 		{
2204 			emit on_nvim_buf_del_var();
2205 
2206 		}
2207 		break;
2208 	case NeovimApi2::NEOVIM_FN_BUFFER_SET_VAR:
2209 		{
2210 			QVariant data;
2211 			if (decode(res, data)) {
2212 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for buffer_set_var");
2213 				return;
2214 			} else {
2215 				emit on_buffer_set_var(data);
2216 			}
2217 
2218 		}
2219 		break;
2220 	case NeovimApi2::NEOVIM_FN_BUFFER_DEL_VAR:
2221 		{
2222 			QVariant data;
2223 			if (decode(res, data)) {
2224 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for buffer_del_var");
2225 				return;
2226 			} else {
2227 				emit on_buffer_del_var(data);
2228 			}
2229 
2230 		}
2231 		break;
2232 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_OPTION:
2233 		{
2234 			QVariant data;
2235 			if (decode(res, data)) {
2236 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_buf_get_option");
2237 				return;
2238 			} else {
2239 				emit on_nvim_buf_get_option(data);
2240 			}
2241 
2242 		}
2243 		break;
2244 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_SET_OPTION:
2245 		{
2246 			emit on_nvim_buf_set_option();
2247 
2248 		}
2249 		break;
2250 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_NUMBER:
2251 		{
2252 			int64_t data;
2253 			if (decode(res, data)) {
2254 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_buf_get_number");
2255 				return;
2256 			} else {
2257 				emit on_nvim_buf_get_number(data);
2258 			}
2259 
2260 		}
2261 		break;
2262 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_NAME:
2263 		{
2264 			QByteArray data;
2265 			if (decode(res, data)) {
2266 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_buf_get_name");
2267 				return;
2268 			} else {
2269 				emit on_nvim_buf_get_name(data);
2270 			}
2271 
2272 		}
2273 		break;
2274 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_SET_NAME:
2275 		{
2276 			emit on_nvim_buf_set_name();
2277 
2278 		}
2279 		break;
2280 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_IS_VALID:
2281 		{
2282 			bool data;
2283 			if (decode(res, data)) {
2284 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_buf_is_valid");
2285 				return;
2286 			} else {
2287 				emit on_nvim_buf_is_valid(data);
2288 			}
2289 
2290 		}
2291 		break;
2292 	case NeovimApi2::NEOVIM_FN_BUFFER_INSERT:
2293 		{
2294 			emit on_buffer_insert();
2295 
2296 		}
2297 		break;
2298 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_GET_MARK:
2299 		{
2300 			QPoint data;
2301 			if (decode(res, data)) {
2302 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_buf_get_mark");
2303 				return;
2304 			} else {
2305 				emit on_nvim_buf_get_mark(data);
2306 			}
2307 
2308 		}
2309 		break;
2310 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_ADD_HIGHLIGHT:
2311 		{
2312 			int64_t data;
2313 			if (decode(res, data)) {
2314 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_buf_add_highlight");
2315 				return;
2316 			} else {
2317 				emit on_nvim_buf_add_highlight(data);
2318 			}
2319 
2320 		}
2321 		break;
2322 	case NeovimApi2::NEOVIM_FN_NVIM_BUF_CLEAR_HIGHLIGHT:
2323 		{
2324 			emit on_nvim_buf_clear_highlight();
2325 
2326 		}
2327 		break;
2328 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_LIST_WINS:
2329 		{
2330 			QList<int64_t> data;
2331 			if (decode(res, data)) {
2332 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_tabpage_list_wins");
2333 				return;
2334 			} else {
2335 				emit on_nvim_tabpage_list_wins(data);
2336 			}
2337 
2338 		}
2339 		break;
2340 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_GET_VAR:
2341 		{
2342 			QVariant data;
2343 			if (decode(res, data)) {
2344 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_tabpage_get_var");
2345 				return;
2346 			} else {
2347 				emit on_nvim_tabpage_get_var(data);
2348 			}
2349 
2350 		}
2351 		break;
2352 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_SET_VAR:
2353 		{
2354 			emit on_nvim_tabpage_set_var();
2355 
2356 		}
2357 		break;
2358 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_DEL_VAR:
2359 		{
2360 			emit on_nvim_tabpage_del_var();
2361 
2362 		}
2363 		break;
2364 	case NeovimApi2::NEOVIM_FN_TABPAGE_SET_VAR:
2365 		{
2366 			QVariant data;
2367 			if (decode(res, data)) {
2368 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for tabpage_set_var");
2369 				return;
2370 			} else {
2371 				emit on_tabpage_set_var(data);
2372 			}
2373 
2374 		}
2375 		break;
2376 	case NeovimApi2::NEOVIM_FN_TABPAGE_DEL_VAR:
2377 		{
2378 			QVariant data;
2379 			if (decode(res, data)) {
2380 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for tabpage_del_var");
2381 				return;
2382 			} else {
2383 				emit on_tabpage_del_var(data);
2384 			}
2385 
2386 		}
2387 		break;
2388 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_GET_WIN:
2389 		{
2390 			int64_t data;
2391 			if (decode(res, data)) {
2392 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_tabpage_get_win");
2393 				return;
2394 			} else {
2395 				emit on_nvim_tabpage_get_win(data);
2396 			}
2397 
2398 		}
2399 		break;
2400 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_GET_NUMBER:
2401 		{
2402 			int64_t data;
2403 			if (decode(res, data)) {
2404 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_tabpage_get_number");
2405 				return;
2406 			} else {
2407 				emit on_nvim_tabpage_get_number(data);
2408 			}
2409 
2410 		}
2411 		break;
2412 	case NeovimApi2::NEOVIM_FN_NVIM_TABPAGE_IS_VALID:
2413 		{
2414 			bool data;
2415 			if (decode(res, data)) {
2416 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_tabpage_is_valid");
2417 				return;
2418 			} else {
2419 				emit on_nvim_tabpage_is_valid(data);
2420 			}
2421 
2422 		}
2423 		break;
2424 	case NeovimApi2::NEOVIM_FN_NVIM_UI_ATTACH:
2425 		{
2426 			emit on_nvim_ui_attach();
2427 
2428 		}
2429 		break;
2430 	case NeovimApi2::NEOVIM_FN_UI_ATTACH:
2431 		{
2432 			emit on_ui_attach();
2433 
2434 		}
2435 		break;
2436 	case NeovimApi2::NEOVIM_FN_NVIM_UI_DETACH:
2437 		{
2438 			emit on_nvim_ui_detach();
2439 
2440 		}
2441 		break;
2442 	case NeovimApi2::NEOVIM_FN_NVIM_UI_TRY_RESIZE:
2443 		{
2444 			emit on_nvim_ui_try_resize();
2445 
2446 		}
2447 		break;
2448 	case NeovimApi2::NEOVIM_FN_NVIM_UI_SET_OPTION:
2449 		{
2450 			emit on_nvim_ui_set_option();
2451 
2452 		}
2453 		break;
2454 	case NeovimApi2::NEOVIM_FN_NVIM_COMMAND:
2455 		{
2456 			emit on_nvim_command();
2457 
2458 		}
2459 		break;
2460 	case NeovimApi2::NEOVIM_FN_NVIM_FEEDKEYS:
2461 		{
2462 			emit on_nvim_feedkeys();
2463 
2464 		}
2465 		break;
2466 	case NeovimApi2::NEOVIM_FN_NVIM_INPUT:
2467 		{
2468 			int64_t data;
2469 			if (decode(res, data)) {
2470 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_input");
2471 				return;
2472 			} else {
2473 				emit on_nvim_input(data);
2474 			}
2475 
2476 		}
2477 		break;
2478 	case NeovimApi2::NEOVIM_FN_NVIM_REPLACE_TERMCODES:
2479 		{
2480 			QByteArray data;
2481 			if (decode(res, data)) {
2482 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_replace_termcodes");
2483 				return;
2484 			} else {
2485 				emit on_nvim_replace_termcodes(data);
2486 			}
2487 
2488 		}
2489 		break;
2490 	case NeovimApi2::NEOVIM_FN_NVIM_COMMAND_OUTPUT:
2491 		{
2492 			QByteArray data;
2493 			if (decode(res, data)) {
2494 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_command_output");
2495 				return;
2496 			} else {
2497 				emit on_nvim_command_output(data);
2498 			}
2499 
2500 		}
2501 		break;
2502 	case NeovimApi2::NEOVIM_FN_NVIM_EVAL:
2503 		{
2504 			QVariant data;
2505 			if (decode(res, data)) {
2506 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_eval");
2507 				return;
2508 			} else {
2509 				emit on_nvim_eval(data);
2510 			}
2511 
2512 		}
2513 		break;
2514 	case NeovimApi2::NEOVIM_FN_NVIM_CALL_FUNCTION:
2515 		{
2516 			QVariant data;
2517 			if (decode(res, data)) {
2518 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_call_function");
2519 				return;
2520 			} else {
2521 				emit on_nvim_call_function(data);
2522 			}
2523 
2524 		}
2525 		break;
2526 	case NeovimApi2::NEOVIM_FN_NVIM_STRWIDTH:
2527 		{
2528 			int64_t data;
2529 			if (decode(res, data)) {
2530 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_strwidth");
2531 				return;
2532 			} else {
2533 				emit on_nvim_strwidth(data);
2534 			}
2535 
2536 		}
2537 		break;
2538 	case NeovimApi2::NEOVIM_FN_NVIM_LIST_RUNTIME_PATHS:
2539 		{
2540 			QList<QByteArray> data;
2541 			if (decode(res, data)) {
2542 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_list_runtime_paths");
2543 				return;
2544 			} else {
2545 				emit on_nvim_list_runtime_paths(data);
2546 			}
2547 
2548 		}
2549 		break;
2550 	case NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_DIR:
2551 		{
2552 			emit on_nvim_set_current_dir();
2553 
2554 		}
2555 		break;
2556 	case NeovimApi2::NEOVIM_FN_NVIM_GET_CURRENT_LINE:
2557 		{
2558 			QByteArray data;
2559 			if (decode(res, data)) {
2560 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_get_current_line");
2561 				return;
2562 			} else {
2563 				emit on_nvim_get_current_line(data);
2564 			}
2565 
2566 		}
2567 		break;
2568 	case NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_LINE:
2569 		{
2570 			emit on_nvim_set_current_line();
2571 
2572 		}
2573 		break;
2574 	case NeovimApi2::NEOVIM_FN_NVIM_DEL_CURRENT_LINE:
2575 		{
2576 			emit on_nvim_del_current_line();
2577 
2578 		}
2579 		break;
2580 	case NeovimApi2::NEOVIM_FN_NVIM_GET_VAR:
2581 		{
2582 			QVariant data;
2583 			if (decode(res, data)) {
2584 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_get_var");
2585 				return;
2586 			} else {
2587 				emit on_nvim_get_var(data);
2588 			}
2589 
2590 		}
2591 		break;
2592 	case NeovimApi2::NEOVIM_FN_NVIM_SET_VAR:
2593 		{
2594 			emit on_nvim_set_var();
2595 
2596 		}
2597 		break;
2598 	case NeovimApi2::NEOVIM_FN_NVIM_DEL_VAR:
2599 		{
2600 			emit on_nvim_del_var();
2601 
2602 		}
2603 		break;
2604 	case NeovimApi2::NEOVIM_FN_VIM_SET_VAR:
2605 		{
2606 			QVariant data;
2607 			if (decode(res, data)) {
2608 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_set_var");
2609 				return;
2610 			} else {
2611 				emit on_vim_set_var(data);
2612 			}
2613 
2614 		}
2615 		break;
2616 	case NeovimApi2::NEOVIM_FN_VIM_DEL_VAR:
2617 		{
2618 			QVariant data;
2619 			if (decode(res, data)) {
2620 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_del_var");
2621 				return;
2622 			} else {
2623 				emit on_vim_del_var(data);
2624 			}
2625 
2626 		}
2627 		break;
2628 	case NeovimApi2::NEOVIM_FN_NVIM_GET_VVAR:
2629 		{
2630 			QVariant data;
2631 			if (decode(res, data)) {
2632 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_get_vvar");
2633 				return;
2634 			} else {
2635 				emit on_nvim_get_vvar(data);
2636 			}
2637 
2638 		}
2639 		break;
2640 	case NeovimApi2::NEOVIM_FN_NVIM_GET_OPTION:
2641 		{
2642 			QVariant data;
2643 			if (decode(res, data)) {
2644 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_get_option");
2645 				return;
2646 			} else {
2647 				emit on_nvim_get_option(data);
2648 			}
2649 
2650 		}
2651 		break;
2652 	case NeovimApi2::NEOVIM_FN_NVIM_SET_OPTION:
2653 		{
2654 			emit on_nvim_set_option();
2655 
2656 		}
2657 		break;
2658 	case NeovimApi2::NEOVIM_FN_NVIM_OUT_WRITE:
2659 		{
2660 			emit on_nvim_out_write();
2661 
2662 		}
2663 		break;
2664 	case NeovimApi2::NEOVIM_FN_NVIM_ERR_WRITE:
2665 		{
2666 			emit on_nvim_err_write();
2667 
2668 		}
2669 		break;
2670 	case NeovimApi2::NEOVIM_FN_NVIM_ERR_WRITELN:
2671 		{
2672 			emit on_nvim_err_writeln();
2673 
2674 		}
2675 		break;
2676 	case NeovimApi2::NEOVIM_FN_NVIM_LIST_BUFS:
2677 		{
2678 			QList<int64_t> data;
2679 			if (decode(res, data)) {
2680 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_list_bufs");
2681 				return;
2682 			} else {
2683 				emit on_nvim_list_bufs(data);
2684 			}
2685 
2686 		}
2687 		break;
2688 	case NeovimApi2::NEOVIM_FN_NVIM_GET_CURRENT_BUF:
2689 		{
2690 			int64_t data;
2691 			if (decode(res, data)) {
2692 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_get_current_buf");
2693 				return;
2694 			} else {
2695 				emit on_nvim_get_current_buf(data);
2696 			}
2697 
2698 		}
2699 		break;
2700 	case NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_BUF:
2701 		{
2702 			emit on_nvim_set_current_buf();
2703 
2704 		}
2705 		break;
2706 	case NeovimApi2::NEOVIM_FN_NVIM_LIST_WINS:
2707 		{
2708 			QList<int64_t> data;
2709 			if (decode(res, data)) {
2710 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_list_wins");
2711 				return;
2712 			} else {
2713 				emit on_nvim_list_wins(data);
2714 			}
2715 
2716 		}
2717 		break;
2718 	case NeovimApi2::NEOVIM_FN_NVIM_GET_CURRENT_WIN:
2719 		{
2720 			int64_t data;
2721 			if (decode(res, data)) {
2722 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_get_current_win");
2723 				return;
2724 			} else {
2725 				emit on_nvim_get_current_win(data);
2726 			}
2727 
2728 		}
2729 		break;
2730 	case NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_WIN:
2731 		{
2732 			emit on_nvim_set_current_win();
2733 
2734 		}
2735 		break;
2736 	case NeovimApi2::NEOVIM_FN_NVIM_LIST_TABPAGES:
2737 		{
2738 			QList<int64_t> data;
2739 			if (decode(res, data)) {
2740 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_list_tabpages");
2741 				return;
2742 			} else {
2743 				emit on_nvim_list_tabpages(data);
2744 			}
2745 
2746 		}
2747 		break;
2748 	case NeovimApi2::NEOVIM_FN_NVIM_GET_CURRENT_TABPAGE:
2749 		{
2750 			int64_t data;
2751 			if (decode(res, data)) {
2752 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_get_current_tabpage");
2753 				return;
2754 			} else {
2755 				emit on_nvim_get_current_tabpage(data);
2756 			}
2757 
2758 		}
2759 		break;
2760 	case NeovimApi2::NEOVIM_FN_NVIM_SET_CURRENT_TABPAGE:
2761 		{
2762 			emit on_nvim_set_current_tabpage();
2763 
2764 		}
2765 		break;
2766 	case NeovimApi2::NEOVIM_FN_NVIM_SUBSCRIBE:
2767 		{
2768 			emit on_nvim_subscribe();
2769 
2770 		}
2771 		break;
2772 	case NeovimApi2::NEOVIM_FN_NVIM_UNSUBSCRIBE:
2773 		{
2774 			emit on_nvim_unsubscribe();
2775 
2776 		}
2777 		break;
2778 	case NeovimApi2::NEOVIM_FN_NVIM_GET_COLOR_BY_NAME:
2779 		{
2780 			int64_t data;
2781 			if (decode(res, data)) {
2782 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_get_color_by_name");
2783 				return;
2784 			} else {
2785 				emit on_nvim_get_color_by_name(data);
2786 			}
2787 
2788 		}
2789 		break;
2790 	case NeovimApi2::NEOVIM_FN_NVIM_GET_COLOR_MAP:
2791 		{
2792 			QVariantMap data;
2793 			if (decode(res, data)) {
2794 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_get_color_map");
2795 				return;
2796 			} else {
2797 				emit on_nvim_get_color_map(data);
2798 			}
2799 
2800 		}
2801 		break;
2802 	case NeovimApi2::NEOVIM_FN_NVIM_GET_MODE:
2803 		{
2804 			QVariantMap data;
2805 			if (decode(res, data)) {
2806 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_get_mode");
2807 				return;
2808 			} else {
2809 				emit on_nvim_get_mode(data);
2810 			}
2811 
2812 		}
2813 		break;
2814 	case NeovimApi2::NEOVIM_FN_NVIM_GET_API_INFO:
2815 		{
2816 			QVariantList data;
2817 			if (decode(res, data)) {
2818 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_get_api_info");
2819 				return;
2820 			} else {
2821 				emit on_nvim_get_api_info(data);
2822 			}
2823 
2824 		}
2825 		break;
2826 	case NeovimApi2::NEOVIM_FN_NVIM_CALL_ATOMIC:
2827 		{
2828 			QVariantList data;
2829 			if (decode(res, data)) {
2830 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_call_atomic");
2831 				return;
2832 			} else {
2833 				emit on_nvim_call_atomic(data);
2834 			}
2835 
2836 		}
2837 		break;
2838 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_BUF:
2839 		{
2840 			int64_t data;
2841 			if (decode(res, data)) {
2842 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_win_get_buf");
2843 				return;
2844 			} else {
2845 				emit on_nvim_win_get_buf(data);
2846 			}
2847 
2848 		}
2849 		break;
2850 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_CURSOR:
2851 		{
2852 			QPoint data;
2853 			if (decode(res, data)) {
2854 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_win_get_cursor");
2855 				return;
2856 			} else {
2857 				emit on_nvim_win_get_cursor(data);
2858 			}
2859 
2860 		}
2861 		break;
2862 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_CURSOR:
2863 		{
2864 			emit on_nvim_win_set_cursor();
2865 
2866 		}
2867 		break;
2868 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_HEIGHT:
2869 		{
2870 			int64_t data;
2871 			if (decode(res, data)) {
2872 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_win_get_height");
2873 				return;
2874 			} else {
2875 				emit on_nvim_win_get_height(data);
2876 			}
2877 
2878 		}
2879 		break;
2880 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_HEIGHT:
2881 		{
2882 			emit on_nvim_win_set_height();
2883 
2884 		}
2885 		break;
2886 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_WIDTH:
2887 		{
2888 			int64_t data;
2889 			if (decode(res, data)) {
2890 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_win_get_width");
2891 				return;
2892 			} else {
2893 				emit on_nvim_win_get_width(data);
2894 			}
2895 
2896 		}
2897 		break;
2898 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_WIDTH:
2899 		{
2900 			emit on_nvim_win_set_width();
2901 
2902 		}
2903 		break;
2904 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_VAR:
2905 		{
2906 			QVariant data;
2907 			if (decode(res, data)) {
2908 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_win_get_var");
2909 				return;
2910 			} else {
2911 				emit on_nvim_win_get_var(data);
2912 			}
2913 
2914 		}
2915 		break;
2916 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_VAR:
2917 		{
2918 			emit on_nvim_win_set_var();
2919 
2920 		}
2921 		break;
2922 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_DEL_VAR:
2923 		{
2924 			emit on_nvim_win_del_var();
2925 
2926 		}
2927 		break;
2928 	case NeovimApi2::NEOVIM_FN_WINDOW_SET_VAR:
2929 		{
2930 			QVariant data;
2931 			if (decode(res, data)) {
2932 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for window_set_var");
2933 				return;
2934 			} else {
2935 				emit on_window_set_var(data);
2936 			}
2937 
2938 		}
2939 		break;
2940 	case NeovimApi2::NEOVIM_FN_WINDOW_DEL_VAR:
2941 		{
2942 			QVariant data;
2943 			if (decode(res, data)) {
2944 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for window_del_var");
2945 				return;
2946 			} else {
2947 				emit on_window_del_var(data);
2948 			}
2949 
2950 		}
2951 		break;
2952 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_OPTION:
2953 		{
2954 			QVariant data;
2955 			if (decode(res, data)) {
2956 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_win_get_option");
2957 				return;
2958 			} else {
2959 				emit on_nvim_win_get_option(data);
2960 			}
2961 
2962 		}
2963 		break;
2964 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_SET_OPTION:
2965 		{
2966 			emit on_nvim_win_set_option();
2967 
2968 		}
2969 		break;
2970 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_POSITION:
2971 		{
2972 			QPoint data;
2973 			if (decode(res, data)) {
2974 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_win_get_position");
2975 				return;
2976 			} else {
2977 				emit on_nvim_win_get_position(data);
2978 			}
2979 
2980 		}
2981 		break;
2982 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_TABPAGE:
2983 		{
2984 			int64_t data;
2985 			if (decode(res, data)) {
2986 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_win_get_tabpage");
2987 				return;
2988 			} else {
2989 				emit on_nvim_win_get_tabpage(data);
2990 			}
2991 
2992 		}
2993 		break;
2994 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_GET_NUMBER:
2995 		{
2996 			int64_t data;
2997 			if (decode(res, data)) {
2998 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_win_get_number");
2999 				return;
3000 			} else {
3001 				emit on_nvim_win_get_number(data);
3002 			}
3003 
3004 		}
3005 		break;
3006 	case NeovimApi2::NEOVIM_FN_NVIM_WIN_IS_VALID:
3007 		{
3008 			bool data;
3009 			if (decode(res, data)) {
3010 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for nvim_win_is_valid");
3011 				return;
3012 			} else {
3013 				emit on_nvim_win_is_valid(data);
3014 			}
3015 
3016 		}
3017 		break;
3018 	case NeovimApi2::NEOVIM_FN_BUFFER_LINE_COUNT:
3019 		{
3020 			int64_t data;
3021 			if (decode(res, data)) {
3022 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for buffer_line_count");
3023 				return;
3024 			} else {
3025 				emit on_buffer_line_count(data);
3026 			}
3027 
3028 		}
3029 		break;
3030 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_LINES:
3031 		{
3032 			QList<QByteArray> data;
3033 			if (decode(res, data)) {
3034 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for buffer_get_lines");
3035 				return;
3036 			} else {
3037 				emit on_buffer_get_lines(data);
3038 			}
3039 
3040 		}
3041 		break;
3042 	case NeovimApi2::NEOVIM_FN_BUFFER_SET_LINES:
3043 		{
3044 			emit on_buffer_set_lines();
3045 
3046 		}
3047 		break;
3048 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_VAR:
3049 		{
3050 			QVariant data;
3051 			if (decode(res, data)) {
3052 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for buffer_get_var");
3053 				return;
3054 			} else {
3055 				emit on_buffer_get_var(data);
3056 			}
3057 
3058 		}
3059 		break;
3060 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_OPTION:
3061 		{
3062 			QVariant data;
3063 			if (decode(res, data)) {
3064 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for buffer_get_option");
3065 				return;
3066 			} else {
3067 				emit on_buffer_get_option(data);
3068 			}
3069 
3070 		}
3071 		break;
3072 	case NeovimApi2::NEOVIM_FN_BUFFER_SET_OPTION:
3073 		{
3074 			emit on_buffer_set_option();
3075 
3076 		}
3077 		break;
3078 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_NUMBER:
3079 		{
3080 			int64_t data;
3081 			if (decode(res, data)) {
3082 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for buffer_get_number");
3083 				return;
3084 			} else {
3085 				emit on_buffer_get_number(data);
3086 			}
3087 
3088 		}
3089 		break;
3090 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_NAME:
3091 		{
3092 			QByteArray data;
3093 			if (decode(res, data)) {
3094 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for buffer_get_name");
3095 				return;
3096 			} else {
3097 				emit on_buffer_get_name(data);
3098 			}
3099 
3100 		}
3101 		break;
3102 	case NeovimApi2::NEOVIM_FN_BUFFER_SET_NAME:
3103 		{
3104 			emit on_buffer_set_name();
3105 
3106 		}
3107 		break;
3108 	case NeovimApi2::NEOVIM_FN_BUFFER_IS_VALID:
3109 		{
3110 			bool data;
3111 			if (decode(res, data)) {
3112 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for buffer_is_valid");
3113 				return;
3114 			} else {
3115 				emit on_buffer_is_valid(data);
3116 			}
3117 
3118 		}
3119 		break;
3120 	case NeovimApi2::NEOVIM_FN_BUFFER_GET_MARK:
3121 		{
3122 			QPoint data;
3123 			if (decode(res, data)) {
3124 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for buffer_get_mark");
3125 				return;
3126 			} else {
3127 				emit on_buffer_get_mark(data);
3128 			}
3129 
3130 		}
3131 		break;
3132 	case NeovimApi2::NEOVIM_FN_BUFFER_ADD_HIGHLIGHT:
3133 		{
3134 			int64_t data;
3135 			if (decode(res, data)) {
3136 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for buffer_add_highlight");
3137 				return;
3138 			} else {
3139 				emit on_buffer_add_highlight(data);
3140 			}
3141 
3142 		}
3143 		break;
3144 	case NeovimApi2::NEOVIM_FN_BUFFER_CLEAR_HIGHLIGHT:
3145 		{
3146 			emit on_buffer_clear_highlight();
3147 
3148 		}
3149 		break;
3150 	case NeovimApi2::NEOVIM_FN_TABPAGE_GET_WINDOWS:
3151 		{
3152 			QList<int64_t> data;
3153 			if (decode(res, data)) {
3154 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for tabpage_get_windows");
3155 				return;
3156 			} else {
3157 				emit on_tabpage_get_windows(data);
3158 			}
3159 
3160 		}
3161 		break;
3162 	case NeovimApi2::NEOVIM_FN_TABPAGE_GET_VAR:
3163 		{
3164 			QVariant data;
3165 			if (decode(res, data)) {
3166 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for tabpage_get_var");
3167 				return;
3168 			} else {
3169 				emit on_tabpage_get_var(data);
3170 			}
3171 
3172 		}
3173 		break;
3174 	case NeovimApi2::NEOVIM_FN_TABPAGE_GET_WINDOW:
3175 		{
3176 			int64_t data;
3177 			if (decode(res, data)) {
3178 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for tabpage_get_window");
3179 				return;
3180 			} else {
3181 				emit on_tabpage_get_window(data);
3182 			}
3183 
3184 		}
3185 		break;
3186 	case NeovimApi2::NEOVIM_FN_TABPAGE_IS_VALID:
3187 		{
3188 			bool data;
3189 			if (decode(res, data)) {
3190 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for tabpage_is_valid");
3191 				return;
3192 			} else {
3193 				emit on_tabpage_is_valid(data);
3194 			}
3195 
3196 		}
3197 		break;
3198 	case NeovimApi2::NEOVIM_FN_UI_DETACH:
3199 		{
3200 			emit on_ui_detach();
3201 
3202 		}
3203 		break;
3204 	case NeovimApi2::NEOVIM_FN_UI_TRY_RESIZE:
3205 		{
3206 			QVariant data;
3207 			if (decode(res, data)) {
3208 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for ui_try_resize");
3209 				return;
3210 			} else {
3211 				emit on_ui_try_resize(data);
3212 			}
3213 
3214 		}
3215 		break;
3216 	case NeovimApi2::NEOVIM_FN_VIM_COMMAND:
3217 		{
3218 			emit on_vim_command();
3219 
3220 		}
3221 		break;
3222 	case NeovimApi2::NEOVIM_FN_VIM_FEEDKEYS:
3223 		{
3224 			emit on_vim_feedkeys();
3225 
3226 		}
3227 		break;
3228 	case NeovimApi2::NEOVIM_FN_VIM_INPUT:
3229 		{
3230 			int64_t data;
3231 			if (decode(res, data)) {
3232 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_input");
3233 				return;
3234 			} else {
3235 				emit on_vim_input(data);
3236 			}
3237 
3238 		}
3239 		break;
3240 	case NeovimApi2::NEOVIM_FN_VIM_REPLACE_TERMCODES:
3241 		{
3242 			QByteArray data;
3243 			if (decode(res, data)) {
3244 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_replace_termcodes");
3245 				return;
3246 			} else {
3247 				emit on_vim_replace_termcodes(data);
3248 			}
3249 
3250 		}
3251 		break;
3252 	case NeovimApi2::NEOVIM_FN_VIM_COMMAND_OUTPUT:
3253 		{
3254 			QByteArray data;
3255 			if (decode(res, data)) {
3256 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_command_output");
3257 				return;
3258 			} else {
3259 				emit on_vim_command_output(data);
3260 			}
3261 
3262 		}
3263 		break;
3264 	case NeovimApi2::NEOVIM_FN_VIM_EVAL:
3265 		{
3266 			QVariant data;
3267 			if (decode(res, data)) {
3268 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_eval");
3269 				return;
3270 			} else {
3271 				emit on_vim_eval(data);
3272 			}
3273 
3274 		}
3275 		break;
3276 	case NeovimApi2::NEOVIM_FN_VIM_CALL_FUNCTION:
3277 		{
3278 			QVariant data;
3279 			if (decode(res, data)) {
3280 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_call_function");
3281 				return;
3282 			} else {
3283 				emit on_vim_call_function(data);
3284 			}
3285 
3286 		}
3287 		break;
3288 	case NeovimApi2::NEOVIM_FN_VIM_STRWIDTH:
3289 		{
3290 			int64_t data;
3291 			if (decode(res, data)) {
3292 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_strwidth");
3293 				return;
3294 			} else {
3295 				emit on_vim_strwidth(data);
3296 			}
3297 
3298 		}
3299 		break;
3300 	case NeovimApi2::NEOVIM_FN_VIM_LIST_RUNTIME_PATHS:
3301 		{
3302 			QList<QByteArray> data;
3303 			if (decode(res, data)) {
3304 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_list_runtime_paths");
3305 				return;
3306 			} else {
3307 				emit on_vim_list_runtime_paths(data);
3308 			}
3309 
3310 		}
3311 		break;
3312 	case NeovimApi2::NEOVIM_FN_VIM_CHANGE_DIRECTORY:
3313 		{
3314 			emit on_vim_change_directory();
3315 
3316 		}
3317 		break;
3318 	case NeovimApi2::NEOVIM_FN_VIM_GET_CURRENT_LINE:
3319 		{
3320 			QByteArray data;
3321 			if (decode(res, data)) {
3322 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_get_current_line");
3323 				return;
3324 			} else {
3325 				emit on_vim_get_current_line(data);
3326 			}
3327 
3328 		}
3329 		break;
3330 	case NeovimApi2::NEOVIM_FN_VIM_SET_CURRENT_LINE:
3331 		{
3332 			emit on_vim_set_current_line();
3333 
3334 		}
3335 		break;
3336 	case NeovimApi2::NEOVIM_FN_VIM_DEL_CURRENT_LINE:
3337 		{
3338 			emit on_vim_del_current_line();
3339 
3340 		}
3341 		break;
3342 	case NeovimApi2::NEOVIM_FN_VIM_GET_VAR:
3343 		{
3344 			QVariant data;
3345 			if (decode(res, data)) {
3346 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_get_var");
3347 				return;
3348 			} else {
3349 				emit on_vim_get_var(data);
3350 			}
3351 
3352 		}
3353 		break;
3354 	case NeovimApi2::NEOVIM_FN_VIM_GET_VVAR:
3355 		{
3356 			QVariant data;
3357 			if (decode(res, data)) {
3358 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_get_vvar");
3359 				return;
3360 			} else {
3361 				emit on_vim_get_vvar(data);
3362 			}
3363 
3364 		}
3365 		break;
3366 	case NeovimApi2::NEOVIM_FN_VIM_GET_OPTION:
3367 		{
3368 			QVariant data;
3369 			if (decode(res, data)) {
3370 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_get_option");
3371 				return;
3372 			} else {
3373 				emit on_vim_get_option(data);
3374 			}
3375 
3376 		}
3377 		break;
3378 	case NeovimApi2::NEOVIM_FN_VIM_SET_OPTION:
3379 		{
3380 			emit on_vim_set_option();
3381 
3382 		}
3383 		break;
3384 	case NeovimApi2::NEOVIM_FN_VIM_OUT_WRITE:
3385 		{
3386 			emit on_vim_out_write();
3387 
3388 		}
3389 		break;
3390 	case NeovimApi2::NEOVIM_FN_VIM_ERR_WRITE:
3391 		{
3392 			emit on_vim_err_write();
3393 
3394 		}
3395 		break;
3396 	case NeovimApi2::NEOVIM_FN_VIM_REPORT_ERROR:
3397 		{
3398 			emit on_vim_report_error();
3399 
3400 		}
3401 		break;
3402 	case NeovimApi2::NEOVIM_FN_VIM_GET_BUFFERS:
3403 		{
3404 			QList<int64_t> data;
3405 			if (decode(res, data)) {
3406 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_get_buffers");
3407 				return;
3408 			} else {
3409 				emit on_vim_get_buffers(data);
3410 			}
3411 
3412 		}
3413 		break;
3414 	case NeovimApi2::NEOVIM_FN_VIM_GET_CURRENT_BUFFER:
3415 		{
3416 			int64_t data;
3417 			if (decode(res, data)) {
3418 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_get_current_buffer");
3419 				return;
3420 			} else {
3421 				emit on_vim_get_current_buffer(data);
3422 			}
3423 
3424 		}
3425 		break;
3426 	case NeovimApi2::NEOVIM_FN_VIM_SET_CURRENT_BUFFER:
3427 		{
3428 			emit on_vim_set_current_buffer();
3429 
3430 		}
3431 		break;
3432 	case NeovimApi2::NEOVIM_FN_VIM_GET_WINDOWS:
3433 		{
3434 			QList<int64_t> data;
3435 			if (decode(res, data)) {
3436 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_get_windows");
3437 				return;
3438 			} else {
3439 				emit on_vim_get_windows(data);
3440 			}
3441 
3442 		}
3443 		break;
3444 	case NeovimApi2::NEOVIM_FN_VIM_GET_CURRENT_WINDOW:
3445 		{
3446 			int64_t data;
3447 			if (decode(res, data)) {
3448 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_get_current_window");
3449 				return;
3450 			} else {
3451 				emit on_vim_get_current_window(data);
3452 			}
3453 
3454 		}
3455 		break;
3456 	case NeovimApi2::NEOVIM_FN_VIM_SET_CURRENT_WINDOW:
3457 		{
3458 			emit on_vim_set_current_window();
3459 
3460 		}
3461 		break;
3462 	case NeovimApi2::NEOVIM_FN_VIM_GET_TABPAGES:
3463 		{
3464 			QList<int64_t> data;
3465 			if (decode(res, data)) {
3466 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_get_tabpages");
3467 				return;
3468 			} else {
3469 				emit on_vim_get_tabpages(data);
3470 			}
3471 
3472 		}
3473 		break;
3474 	case NeovimApi2::NEOVIM_FN_VIM_GET_CURRENT_TABPAGE:
3475 		{
3476 			int64_t data;
3477 			if (decode(res, data)) {
3478 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_get_current_tabpage");
3479 				return;
3480 			} else {
3481 				emit on_vim_get_current_tabpage(data);
3482 			}
3483 
3484 		}
3485 		break;
3486 	case NeovimApi2::NEOVIM_FN_VIM_SET_CURRENT_TABPAGE:
3487 		{
3488 			emit on_vim_set_current_tabpage();
3489 
3490 		}
3491 		break;
3492 	case NeovimApi2::NEOVIM_FN_VIM_SUBSCRIBE:
3493 		{
3494 			emit on_vim_subscribe();
3495 
3496 		}
3497 		break;
3498 	case NeovimApi2::NEOVIM_FN_VIM_UNSUBSCRIBE:
3499 		{
3500 			emit on_vim_unsubscribe();
3501 
3502 		}
3503 		break;
3504 	case NeovimApi2::NEOVIM_FN_VIM_NAME_TO_COLOR:
3505 		{
3506 			int64_t data;
3507 			if (decode(res, data)) {
3508 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_name_to_color");
3509 				return;
3510 			} else {
3511 				emit on_vim_name_to_color(data);
3512 			}
3513 
3514 		}
3515 		break;
3516 	case NeovimApi2::NEOVIM_FN_VIM_GET_COLOR_MAP:
3517 		{
3518 			QVariantMap data;
3519 			if (decode(res, data)) {
3520 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for vim_get_color_map");
3521 				return;
3522 			} else {
3523 				emit on_vim_get_color_map(data);
3524 			}
3525 
3526 		}
3527 		break;
3528 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_BUFFER:
3529 		{
3530 			int64_t data;
3531 			if (decode(res, data)) {
3532 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for window_get_buffer");
3533 				return;
3534 			} else {
3535 				emit on_window_get_buffer(data);
3536 			}
3537 
3538 		}
3539 		break;
3540 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_CURSOR:
3541 		{
3542 			QPoint data;
3543 			if (decode(res, data)) {
3544 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for window_get_cursor");
3545 				return;
3546 			} else {
3547 				emit on_window_get_cursor(data);
3548 			}
3549 
3550 		}
3551 		break;
3552 	case NeovimApi2::NEOVIM_FN_WINDOW_SET_CURSOR:
3553 		{
3554 			emit on_window_set_cursor();
3555 
3556 		}
3557 		break;
3558 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_HEIGHT:
3559 		{
3560 			int64_t data;
3561 			if (decode(res, data)) {
3562 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for window_get_height");
3563 				return;
3564 			} else {
3565 				emit on_window_get_height(data);
3566 			}
3567 
3568 		}
3569 		break;
3570 	case NeovimApi2::NEOVIM_FN_WINDOW_SET_HEIGHT:
3571 		{
3572 			emit on_window_set_height();
3573 
3574 		}
3575 		break;
3576 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_WIDTH:
3577 		{
3578 			int64_t data;
3579 			if (decode(res, data)) {
3580 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for window_get_width");
3581 				return;
3582 			} else {
3583 				emit on_window_get_width(data);
3584 			}
3585 
3586 		}
3587 		break;
3588 	case NeovimApi2::NEOVIM_FN_WINDOW_SET_WIDTH:
3589 		{
3590 			emit on_window_set_width();
3591 
3592 		}
3593 		break;
3594 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_VAR:
3595 		{
3596 			QVariant data;
3597 			if (decode(res, data)) {
3598 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for window_get_var");
3599 				return;
3600 			} else {
3601 				emit on_window_get_var(data);
3602 			}
3603 
3604 		}
3605 		break;
3606 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_OPTION:
3607 		{
3608 			QVariant data;
3609 			if (decode(res, data)) {
3610 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for window_get_option");
3611 				return;
3612 			} else {
3613 				emit on_window_get_option(data);
3614 			}
3615 
3616 		}
3617 		break;
3618 	case NeovimApi2::NEOVIM_FN_WINDOW_SET_OPTION:
3619 		{
3620 			emit on_window_set_option();
3621 
3622 		}
3623 		break;
3624 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_POSITION:
3625 		{
3626 			QPoint data;
3627 			if (decode(res, data)) {
3628 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for window_get_position");
3629 				return;
3630 			} else {
3631 				emit on_window_get_position(data);
3632 			}
3633 
3634 		}
3635 		break;
3636 	case NeovimApi2::NEOVIM_FN_WINDOW_GET_TABPAGE:
3637 		{
3638 			int64_t data;
3639 			if (decode(res, data)) {
3640 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for window_get_tabpage");
3641 				return;
3642 			} else {
3643 				emit on_window_get_tabpage(data);
3644 			}
3645 
3646 		}
3647 		break;
3648 	case NeovimApi2::NEOVIM_FN_WINDOW_IS_VALID:
3649 		{
3650 			bool data;
3651 			if (decode(res, data)) {
3652 				m_c->setError(NeovimConnector::RuntimeMsgpackError, "Error unpacking return type for window_is_valid");
3653 				return;
3654 			} else {
3655 				emit on_window_is_valid(data);
3656 			}
3657 
3658 		}
3659 		break;
3660 	default:
3661 		qWarning() << "Received unexpected response";
3662 	}
3663 }
3664 
3665 /**
3666  * Check function table from api_metadata[1]
3667  *
3668  * This checks the API metadata build from the bindings against the metadata
3669  * passed as argument.
3670  *
3671  * Returns false if there is an API mismatch
3672  */
checkFunctions(const QVariantList & ftable)3673 bool NeovimApi2::checkFunctions(const QVariantList& ftable)
3674 {
3675 
3676 	QList<Function> required;
3677 	required
3678 		<< Function("Integer", "nvim_buf_line_count",
3679 			QList<QString>()
3680 						<< QString("Buffer")
3681 						, false)
3682 		<< Function("String", "buffer_get_line",
3683 			QList<QString>()
3684 						<< QString("Buffer")
3685 						<< QString("Integer")
3686 						, false)
3687 		<< Function("void", "buffer_set_line",
3688 			QList<QString>()
3689 						<< QString("Buffer")
3690 						<< QString("Integer")
3691 						<< QString("String")
3692 						, false)
3693 		<< Function("void", "buffer_del_line",
3694 			QList<QString>()
3695 						<< QString("Buffer")
3696 						<< QString("Integer")
3697 						, false)
3698 		<< Function("ArrayOf(String)", "buffer_get_line_slice",
3699 			QList<QString>()
3700 						<< QString("Buffer")
3701 						<< QString("Integer")
3702 						<< QString("Integer")
3703 						<< QString("Boolean")
3704 						<< QString("Boolean")
3705 						, false)
3706 		<< Function("ArrayOf(String)", "nvim_buf_get_lines",
3707 			QList<QString>()
3708 						<< QString("Buffer")
3709 						<< QString("Integer")
3710 						<< QString("Integer")
3711 						<< QString("Boolean")
3712 						, false)
3713 		<< Function("void", "buffer_set_line_slice",
3714 			QList<QString>()
3715 						<< QString("Buffer")
3716 						<< QString("Integer")
3717 						<< QString("Integer")
3718 						<< QString("Boolean")
3719 						<< QString("Boolean")
3720 						<< QString("ArrayOf(String)")
3721 						, false)
3722 		<< Function("void", "nvim_buf_set_lines",
3723 			QList<QString>()
3724 						<< QString("Buffer")
3725 						<< QString("Integer")
3726 						<< QString("Integer")
3727 						<< QString("Boolean")
3728 						<< QString("ArrayOf(String)")
3729 						, false)
3730 		<< Function("Object", "nvim_buf_get_var",
3731 			QList<QString>()
3732 						<< QString("Buffer")
3733 						<< QString("String")
3734 						, false)
3735 		<< Function("Integer", "nvim_buf_get_changedtick",
3736 			QList<QString>()
3737 						<< QString("Buffer")
3738 						, false)
3739 		<< Function("void", "nvim_buf_set_var",
3740 			QList<QString>()
3741 						<< QString("Buffer")
3742 						<< QString("String")
3743 						<< QString("Object")
3744 						, false)
3745 		<< Function("void", "nvim_buf_del_var",
3746 			QList<QString>()
3747 						<< QString("Buffer")
3748 						<< QString("String")
3749 						, false)
3750 		<< Function("Object", "buffer_set_var",
3751 			QList<QString>()
3752 						<< QString("Buffer")
3753 						<< QString("String")
3754 						<< QString("Object")
3755 						, false)
3756 		<< Function("Object", "buffer_del_var",
3757 			QList<QString>()
3758 						<< QString("Buffer")
3759 						<< QString("String")
3760 						, false)
3761 		<< Function("Object", "nvim_buf_get_option",
3762 			QList<QString>()
3763 						<< QString("Buffer")
3764 						<< QString("String")
3765 						, false)
3766 		<< Function("void", "nvim_buf_set_option",
3767 			QList<QString>()
3768 						<< QString("Buffer")
3769 						<< QString("String")
3770 						<< QString("Object")
3771 						, false)
3772 		<< Function("Integer", "nvim_buf_get_number",
3773 			QList<QString>()
3774 						<< QString("Buffer")
3775 						, false)
3776 		<< Function("String", "nvim_buf_get_name",
3777 			QList<QString>()
3778 						<< QString("Buffer")
3779 						, false)
3780 		<< Function("void", "nvim_buf_set_name",
3781 			QList<QString>()
3782 						<< QString("Buffer")
3783 						<< QString("String")
3784 						, false)
3785 		<< Function("Boolean", "nvim_buf_is_valid",
3786 			QList<QString>()
3787 						<< QString("Buffer")
3788 						, false)
3789 		<< Function("void", "buffer_insert",
3790 			QList<QString>()
3791 						<< QString("Buffer")
3792 						<< QString("Integer")
3793 						<< QString("ArrayOf(String)")
3794 						, false)
3795 		<< Function("ArrayOf(Integer, 2)", "nvim_buf_get_mark",
3796 			QList<QString>()
3797 						<< QString("Buffer")
3798 						<< QString("String")
3799 						, false)
3800 		<< Function("Integer", "nvim_buf_add_highlight",
3801 			QList<QString>()
3802 						<< QString("Buffer")
3803 						<< QString("Integer")
3804 						<< QString("String")
3805 						<< QString("Integer")
3806 						<< QString("Integer")
3807 						<< QString("Integer")
3808 						, false)
3809 		<< Function("void", "nvim_buf_clear_highlight",
3810 			QList<QString>()
3811 						<< QString("Buffer")
3812 						<< QString("Integer")
3813 						<< QString("Integer")
3814 						<< QString("Integer")
3815 						, false)
3816 		<< Function("ArrayOf(Window)", "nvim_tabpage_list_wins",
3817 			QList<QString>()
3818 						<< QString("Tabpage")
3819 						, false)
3820 		<< Function("Object", "nvim_tabpage_get_var",
3821 			QList<QString>()
3822 						<< QString("Tabpage")
3823 						<< QString("String")
3824 						, false)
3825 		<< Function("void", "nvim_tabpage_set_var",
3826 			QList<QString>()
3827 						<< QString("Tabpage")
3828 						<< QString("String")
3829 						<< QString("Object")
3830 						, false)
3831 		<< Function("void", "nvim_tabpage_del_var",
3832 			QList<QString>()
3833 						<< QString("Tabpage")
3834 						<< QString("String")
3835 						, false)
3836 		<< Function("Object", "tabpage_set_var",
3837 			QList<QString>()
3838 						<< QString("Tabpage")
3839 						<< QString("String")
3840 						<< QString("Object")
3841 						, false)
3842 		<< Function("Object", "tabpage_del_var",
3843 			QList<QString>()
3844 						<< QString("Tabpage")
3845 						<< QString("String")
3846 						, false)
3847 		<< Function("Window", "nvim_tabpage_get_win",
3848 			QList<QString>()
3849 						<< QString("Tabpage")
3850 						, false)
3851 		<< Function("Integer", "nvim_tabpage_get_number",
3852 			QList<QString>()
3853 						<< QString("Tabpage")
3854 						, false)
3855 		<< Function("Boolean", "nvim_tabpage_is_valid",
3856 			QList<QString>()
3857 						<< QString("Tabpage")
3858 						, false)
3859 		<< Function("void", "nvim_ui_attach",
3860 			QList<QString>()
3861 						<< QString("Integer")
3862 						<< QString("Integer")
3863 						<< QString("Dictionary")
3864 						, false)
3865 		<< Function("void", "ui_attach",
3866 			QList<QString>()
3867 						<< QString("Integer")
3868 						<< QString("Integer")
3869 						<< QString("Boolean")
3870 						, false)
3871 		<< Function("void", "nvim_ui_detach",
3872 			QList<QString>()
3873 						, false)
3874 		<< Function("void", "nvim_ui_try_resize",
3875 			QList<QString>()
3876 						<< QString("Integer")
3877 						<< QString("Integer")
3878 						, false)
3879 		<< Function("void", "nvim_ui_set_option",
3880 			QList<QString>()
3881 						<< QString("String")
3882 						<< QString("Object")
3883 						, false)
3884 		<< Function("void", "nvim_command",
3885 			QList<QString>()
3886 						<< QString("String")
3887 						, false)
3888 		<< Function("void", "nvim_feedkeys",
3889 			QList<QString>()
3890 						<< QString("String")
3891 						<< QString("String")
3892 						<< QString("Boolean")
3893 						, false)
3894 		<< Function("Integer", "nvim_input",
3895 			QList<QString>()
3896 						<< QString("String")
3897 						, false)
3898 		<< Function("String", "nvim_replace_termcodes",
3899 			QList<QString>()
3900 						<< QString("String")
3901 						<< QString("Boolean")
3902 						<< QString("Boolean")
3903 						<< QString("Boolean")
3904 						, false)
3905 		<< Function("String", "nvim_command_output",
3906 			QList<QString>()
3907 						<< QString("String")
3908 						, false)
3909 		<< Function("Object", "nvim_eval",
3910 			QList<QString>()
3911 						<< QString("String")
3912 						, false)
3913 		<< Function("Object", "nvim_call_function",
3914 			QList<QString>()
3915 						<< QString("String")
3916 						<< QString("Array")
3917 						, false)
3918 		<< Function("Integer", "nvim_strwidth",
3919 			QList<QString>()
3920 						<< QString("String")
3921 						, false)
3922 		<< Function("ArrayOf(String)", "nvim_list_runtime_paths",
3923 			QList<QString>()
3924 						, false)
3925 		<< Function("void", "nvim_set_current_dir",
3926 			QList<QString>()
3927 						<< QString("String")
3928 						, false)
3929 		<< Function("String", "nvim_get_current_line",
3930 			QList<QString>()
3931 						, false)
3932 		<< Function("void", "nvim_set_current_line",
3933 			QList<QString>()
3934 						<< QString("String")
3935 						, false)
3936 		<< Function("void", "nvim_del_current_line",
3937 			QList<QString>()
3938 						, false)
3939 		<< Function("Object", "nvim_get_var",
3940 			QList<QString>()
3941 						<< QString("String")
3942 						, false)
3943 		<< Function("void", "nvim_set_var",
3944 			QList<QString>()
3945 						<< QString("String")
3946 						<< QString("Object")
3947 						, false)
3948 		<< Function("void", "nvim_del_var",
3949 			QList<QString>()
3950 						<< QString("String")
3951 						, false)
3952 		<< Function("Object", "vim_set_var",
3953 			QList<QString>()
3954 						<< QString("String")
3955 						<< QString("Object")
3956 						, false)
3957 		<< Function("Object", "vim_del_var",
3958 			QList<QString>()
3959 						<< QString("String")
3960 						, false)
3961 		<< Function("Object", "nvim_get_vvar",
3962 			QList<QString>()
3963 						<< QString("String")
3964 						, false)
3965 		<< Function("Object", "nvim_get_option",
3966 			QList<QString>()
3967 						<< QString("String")
3968 						, false)
3969 		<< Function("void", "nvim_set_option",
3970 			QList<QString>()
3971 						<< QString("String")
3972 						<< QString("Object")
3973 						, false)
3974 		<< Function("void", "nvim_out_write",
3975 			QList<QString>()
3976 						<< QString("String")
3977 						, false)
3978 		<< Function("void", "nvim_err_write",
3979 			QList<QString>()
3980 						<< QString("String")
3981 						, false)
3982 		<< Function("void", "nvim_err_writeln",
3983 			QList<QString>()
3984 						<< QString("String")
3985 						, false)
3986 		<< Function("ArrayOf(Buffer)", "nvim_list_bufs",
3987 			QList<QString>()
3988 						, false)
3989 		<< Function("Buffer", "nvim_get_current_buf",
3990 			QList<QString>()
3991 						, false)
3992 		<< Function("void", "nvim_set_current_buf",
3993 			QList<QString>()
3994 						<< QString("Buffer")
3995 						, false)
3996 		<< Function("ArrayOf(Window)", "nvim_list_wins",
3997 			QList<QString>()
3998 						, false)
3999 		<< Function("Window", "nvim_get_current_win",
4000 			QList<QString>()
4001 						, false)
4002 		<< Function("void", "nvim_set_current_win",
4003 			QList<QString>()
4004 						<< QString("Window")
4005 						, false)
4006 		<< Function("ArrayOf(Tabpage)", "nvim_list_tabpages",
4007 			QList<QString>()
4008 						, false)
4009 		<< Function("Tabpage", "nvim_get_current_tabpage",
4010 			QList<QString>()
4011 						, false)
4012 		<< Function("void", "nvim_set_current_tabpage",
4013 			QList<QString>()
4014 						<< QString("Tabpage")
4015 						, false)
4016 		<< Function("void", "nvim_subscribe",
4017 			QList<QString>()
4018 						<< QString("String")
4019 						, false)
4020 		<< Function("void", "nvim_unsubscribe",
4021 			QList<QString>()
4022 						<< QString("String")
4023 						, false)
4024 		<< Function("Integer", "nvim_get_color_by_name",
4025 			QList<QString>()
4026 						<< QString("String")
4027 						, false)
4028 		<< Function("Dictionary", "nvim_get_color_map",
4029 			QList<QString>()
4030 						, false)
4031 		<< Function("Dictionary", "nvim_get_mode",
4032 			QList<QString>()
4033 						, false)
4034 		<< Function("Array", "nvim_get_api_info",
4035 			QList<QString>()
4036 						, false)
4037 		<< Function("Array", "nvim_call_atomic",
4038 			QList<QString>()
4039 						<< QString("Array")
4040 						, false)
4041 		<< Function("Buffer", "nvim_win_get_buf",
4042 			QList<QString>()
4043 						<< QString("Window")
4044 						, false)
4045 		<< Function("ArrayOf(Integer, 2)", "nvim_win_get_cursor",
4046 			QList<QString>()
4047 						<< QString("Window")
4048 						, false)
4049 		<< Function("void", "nvim_win_set_cursor",
4050 			QList<QString>()
4051 						<< QString("Window")
4052 						<< QString("ArrayOf(Integer, 2)")
4053 						, false)
4054 		<< Function("Integer", "nvim_win_get_height",
4055 			QList<QString>()
4056 						<< QString("Window")
4057 						, false)
4058 		<< Function("void", "nvim_win_set_height",
4059 			QList<QString>()
4060 						<< QString("Window")
4061 						<< QString("Integer")
4062 						, false)
4063 		<< Function("Integer", "nvim_win_get_width",
4064 			QList<QString>()
4065 						<< QString("Window")
4066 						, false)
4067 		<< Function("void", "nvim_win_set_width",
4068 			QList<QString>()
4069 						<< QString("Window")
4070 						<< QString("Integer")
4071 						, false)
4072 		<< Function("Object", "nvim_win_get_var",
4073 			QList<QString>()
4074 						<< QString("Window")
4075 						<< QString("String")
4076 						, false)
4077 		<< Function("void", "nvim_win_set_var",
4078 			QList<QString>()
4079 						<< QString("Window")
4080 						<< QString("String")
4081 						<< QString("Object")
4082 						, false)
4083 		<< Function("void", "nvim_win_del_var",
4084 			QList<QString>()
4085 						<< QString("Window")
4086 						<< QString("String")
4087 						, false)
4088 		<< Function("Object", "window_set_var",
4089 			QList<QString>()
4090 						<< QString("Window")
4091 						<< QString("String")
4092 						<< QString("Object")
4093 						, false)
4094 		<< Function("Object", "window_del_var",
4095 			QList<QString>()
4096 						<< QString("Window")
4097 						<< QString("String")
4098 						, false)
4099 		<< Function("Object", "nvim_win_get_option",
4100 			QList<QString>()
4101 						<< QString("Window")
4102 						<< QString("String")
4103 						, false)
4104 		<< Function("void", "nvim_win_set_option",
4105 			QList<QString>()
4106 						<< QString("Window")
4107 						<< QString("String")
4108 						<< QString("Object")
4109 						, false)
4110 		<< Function("ArrayOf(Integer, 2)", "nvim_win_get_position",
4111 			QList<QString>()
4112 						<< QString("Window")
4113 						, false)
4114 		<< Function("Tabpage", "nvim_win_get_tabpage",
4115 			QList<QString>()
4116 						<< QString("Window")
4117 						, false)
4118 		<< Function("Integer", "nvim_win_get_number",
4119 			QList<QString>()
4120 						<< QString("Window")
4121 						, false)
4122 		<< Function("Boolean", "nvim_win_is_valid",
4123 			QList<QString>()
4124 						<< QString("Window")
4125 						, false)
4126 		<< Function("Integer", "buffer_line_count",
4127 			QList<QString>()
4128 						<< QString("Buffer")
4129 						, false)
4130 		<< Function("ArrayOf(String)", "buffer_get_lines",
4131 			QList<QString>()
4132 						<< QString("Buffer")
4133 						<< QString("Integer")
4134 						<< QString("Integer")
4135 						<< QString("Boolean")
4136 						, false)
4137 		<< Function("void", "buffer_set_lines",
4138 			QList<QString>()
4139 						<< QString("Buffer")
4140 						<< QString("Integer")
4141 						<< QString("Integer")
4142 						<< QString("Boolean")
4143 						<< QString("ArrayOf(String)")
4144 						, false)
4145 		<< Function("Object", "buffer_get_var",
4146 			QList<QString>()
4147 						<< QString("Buffer")
4148 						<< QString("String")
4149 						, false)
4150 		<< Function("Object", "buffer_get_option",
4151 			QList<QString>()
4152 						<< QString("Buffer")
4153 						<< QString("String")
4154 						, false)
4155 		<< Function("void", "buffer_set_option",
4156 			QList<QString>()
4157 						<< QString("Buffer")
4158 						<< QString("String")
4159 						<< QString("Object")
4160 						, false)
4161 		<< Function("Integer", "buffer_get_number",
4162 			QList<QString>()
4163 						<< QString("Buffer")
4164 						, false)
4165 		<< Function("String", "buffer_get_name",
4166 			QList<QString>()
4167 						<< QString("Buffer")
4168 						, false)
4169 		<< Function("void", "buffer_set_name",
4170 			QList<QString>()
4171 						<< QString("Buffer")
4172 						<< QString("String")
4173 						, false)
4174 		<< Function("Boolean", "buffer_is_valid",
4175 			QList<QString>()
4176 						<< QString("Buffer")
4177 						, false)
4178 		<< Function("ArrayOf(Integer, 2)", "buffer_get_mark",
4179 			QList<QString>()
4180 						<< QString("Buffer")
4181 						<< QString("String")
4182 						, false)
4183 		<< Function("Integer", "buffer_add_highlight",
4184 			QList<QString>()
4185 						<< QString("Buffer")
4186 						<< QString("Integer")
4187 						<< QString("String")
4188 						<< QString("Integer")
4189 						<< QString("Integer")
4190 						<< QString("Integer")
4191 						, false)
4192 		<< Function("void", "buffer_clear_highlight",
4193 			QList<QString>()
4194 						<< QString("Buffer")
4195 						<< QString("Integer")
4196 						<< QString("Integer")
4197 						<< QString("Integer")
4198 						, false)
4199 		<< Function("ArrayOf(Window)", "tabpage_get_windows",
4200 			QList<QString>()
4201 						<< QString("Tabpage")
4202 						, false)
4203 		<< Function("Object", "tabpage_get_var",
4204 			QList<QString>()
4205 						<< QString("Tabpage")
4206 						<< QString("String")
4207 						, false)
4208 		<< Function("Window", "tabpage_get_window",
4209 			QList<QString>()
4210 						<< QString("Tabpage")
4211 						, false)
4212 		<< Function("Boolean", "tabpage_is_valid",
4213 			QList<QString>()
4214 						<< QString("Tabpage")
4215 						, false)
4216 		<< Function("void", "ui_detach",
4217 			QList<QString>()
4218 						, false)
4219 		<< Function("Object", "ui_try_resize",
4220 			QList<QString>()
4221 						<< QString("Integer")
4222 						<< QString("Integer")
4223 						, false)
4224 		<< Function("void", "vim_command",
4225 			QList<QString>()
4226 						<< QString("String")
4227 						, false)
4228 		<< Function("void", "vim_feedkeys",
4229 			QList<QString>()
4230 						<< QString("String")
4231 						<< QString("String")
4232 						<< QString("Boolean")
4233 						, false)
4234 		<< Function("Integer", "vim_input",
4235 			QList<QString>()
4236 						<< QString("String")
4237 						, false)
4238 		<< Function("String", "vim_replace_termcodes",
4239 			QList<QString>()
4240 						<< QString("String")
4241 						<< QString("Boolean")
4242 						<< QString("Boolean")
4243 						<< QString("Boolean")
4244 						, false)
4245 		<< Function("String", "vim_command_output",
4246 			QList<QString>()
4247 						<< QString("String")
4248 						, false)
4249 		<< Function("Object", "vim_eval",
4250 			QList<QString>()
4251 						<< QString("String")
4252 						, false)
4253 		<< Function("Object", "vim_call_function",
4254 			QList<QString>()
4255 						<< QString("String")
4256 						<< QString("Array")
4257 						, false)
4258 		<< Function("Integer", "vim_strwidth",
4259 			QList<QString>()
4260 						<< QString("String")
4261 						, false)
4262 		<< Function("ArrayOf(String)", "vim_list_runtime_paths",
4263 			QList<QString>()
4264 						, false)
4265 		<< Function("void", "vim_change_directory",
4266 			QList<QString>()
4267 						<< QString("String")
4268 						, false)
4269 		<< Function("String", "vim_get_current_line",
4270 			QList<QString>()
4271 						, false)
4272 		<< Function("void", "vim_set_current_line",
4273 			QList<QString>()
4274 						<< QString("String")
4275 						, false)
4276 		<< Function("void", "vim_del_current_line",
4277 			QList<QString>()
4278 						, false)
4279 		<< Function("Object", "vim_get_var",
4280 			QList<QString>()
4281 						<< QString("String")
4282 						, false)
4283 		<< Function("Object", "vim_get_vvar",
4284 			QList<QString>()
4285 						<< QString("String")
4286 						, false)
4287 		<< Function("Object", "vim_get_option",
4288 			QList<QString>()
4289 						<< QString("String")
4290 						, false)
4291 		<< Function("void", "vim_set_option",
4292 			QList<QString>()
4293 						<< QString("String")
4294 						<< QString("Object")
4295 						, false)
4296 		<< Function("void", "vim_out_write",
4297 			QList<QString>()
4298 						<< QString("String")
4299 						, false)
4300 		<< Function("void", "vim_err_write",
4301 			QList<QString>()
4302 						<< QString("String")
4303 						, false)
4304 		<< Function("void", "vim_report_error",
4305 			QList<QString>()
4306 						<< QString("String")
4307 						, false)
4308 		<< Function("ArrayOf(Buffer)", "vim_get_buffers",
4309 			QList<QString>()
4310 						, false)
4311 		<< Function("Buffer", "vim_get_current_buffer",
4312 			QList<QString>()
4313 						, false)
4314 		<< Function("void", "vim_set_current_buffer",
4315 			QList<QString>()
4316 						<< QString("Buffer")
4317 						, false)
4318 		<< Function("ArrayOf(Window)", "vim_get_windows",
4319 			QList<QString>()
4320 						, false)
4321 		<< Function("Window", "vim_get_current_window",
4322 			QList<QString>()
4323 						, false)
4324 		<< Function("void", "vim_set_current_window",
4325 			QList<QString>()
4326 						<< QString("Window")
4327 						, false)
4328 		<< Function("ArrayOf(Tabpage)", "vim_get_tabpages",
4329 			QList<QString>()
4330 						, false)
4331 		<< Function("Tabpage", "vim_get_current_tabpage",
4332 			QList<QString>()
4333 						, false)
4334 		<< Function("void", "vim_set_current_tabpage",
4335 			QList<QString>()
4336 						<< QString("Tabpage")
4337 						, false)
4338 		<< Function("void", "vim_subscribe",
4339 			QList<QString>()
4340 						<< QString("String")
4341 						, false)
4342 		<< Function("void", "vim_unsubscribe",
4343 			QList<QString>()
4344 						<< QString("String")
4345 						, false)
4346 		<< Function("Integer", "vim_name_to_color",
4347 			QList<QString>()
4348 						<< QString("String")
4349 						, false)
4350 		<< Function("Dictionary", "vim_get_color_map",
4351 			QList<QString>()
4352 						, false)
4353 		<< Function("Buffer", "window_get_buffer",
4354 			QList<QString>()
4355 						<< QString("Window")
4356 						, false)
4357 		<< Function("ArrayOf(Integer, 2)", "window_get_cursor",
4358 			QList<QString>()
4359 						<< QString("Window")
4360 						, false)
4361 		<< Function("void", "window_set_cursor",
4362 			QList<QString>()
4363 						<< QString("Window")
4364 						<< QString("ArrayOf(Integer, 2)")
4365 						, false)
4366 		<< Function("Integer", "window_get_height",
4367 			QList<QString>()
4368 						<< QString("Window")
4369 						, false)
4370 		<< Function("void", "window_set_height",
4371 			QList<QString>()
4372 						<< QString("Window")
4373 						<< QString("Integer")
4374 						, false)
4375 		<< Function("Integer", "window_get_width",
4376 			QList<QString>()
4377 						<< QString("Window")
4378 						, false)
4379 		<< Function("void", "window_set_width",
4380 			QList<QString>()
4381 						<< QString("Window")
4382 						<< QString("Integer")
4383 						, false)
4384 		<< Function("Object", "window_get_var",
4385 			QList<QString>()
4386 						<< QString("Window")
4387 						<< QString("String")
4388 						, false)
4389 		<< Function("Object", "window_get_option",
4390 			QList<QString>()
4391 						<< QString("Window")
4392 						<< QString("String")
4393 						, false)
4394 		<< Function("void", "window_set_option",
4395 			QList<QString>()
4396 						<< QString("Window")
4397 						<< QString("String")
4398 						<< QString("Object")
4399 						, false)
4400 		<< Function("ArrayOf(Integer, 2)", "window_get_position",
4401 			QList<QString>()
4402 						<< QString("Window")
4403 						, false)
4404 		<< Function("Tabpage", "window_get_tabpage",
4405 			QList<QString>()
4406 						<< QString("Window")
4407 						, false)
4408 		<< Function("Boolean", "window_is_valid",
4409 			QList<QString>()
4410 						<< QString("Window")
4411 						, false)
4412 		;
4413 
4414 
4415 	QList<Function> supported;
4416 	foreach(const QVariant& val, ftable) {
4417 		auto f = Function::fromVariant(val);
4418 		if (!f.isValid()) {
4419 			qDebug() << "Invalid function in metadata" << f;
4420 			continue;
4421 		}
4422 		supported.append(f);
4423 
4424 		if (!required.contains(f)) {
4425 			qDebug() << "Unknown function(api 2)" << f;
4426 		}
4427 	}
4428 
4429 	bool ok = true;
4430 	foreach(const Function& f, required) {
4431 		if (!supported.contains(f)) {
4432 			qDebug() << "- instance DOES NOT support API2:" << f;
4433 			ok = false;
4434 		}
4435 	}
4436 	return ok;
4437 }
4438 
4439 } // Namespace