Debian Codegraph @

LspCpp/include/LibLsp/JsonRpc/Cancellation.h

raw
1 #pragma once
2 #include <functional>
3 #include "lsRequestId.h"
4 #include <LibLsp/JsonRpc/NotificationInMessage.h>
5 using CancelMonitor = std::function<int()>;
6 namespace Cancellation
7 {
8
9 struct Params
10 {
11 /**
12 * The request id to cancel.
13 */
14 lsRequestId id;
15
16 MAKE_SWAP_METHOD(Cancellation::Params, id);
17 };
18
19 }; // namespace Cancellation
20 MAKE_REFLECT_STRUCT(Cancellation::Params, id);
21
22 DEFINE_NOTIFICATION_TYPE(Notify_Cancellation, Cancellation::Params, "$/cancelRequest");