diff --git a/src/messages/cquery_base.cc b/src/messages/cquery_base.cc index 5551c4d4..d939841c 100644 --- a/src/messages/cquery_base.cc +++ b/src/messages/cquery_base.cc @@ -3,9 +3,8 @@ #include "queue_manager.h" namespace { -struct Ipc_CqueryBase : public IpcMessage { +struct Ipc_CqueryBase : public RequestMessage { const static IpcId kIpcId = IpcId::CqueryBase; - lsRequestId id; lsTextDocumentPositionParams params; }; MAKE_REFLECT_STRUCT(Ipc_CqueryBase, id, params); diff --git a/src/messages/cquery_call_tree.cc b/src/messages/cquery_call_tree.cc index d8e8d694..cb0d8829 100644 --- a/src/messages/cquery_call_tree.cc +++ b/src/messages/cquery_call_tree.cc @@ -7,20 +7,18 @@ // FIXME Interop with VSCode, change std::string usr to Usr (uint64_t) namespace { struct Ipc_CqueryCallTreeInitial - : public IpcMessage { + : public RequestMessage { const static IpcId kIpcId = IpcId::CqueryCallTreeInitial; - lsRequestId id; lsTextDocumentPositionParams params; }; MAKE_REFLECT_STRUCT(Ipc_CqueryCallTreeInitial, id, params); REGISTER_IPC_MESSAGE(Ipc_CqueryCallTreeInitial); -struct Ipc_CqueryCallTreeExpand : public IpcMessage { +struct Ipc_CqueryCallTreeExpand : public RequestMessage { + const static IpcId kIpcId = IpcId::CqueryCallTreeExpand; struct Params { std::string usr; }; - const static IpcId kIpcId = IpcId::CqueryCallTreeExpand; - lsRequestId id; Params params; }; MAKE_REFLECT_STRUCT(Ipc_CqueryCallTreeExpand::Params, usr); diff --git a/src/messages/cquery_callers.cc b/src/messages/cquery_callers.cc index 7b9243c7..a6ddda37 100644 --- a/src/messages/cquery_callers.cc +++ b/src/messages/cquery_callers.cc @@ -3,9 +3,8 @@ #include "queue_manager.h" namespace { -struct Ipc_CqueryCallers : public IpcMessage { +struct Ipc_CqueryCallers : public RequestMessage { const static IpcId kIpcId = IpcId::CqueryCallers; - lsRequestId id; lsTextDocumentPositionParams params; }; MAKE_REFLECT_STRUCT(Ipc_CqueryCallers, id, params); diff --git a/src/messages/cquery_derived.cc b/src/messages/cquery_derived.cc index 097585ca..1ce7c202 100644 --- a/src/messages/cquery_derived.cc +++ b/src/messages/cquery_derived.cc @@ -3,9 +3,8 @@ #include "queue_manager.h" namespace { -struct Ipc_CqueryDerived : public IpcMessage { +struct Ipc_CqueryDerived : public RequestMessage { const static IpcId kIpcId = IpcId::CqueryDerived; - lsRequestId id; lsTextDocumentPositionParams params; }; MAKE_REFLECT_STRUCT(Ipc_CqueryDerived, id, params); diff --git a/src/messages/cquery_did_view.cc b/src/messages/cquery_did_view.cc index 478daaa0..7b394996 100644 --- a/src/messages/cquery_did_view.cc +++ b/src/messages/cquery_did_view.cc @@ -4,12 +4,11 @@ namespace { struct Ipc_CqueryTextDocumentDidView - : public IpcMessage { + : public NotificationMessage { + const static IpcId kIpcId = IpcId::CqueryTextDocumentDidView; struct Params { lsDocumentUri textDocumentUri; }; - - const static IpcId kIpcId = IpcId::CqueryTextDocumentDidView; Params params; }; MAKE_REFLECT_STRUCT(Ipc_CqueryTextDocumentDidView::Params, textDocumentUri); diff --git a/src/messages/cquery_freshen_index.cc b/src/messages/cquery_freshen_index.cc index da903b18..7ad8828e 100644 --- a/src/messages/cquery_freshen_index.cc +++ b/src/messages/cquery_freshen_index.cc @@ -9,9 +9,9 @@ #include namespace { -struct Ipc_CqueryFreshenIndex : public IpcMessage { +struct Ipc_CqueryFreshenIndex : public RequestMessage { const static IpcId kIpcId = IpcId::CqueryFreshenIndex; - lsRequestId id; + // FIXME fresh partial files }; MAKE_REFLECT_STRUCT(Ipc_CqueryFreshenIndex, id); REGISTER_IPC_MESSAGE(Ipc_CqueryFreshenIndex); diff --git a/src/messages/cquery_index_file.cc b/src/messages/cquery_index_file.cc index 89c48fdc..4ee52f7b 100644 --- a/src/messages/cquery_index_file.cc +++ b/src/messages/cquery_index_file.cc @@ -5,9 +5,8 @@ #include namespace { -struct Ipc_CqueryIndexFile : public IpcMessage { +struct Ipc_CqueryIndexFile : public NotificationMessage { static constexpr IpcId kIpcId = IpcId::CqueryIndexFile; - struct Params { std::string path; std::vector args; diff --git a/src/messages/cquery_member_hierarchy.cc b/src/messages/cquery_member_hierarchy.cc index e1774f9d..22b84287 100644 --- a/src/messages/cquery_member_hierarchy.cc +++ b/src/messages/cquery_member_hierarchy.cc @@ -4,18 +4,16 @@ namespace { struct Ipc_CqueryMemberHierarchyInitial - : public IpcMessage { + : public RequestMessage { const static IpcId kIpcId = IpcId::CqueryMemberHierarchyInitial; - lsRequestId id; lsTextDocumentPositionParams params; }; MAKE_REFLECT_STRUCT(Ipc_CqueryMemberHierarchyInitial, id, params); REGISTER_IPC_MESSAGE(Ipc_CqueryMemberHierarchyInitial); struct Ipc_CqueryMemberHierarchyExpand - : public IpcMessage { + : public RequestMessage { const static IpcId kIpcId = IpcId::CqueryMemberHierarchyExpand; - lsRequestId id; struct Params { size_t type_id; }; diff --git a/src/messages/cquery_type_hierarchy_tree.cc b/src/messages/cquery_type_hierarchy_tree.cc index bcd5c73c..8f42cf3b 100644 --- a/src/messages/cquery_type_hierarchy_tree.cc +++ b/src/messages/cquery_type_hierarchy_tree.cc @@ -4,9 +4,8 @@ namespace { struct Ipc_CqueryTypeHierarchyTree - : public IpcMessage { + : public RequestMessage { const static IpcId kIpcId = IpcId::CqueryTypeHierarchyTree; - lsRequestId id; lsTextDocumentPositionParams params; }; MAKE_REFLECT_STRUCT(Ipc_CqueryTypeHierarchyTree, id, params); diff --git a/src/messages/cquery_vars.cc b/src/messages/cquery_vars.cc index 92a727d5..255a138f 100644 --- a/src/messages/cquery_vars.cc +++ b/src/messages/cquery_vars.cc @@ -3,9 +3,8 @@ #include "queue_manager.h" namespace { -struct Ipc_CqueryVars : public IpcMessage { +struct Ipc_CqueryVars : public RequestMessage { const static IpcId kIpcId = IpcId::CqueryVars; - lsRequestId id; lsTextDocumentPositionParams params; }; MAKE_REFLECT_STRUCT(Ipc_CqueryVars, id, params); diff --git a/src/messages/cquery_wait.cc b/src/messages/cquery_wait.cc index 65fd626c..2e59e997 100644 --- a/src/messages/cquery_wait.cc +++ b/src/messages/cquery_wait.cc @@ -6,7 +6,7 @@ #include namespace { -struct Ipc_CqueryWait : public IpcMessage { +struct Ipc_CqueryWait : public NotificationMessage { static constexpr IpcId kIpcId = IpcId::CqueryWait; }; MAKE_REFLECT_EMPTY_STRUCT(Ipc_CqueryWait); diff --git a/src/messages/exit.cc b/src/messages/exit.cc index 8bf37c77..a0e403f4 100644 --- a/src/messages/exit.cc +++ b/src/messages/exit.cc @@ -3,7 +3,7 @@ #include namespace { -struct Ipc_Exit : public IpcMessage { +struct Ipc_Exit : public NotificationMessage { static const IpcId kIpcId = IpcId::Exit; }; MAKE_REFLECT_EMPTY_STRUCT(Ipc_Exit); diff --git a/src/messages/initialize.cc b/src/messages/initialize.cc index e829d527..1d424695 100644 --- a/src/messages/initialize.cc +++ b/src/messages/initialize.cc @@ -17,10 +17,8 @@ extern std::string g_init_options; extern int g_enable_comments; namespace { -struct Ipc_InitializeRequest : public IpcMessage { +struct Ipc_InitializeRequest : public RequestMessage { const static IpcId kIpcId = IpcId::Initialize; - - lsRequestId id; lsInitializeParams params; }; MAKE_REFLECT_STRUCT(Ipc_InitializeRequest, id, params); diff --git a/src/messages/shutdown.cc b/src/messages/shutdown.cc index 804b1c63..5755fb6a 100644 --- a/src/messages/shutdown.cc +++ b/src/messages/shutdown.cc @@ -2,9 +2,8 @@ #include "queue_manager.h" namespace { -struct Ipc_Shutdown : public IpcMessage { +struct Ipc_Shutdown : public RequestMessage { static const IpcId kIpcId = IpcId::Shutdown; - lsRequestId id; }; MAKE_REFLECT_STRUCT(Ipc_Shutdown, id); REGISTER_IPC_MESSAGE(Ipc_Shutdown);