QtBase  v6.3.1
qnetworkaccessmanager_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2016 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the QtNetwork module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 3 requirements
23 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24 **
25 ** GNU General Public License Usage
26 ** Alternatively, this file may be used under the terms of the GNU
27 ** General Public License version 2.0 or (at your option) the GNU General
28 ** Public license version 3 or any later version approved by the KDE Free
29 ** Qt Foundation. The licenses are as published by the Free Software
30 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31 ** included in the packaging of this file. Please review the following
32 ** information to ensure the GNU General Public License requirements will
33 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34 ** https://www.gnu.org/licenses/gpl-3.0.html.
35 **
36 ** $QT_END_LICENSE$
37 **
38 ****************************************************************************/
39 
40 #ifndef QNETWORKACCESSMANAGER_P_H
41 #define QNETWORKACCESSMANAGER_P_H
42 
43 //
44 // W A R N I N G
45 // -------------
46 //
47 // This file is not part of the Qt API. It exists for the convenience
48 // of the Network Access API. This header file may change from
49 // version to version without notice, or even be removed.
50 //
51 // We mean it.
52 //
53 
54 #include <QtNetwork/private/qtnetworkglobal_p.h>
55 #include "qnetworkaccessmanager.h"
56 #include "qnetworkaccesscache_p.h"
58 #include "private/qnetconmonitor_p.h"
59 #include "qnetworkrequest.h"
60 #include "qhsts_p.h"
61 #include "private/qobject_p.h"
62 #include "QtNetwork/qnetworkproxy.h"
64 
65 #if QT_CONFIG(settings)
66 #include "qhstsstore_p.h"
67 #endif // QT_CONFIG(settings)
68 
70 
71 class QAuthenticator;
74 class QNetworkCookieJar;
75 
77 {
78 public:
82  thread(nullptr),
83 #ifndef QT_NO_NETWORKPROXY
85 #endif
88  redirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy),
90  {
91  }
93 
95  void destroyThread();
96 
99  void _q_replySslErrors(const QList<QSslError> &errors);
102  void createCookieJar() const;
103 
104  void authenticationRequired(QAuthenticator *authenticator,
106  bool synchronous,
107  QUrl &url,
108  QUrl *urlForLastAuthentication,
109  bool allowAuthenticationReuse = true);
110  void cacheCredentials(const QUrl &url, const QAuthenticator *auth);
112  const QAuthenticator *auth = nullptr);
113 
114 #ifndef QT_NO_NETWORKPROXY
116  const QNetworkProxy &proxy,
117  bool synchronous,
118  QAuthenticator *authenticator,
119  QNetworkProxy *lastProxyAuthentication);
122  const QAuthenticator *auth = nullptr);
124 #endif
125 
128 
129 #if QT_CONFIG(http) || defined(Q_OS_WASM)
131 #endif
132 
134 
135  // this is the cache for storing downloaded files
137 
139 
141 
142 
143 #ifndef QT_NO_NETWORKPROXY
146 #endif
147 
151 
152  // The cache with authorization data:
153  std::shared_ptr<QNetworkAccessAuthenticationManager> authenticationManager;
154 
155  // this cache can be used by individual backends to cache e.g. their TCP connections to a server
156  // and use the connections for multiple requests.
158 
161 
163 #if QT_CONFIG(settings)
165 #endif // QT_CONFIG(settings)
166  bool stsEnabled = false;
167 
168  bool autoDeleteReplies = false;
169 
171 
172  Q_DECLARE_PUBLIC(QNetworkAccessManager)
173 };
174 
176 
177 #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...
The QNetworkAccessManager class allows the application to send network requests and receive replies.
QNetworkAuthenticationCredential * fetchCachedProxyCredentials(const QNetworkProxy &proxy, const QAuthenticator *auth=nullptr)
QNetworkRequest::RedirectPolicy redirectPolicy
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)
QAbstractNetworkCache * networkCache
void _q_replyPreSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator *authenticator)
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 * fetchCachedCredentials(const QUrl &url, 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 QNetworkProxyFactory class provides fine-grained proxy selection.
The QNetworkProxy class provides a network layer proxy.
The QNetworkProxyQuery class is used to query the proxy settings for a socket.
Definition: qnetworkproxy.h:57
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
Definition: qnetworkreply.h:63
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
The QScopedPointer class stores a pointer to a dynamically allocated object, and deletes it upon dest...
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
The QStringList class provides a list of strings.
The QUrl class provides a convenient interface for working with URLs.
Definition: qurl.h:130
#define true
Definition: ftrandom.c:51
Definition: qfloat16.h:381
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld endif[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld SRC pixld MASK if DST_R else pixld DST_R endif if
set set set set set set set macro pixldst1 op
#define Q_AUTOTEST_EXPORT
Definition: qglobal.h:579
GLenum query
Definition: qopenglext.h:2738
QUrl url("http://www.example.com/List of holidays.xml")
[0]
QObject::connect nullptr
QNetworkAccessManager manager
QHttpMultiPart * multiPart
[0]
QNetworkRequest request(url)
QNetworkReply * reply