/src/qt/qtbase/src/network/access/qhttp2configuration.h
Line | Count | Source |
1 | | // Copyright (C) 2019 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 | | // Qt-Security score:significant reason:default |
4 | | |
5 | | #ifndef QHTTP2CONFIGURATION_H |
6 | | #define QHTTP2CONFIGURATION_H |
7 | | |
8 | | #include <QtNetwork/qtnetworkglobal.h> |
9 | | |
10 | | #include <QtCore/qshareddata.h> |
11 | | |
12 | | QT_REQUIRE_CONFIG(http); |
13 | | |
14 | | QT_BEGIN_NAMESPACE |
15 | | |
16 | | class QHttp2ConfigurationPrivate; |
17 | | class Q_NETWORK_EXPORT QHttp2Configuration |
18 | | { |
19 | | public: |
20 | | QHttp2Configuration(); |
21 | | QHttp2Configuration(const QHttp2Configuration &other); |
22 | | QHttp2Configuration(QHttp2Configuration &&other) noexcept; |
23 | | QHttp2Configuration &operator = (const QHttp2Configuration &other); |
24 | | QHttp2Configuration &operator = (QHttp2Configuration &&other) noexcept; |
25 | | |
26 | | ~QHttp2Configuration(); |
27 | | |
28 | | void setServerPushEnabled(bool enable); |
29 | | bool serverPushEnabled() const; |
30 | | |
31 | | void setHuffmanCompressionEnabled(bool enable); |
32 | | bool huffmanCompressionEnabled() const; |
33 | | |
34 | | bool setSessionReceiveWindowSize(unsigned size); |
35 | | unsigned sessionReceiveWindowSize() const; |
36 | | |
37 | | bool setStreamReceiveWindowSize(unsigned size); |
38 | | unsigned streamReceiveWindowSize() const; |
39 | | |
40 | | bool setMaxFrameSize(unsigned size); |
41 | | unsigned maxFrameSize() const; |
42 | | |
43 | | void setMaxConcurrentStreams(unsigned value); |
44 | | unsigned maxConcurrentStreams() const; |
45 | | |
46 | | void swap(QHttp2Configuration &other) noexcept; |
47 | | |
48 | | private: |
49 | | QSharedDataPointer<QHttp2ConfigurationPrivate> d; |
50 | | |
51 | | bool isEqual(const QHttp2Configuration &other) const noexcept; |
52 | | |
53 | | friend bool operator==(const QHttp2Configuration &lhs, const QHttp2Configuration &rhs) noexcept |
54 | 0 | { return lhs.isEqual(rhs); } |
55 | | friend bool operator!=(const QHttp2Configuration &lhs, const QHttp2Configuration &rhs) noexcept |
56 | 0 | { return !lhs.isEqual(rhs); } |
57 | | |
58 | | }; |
59 | | |
60 | | Q_DECLARE_SHARED(QHttp2Configuration) |
61 | | |
62 | | QT_END_NAMESPACE |
63 | | |
64 | | #endif // QHTTP2CONFIGURATION_H |