1 | // Copyright (C) 2021 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QLANGUAGESERVERJSONRPCTRANSPORT_P_H |
5 | #define QLANGUAGESERVERJSONRPCTRANSPORT_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <QtLanguageServer/qtlanguageserverglobal.h> |
19 | #include <QtJsonRpc/private/qhttpmessagestreamparser_p.h> |
20 | #include <QtJsonRpc/private/qjsonrpctransport_p.h> |
21 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | class Q_LANGUAGESERVER_EXPORT QLanguageServerJsonRpcTransport : public QJsonRpcTransport |
25 | { |
26 | public: |
27 | QLanguageServerJsonRpcTransport() noexcept; |
28 | void sendMessage(const QJsonDocument &packet) override; |
29 | void receiveData(const QByteArray &data) override; |
30 | |
31 | private: |
32 | void (const QByteArray &field, const QByteArray &value); |
33 | void hasBody(const QByteArray &body); |
34 | |
35 | QHttpMessageStreamParser m_messageStreamParser; |
36 | }; |
37 | |
38 | QT_END_NAMESPACE |
39 | |
40 | #endif // QLANGUAGESERVERJSONRPCTRANSPORT_P_H |
41 | |