summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/LspCpp/LibLsp/JsonRpc/Cancellation.h
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/LspCpp/LibLsp/JsonRpc/Cancellation.h')
-rw-r--r--Build/source/utils/asymptote/LspCpp/LibLsp/JsonRpc/Cancellation.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/LspCpp/LibLsp/JsonRpc/Cancellation.h b/Build/source/utils/asymptote/LspCpp/LibLsp/JsonRpc/Cancellation.h
new file mode 100644
index 00000000000..b89f32f1663
--- /dev/null
+++ b/Build/source/utils/asymptote/LspCpp/LibLsp/JsonRpc/Cancellation.h
@@ -0,0 +1,23 @@
+#pragma once
+#include <functional>
+#include "lsRequestId.h"
+#include <LibLsp/JsonRpc/NotificationInMessage.h>
+using CancelMonitor = std::function<int()>;
+namespace Cancellation
+{
+
+ struct Params {
+ /**
+ * The request id to cancel.
+ */
+ lsRequestId id;
+
+ MAKE_SWAP_METHOD(Cancellation::Params, id);
+ };
+
+};
+MAKE_REFLECT_STRUCT(Cancellation::Params, id);
+
+DEFINE_NOTIFICATION_TYPE(Notify_Cancellation, Cancellation::Params,"$/cancelRequest");
+
+