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

source code of qtbase/src/network/access/qhttp2configuration.h