shutdown: id

This commit is contained in:
Fangrui Song 2018-01-13 11:39:06 -08:00
parent 942a0354d3
commit b81589f6ed

View File

@ -4,8 +4,9 @@
namespace { namespace {
struct Ipc_Shutdown : public IpcMessage<Ipc_Shutdown> { struct Ipc_Shutdown : public IpcMessage<Ipc_Shutdown> {
static const IpcId kIpcId = IpcId::Shutdown; static const IpcId kIpcId = IpcId::Shutdown;
lsRequestId id;
}; };
MAKE_REFLECT_EMPTY_STRUCT(Ipc_Shutdown); MAKE_REFLECT_EMPTY_STRUCT(Ipc_Shutdown, id);
REGISTER_IPC_MESSAGE(Ipc_Shutdown); REGISTER_IPC_MESSAGE(Ipc_Shutdown);
struct Out_Shutdown : public lsOutMessage<Out_Shutdown> { struct Out_Shutdown : public lsOutMessage<Out_Shutdown> {
@ -17,6 +18,7 @@ MAKE_REFLECT_STRUCT(Out_Shutdown, jsonrpc, id, result);
struct ShutdownHandler : BaseMessageHandler<Ipc_Shutdown> { struct ShutdownHandler : BaseMessageHandler<Ipc_Shutdown> {
void Run(Ipc_Shutdown* request) override { void Run(Ipc_Shutdown* request) override {
Out_Shutdown out; Out_Shutdown out;
out.id = request->id;
QueueManager::WriteStdout(IpcId::TextDocumentDefinition, out); QueueManager::WriteStdout(IpcId::TextDocumentDefinition, out);
} }
}; };