aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/lsp/shutdownmessages.h
blob: 2e8da4c66dbbe76e640ffb2a37cf7fee043851cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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