diff options
Diffstat (limited to 'src/shared/lsp/shutdownmessages.h')
-rw-r--r-- | src/shared/lsp/shutdownmessages.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/shared/lsp/shutdownmessages.h b/src/shared/lsp/shutdownmessages.h new file mode 100644 index 000000000..2e8da4c66 --- /dev/null +++ b/src/shared/lsp/shutdownmessages.h @@ -0,0 +1,29 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +#pragma once + +#include "jsonrpcmessages.h" + +namespace lsp { + +class LANGUAGESERVERPROTOCOL_EXPORT ShutdownRequest : public Request< + std::nullptr_t, std::nullptr_t, std::nullptr_t> +{ +public: + ShutdownRequest(); + using Request::Request; + constexpr static const char methodName[] = "shutdown"; +}; + +class LANGUAGESERVERPROTOCOL_EXPORT ExitNotification : public Notification<std::nullptr_t> +{ +public: + ExitNotification(); + using Notification::Notification; + constexpr static const char methodName[] = "exit"; + + bool parametersAreValid(QString * /*errorMessage*/) const final { return true; } +}; + +} // namespace LanguageClient |