Rui Abreu Ferreira  committed b8bf03b

Store channel Id

  • Participants
  • Parent commits eb4c0b5
  • Branches master

Comments (0)

Files changed (2)

File src/neovimconnector.cpp

 namespace NeoVimQt {
 NeoVimConnector::NeoVimConnector(QIODevice *s)
-:QObject(), m_socket(s), m_error(NoError), reqid(0), m_neovimobj(NULL)
+:QObject(), m_socket(s), m_error(NoError), reqid(0), m_neovimobj(NULL), m_channel(0)
 	msgpack_packer_init(&m_pk, this, NeoVimConnector::msgpack_write_cb);
 	msgpack_unpacker_init(&m_uk, MSGPACK_UNPACKER_INIT_BUFFER_SIZE);
-	// FIXME: store the channel id, we need to implement API notifications
+	m_channel = result.via.array.ptr[0].via.u64;
 	const msgpack_object& metadataraw = result.via.array.ptr[1];
 	// The metadata bytearray is actually a serialized msgpack 

File src/neovimconnector.h

 	QHash<Function::FunctionId, uint64_t> m_functionToId;
 	QHash<uint64_t, Function::FunctionId> m_idToFunction;
 	NeoVim *m_neovimobj;
+	uint64_t m_channel;
 }; // namespace NeoVimQt