Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qhttp1configuration.h
Go to the documentation of this file.
1
// Copyright (C) 2022 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
QHTTP1CONFIGURATION_H
6
#
define
QHTTP1CONFIGURATION_H
7
8
#
include
<
QtNetwork
/
qtnetworkglobal
.
h
>
9
10
#
include
<
QtCore
/
qtclasshelpermacros
.
h
>
11
#
include
<
QtCore
/
qtypes
.
h
>
12
#
include
<
QtCore
/
qtypeinfo
.
h
>
13
14
#
include
<
utility
>
15
#
include
<
cstdint
>
16
17
QT_REQUIRE_CONFIG
(
http
);
18
19
QT_BEGIN_NAMESPACE
20
21
class
QHttp1ConfigurationPrivate;
22
class
QHttp1Configuration
23
{
24
public
:
25
Q_NETWORK_EXPORT
QHttp1Configuration
();
26
Q_NETWORK_EXPORT
QHttp1Configuration
(
const
QHttp1Configuration
&
other
);
27
QHttp1Configuration
(
QHttp1Configuration
&&other)
noexcept
28
: u{other.u} { other.u.d =
nullptr
; }
29
30
Q_NETWORK_EXPORT
QHttp1Configuration
&
operator
=(
const
QHttp1Configuration
&
other
);
31
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP
(
QHttp1Configuration
)
32
33
Q_NETWORK_EXPORT
~
QHttp1Configuration
();
34
35
Q_NETWORK_EXPORT
void
setNumberOfConnectionsPerHost
(qsizetype amount);
36
Q_NETWORK_EXPORT qsizetype
numberOfConnectionsPerHost
()
const
;
37
38
void
swap
(
QHttp1Configuration
&other)
noexcept
39
{
std
::swap(u, other.u); }
40
41
private
:
42
struct
ShortData {
43
std
::uint8_t numConnectionsPerHost;
44
char
reserved[
sizeof
(
void
*) -
sizeof
(numConnectionsPerHost)];
45
};
46
union
U {
47
U(ShortData _data) : data(_data) {}
48
QHttp1ConfigurationPrivate *d;
49
ShortData data;
50
} u;
51
52
Q_NETWORK_EXPORT
bool
equals(
const
QHttp1Configuration
&other)
const
noexcept
;
53
Q_NETWORK_EXPORT size_t
hash
(
size_t
seed
)
const
noexcept
;
54
55
friend
bool
operator
==(
const
QHttp1Configuration
&lhs,
const
QHttp1Configuration
&rhs)
noexcept
56
{
return
lhs.equals(rhs); }
57
friend
bool
operator
!=(
const
QHttp1Configuration
&lhs,
const
QHttp1Configuration
&rhs)
noexcept
58
{
return
!lhs.equals(rhs); }
59
60
friend
size_t
qHash
(
const
QHttp1Configuration
&key, size_t seed = 0)
noexcept
{
return
key.hash(seed); }
61
};
62
63
Q_DECLARE_SHARED(QHttp1Configuration)
64
65
QT_END_NAMESPACE
66
67
#
endif
// QHTTP1CONFIGURATION_H
QHttp1Configuration
The QHttp1Configuration class controls HTTP/1 parameters and settings.
Definition
qhttp1configuration.h:23
QHttp1Configuration::qHash
friend size_t qHash(const QHttp1Configuration &key, size_t seed=0) noexcept
Definition
qhttp1configuration.h:60
QHttp1Configuration::swap
void swap(QHttp1Configuration &other) noexcept
\memberswap{HTTP/1 configuration}
Definition
qhttp1configuration.h:38
QHttp1Configuration::operator==
friend bool operator==(const QHttp1Configuration &lhs, const QHttp1Configuration &rhs) noexcept
Definition
qhttp1configuration.h:55
QHttp1Configuration::QHttp1Configuration
QHttp1Configuration(QHttp1Configuration &&other) noexcept
Move-constructs this QHttp1Configuration from other.
Definition
qhttp1configuration.h:27
QHttp1Configuration::setNumberOfConnectionsPerHost
Q_NETWORK_EXPORT void setNumberOfConnectionsPerHost(qsizetype amount)
Sets the number of connections (minimum: 1; maximum: 255) used per http(s) {host}:{port}...
Definition
qhttp1configuration.cpp:90
QHttp1Configuration::operator!=
friend bool operator!=(const QHttp1Configuration &lhs, const QHttp1Configuration &rhs) noexcept
Definition
qhttp1configuration.h:57
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(http)
qtbase
src
network
access
qhttp1configuration.h
Generated on
for Qt by
1.18.0