summaryrefslogtreecommitdiff
path: root/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h')
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h
new file mode 100644
index 0000000000..b89f32f166
--- /dev/null
+++ b/graphics/asymptote/LspCpp/include/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");
+
+