2017-03-25 23:58:11 +00:00
|
|
|
#include "ipc.h"
|
|
|
|
|
|
|
|
#include <cassert>
|
|
|
|
|
|
|
|
const char* IpcIdToString(IpcId id) {
|
|
|
|
switch (id) {
|
2017-09-22 01:14:57 +00:00
|
|
|
case IpcId::CancelRequest:
|
|
|
|
return "$/cancelRequest";
|
|
|
|
case IpcId::Initialized:
|
|
|
|
return "initialized";
|
|
|
|
case IpcId::Exit:
|
|
|
|
return "exit";
|
2017-04-16 21:49:48 +00:00
|
|
|
|
2018-03-20 02:51:42 +00:00
|
|
|
#define CASE(name, method) \
|
|
|
|
case IpcId::name: \
|
|
|
|
return method;
|
|
|
|
#include "methods.inc"
|
2018-03-02 03:07:44 +00:00
|
|
|
#undef CASE
|
2018-02-28 07:07:53 +00:00
|
|
|
|
|
|
|
case IpcId::Unknown:
|
|
|
|
return "$unknown";
|
2017-03-25 23:58:11 +00:00
|
|
|
}
|
2018-02-13 21:01:55 +00:00
|
|
|
|
|
|
|
CQUERY_UNREACHABLE("missing IpcId string name");
|
2017-03-25 23:58:11 +00:00
|
|
|
}
|
|
|
|
|
2017-09-22 01:14:57 +00:00
|
|
|
BaseIpcMessage::BaseIpcMessage(IpcId method_id) : method_id(method_id) {}
|
2017-06-09 06:20:29 +00:00
|
|
|
|
2017-12-25 13:08:36 +00:00
|
|
|
BaseIpcMessage::~BaseIpcMessage() = default;
|
2018-01-19 18:00:06 +00:00
|
|
|
|
|
|
|
lsRequestId BaseIpcMessage::GetRequestId() {
|
|
|
|
return std::monostate();
|
|
|
|
}
|