Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qnetworkaccessmanager_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QNETWORKACCESSMANAGER_P_H
5#define QNETWORKACCESSMANAGER_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 for the convenience
12// of the Network Access API. This header file may change from
13// version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtNetwork/private/qtnetworkglobal_p.h>
22#include "private/qnetconmonitor_p.h"
23#include "qnetworkrequest.h"
24#include "qhsts_p.h"
25#include "private/qobject_p.h"
26#include "QtNetwork/qnetworkproxy.h"
28
29#if QT_CONFIG(settings)
30#include "qhstsstore_p.h"
31#endif // QT_CONFIG(settings)
32
34
35class QAuthenticator;
39
41{
42public:
47#ifndef QT_NO_NETWORKPROXY
49#endif
52 redirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy),
54 {
55 }
57
59 void destroyThread();
60
63 void _q_replySslErrors(const QList<QSslError> &errors);
66 void createCookieJar() const;
67
68 void authenticationRequired(QAuthenticator *authenticator,
70 bool synchronous,
71 QUrl &url,
72 QUrl *urlForLastAuthentication,
73 bool allowAuthenticationReuse = true);
74 void cacheCredentials(const QUrl &url, const QAuthenticator *auth);
76 const QAuthenticator *auth = nullptr);
77
78#ifndef QT_NO_NETWORKPROXY
80 const QNetworkProxy &proxy,
81 bool synchronous,
82 QAuthenticator *authenticator,
83 QNetworkProxy *lastProxyAuthentication);
86 const QAuthenticator *auth = nullptr);
87 QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query);
88#endif
89
92
93#if QT_CONFIG(http) || defined(Q_OS_WASM)
95#endif
96
98
99 // this is the cache for storing downloaded files
101
103
105
106
107#ifndef QT_NO_NETWORKPROXY
110#endif
111
115
116 // The cache with authorization data:
117 std::shared_ptr<QNetworkAccessAuthenticationManager> authenticationManager;
118
119 // this cache can be used by individual backends to cache e.g. their TCP connections to a server
120 // and use the connections for multiple requests.
122
125
127#if QT_CONFIG(settings)
128 QScopedPointer<QHstsStore> stsStore;
129#endif // QT_CONFIG(settings)
130 bool stsEnabled = false;
131
132 bool autoDeleteReplies = false;
133
134 std::chrono::milliseconds transferTimeout{0};
135
136 Q_DECLARE_PUBLIC(QNetworkAccessManager)
137};
138
140
141#endif
The QAbstractNetworkCache class provides the interface for cache implementations.
The QAuthenticator class provides an authentication object.
The QHttpMultiPart class resembles a MIME multipart message to be sent over HTTP.
QNetworkAccessBackend is the base class for implementing support for schemes used by QNetworkAccessMa...
QNetworkRequest::RedirectPolicy redirectPolicy
QNetworkAuthenticationCredential * fetchCachedCredentials(const QUrl &url, const QAuthenticator *auth=nullptr)
QStringList backendSupportedSchemes() const
QList< QNetworkProxy > queryProxy(const QNetworkProxyQuery &query)
QNetworkReply * postProcess(QNetworkReply *reply)
QNetworkAccessBackend * findBackend(QNetworkAccessManager::Operation op, const QNetworkRequest &request)
void proxyAuthenticationRequired(const QUrl &url, const QNetworkProxy &proxy, bool synchronous, QAuthenticator *authenticator, QNetworkProxy *lastProxyAuthentication)
void _q_replyPreSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator *authenticator)
std::chrono::milliseconds transferTimeout
void authenticationRequired(QAuthenticator *authenticator, QNetworkReply *reply, bool synchronous, QUrl &url, QUrl *urlForLastAuthentication, bool allowAuthenticationReuse=true)
void cacheProxyCredentials(const QNetworkProxy &proxy, const QAuthenticator *auth)
std::shared_ptr< QNetworkAccessAuthenticationManager > authenticationManager
void cacheCredentials(const QUrl &url, const QAuthenticator *auth)
QNetworkAuthenticationCredential * fetchCachedProxyCredentials(const QNetworkProxy &proxy, const QAuthenticator *auth=nullptr)
void _q_replyFinished(QNetworkReply *reply)
void _q_replyEncrypted(QNetworkReply *reply)
void _q_replySslErrors(const QList< QSslError > &errors)
static Q_AUTOTEST_EXPORT void clearConnectionCache(QNetworkAccessManager *manager)
static Q_AUTOTEST_EXPORT void clearAuthenticationCache(QNetworkAccessManager *manager)
The QNetworkAccessManager class allows the application to send network requests and receive replies.
Operation
Indicates the operation this reply is processing.
The QNetworkCookieJar class implements a simple jar of QNetworkCookie objects.
The QNetworkProxyFactory class provides fine-grained proxy selection.
The QNetworkProxyQuery class is used to query the proxy settings for a socket.
The QNetworkProxy class provides a network layer proxy.
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
\inmodule QtCore
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
GLenum query
#define Q_AUTOTEST_EXPORT
QUrl url("example.com")
[constructor-url-reference]
QObject::connect nullptr
QNetworkAccessManager manager
QHttpMultiPart * multiPart
[0]
QNetworkRequest request(url)
QNetworkReply * reply