5#ifndef QNETWORKACCESSCACHE_P_H
6#define QNETWORKACCESSCACHE_P_H
19#include <QtNetwork/private/qtnetworkglobal_p.h>
20#include "QtCore/qobject.h"
21#include "QtCore/qbasictimer.h"
22#include "QtCore/qbytearray.h"
23#include <QtCore/qflags.h>
24#include "QtCore/qhash.h"
25#include "QtCore/qmetatype.h"
47 qint64 expiryTimeoutSeconds = -1;
81 Node *firstExpiringNode =
nullptr;
82 Node *lastExpiringNode =
nullptr;
89 bool emitEntryReady(Node *node, QObject *target,
const char *member);
The QHttp1Configuration class controls HTTP/1 parameters and settings.
void cacheCredentialsSlot(const QHttpNetworkRequest &request, QAuthenticator *authenticator)
QSharedPointer< char > downloadBuffer
QHttpNetworkReply * httpReply
void readBufferSizeChanged(qint64 size)
void synchronousAuthenticationRequiredSlot(const QHttpNetworkRequest &request, QAuthenticator *)
void synchronousFinishedWithErrorSlot(QNetworkReply::NetworkError errorCode, const QString &detail=QString())
void socketStartedConnecting()
QString incomingErrorDetail
std::shared_ptr< QAtomicInt > pendingDownloadData
void sslErrorsSlot(const QList< QSslError > &errors)
QNetworkAccessCachedHttpConnection * httpConnection
void synchronousFinishedSlot()
void redirected(const QUrl &url, int httpStatus, int maxRedirectsRemainig)
void downloadMetaData(const QHttpHeaders &, int, const QString &, bool, QSharedPointer< char >, qint64, qint64, bool, bool)
void downloadProgress(qint64, qint64)
QHttpNetworkRequest httpRequest
void preSharedKeyAuthenticationRequiredSlot(QSslPreSharedKeyAuthenticator *authenticator)
QHttp1Configuration http1Parameters
QByteArray synchronousDownloadData
qint64 connectionCacheExpiryTimeoutSeconds
QString incomingReasonPhrase
QNetworkProxy transparentProxy
QEventLoop * synchronousRequestLoop
void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)
void sslErrors(const QList< QSslError > &, bool *, QList< QSslError > *)
void error(QNetworkReply::NetworkError, const QString &)
void synchronousProxyAuthenticationRequiredSlot(const QNetworkProxy &, QAuthenticator *)
qint64 incomingContentLength
qint64 downloadBufferMaximumSize
void finishedWithErrorSlot(QNetworkReply::NetworkError errorCode, const QString &detail=QString())
std::unique_ptr< QSslConfiguration > incomingSslConfiguration
void readBufferFreed(qint64 size)
QHttp2Configuration http2Parameters
static QThreadStorage< QNetworkAccessCache * > connections
void startRequestSynchronously()
std::shared_ptr< QAtomicInt > pendingDownloadProgress
QNetworkReply::NetworkError incomingErrorCode
void downloadData(const QByteArray &)
QHttpHeaders incomingHeaders
qint64 removedContentLength
std::shared_ptr< QNetworkAccessAuthenticationManager > authenticationManager
void synchronousHeaderChangedSlot()
void dataReadProgressSlot(qint64 done, qint64 total)
void preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator *)
void sslConfigurationChanged(const QSslConfiguration &)
void cacheCredentials(const QUrl &url, const QAuthenticator *auth)
QNetworkAccessAuthenticationManager()
QNetworkAuthenticationCredential fetchCachedCredentials(const QUrl &url, const QAuthenticator *auth=nullptr)
Fetch the credential data from the credential cache.
QNetworkAuthenticationCredential fetchCachedProxyCredentials(const QNetworkProxy &proxy, const QAuthenticator *auth=nullptr)
QNetworkAccessCache authenticationCache
void cacheProxyCredentials(const QNetworkProxy &proxy, const QAuthenticator *auth)
virtual ~CacheableObject()
CacheableObject(Options options)
QByteArray cacheKey() const
QHash< QByteArray, Node * > NodeHash
void timerEvent(QTimerEvent *) override
This event handler can be reimplemented in a subclass to receive timer events for the object.
QNetworkAccessCachedHttpConnection(quint16 connectionCount, const QString &hostName, quint16 port, bool encrypt, bool isLocalSocket, QHttpNetworkConnection::ConnectionType connectionType)
virtual void dispose() override
The QNetworkAccessManager class allows the application to send network requests and receive replies.
qint64 size() const override
Returns the size of the complete device or -1 if unknown.
qint64 pos() const override
bool atEnd() const override
Returns true if everything has been read and the read pointer cannot be advanced anymore.
QNonContiguousByteDeviceThreadForwardImpl(bool aE, qint64 s)
void processedData(qint64 pos, qint64 amount)
const char * readPointer(qint64 maximumLength, qint64 &len) override
Return a byte pointer for at most maximumLength bytes of that device.
bool advanceReadPointer(qint64 a) override
will advance the internal read pointer by amount bytes.
~QNonContiguousByteDeviceThreadForwardImpl()
bool reset() override
Moves the internal read pointer back to the beginning.
static QNetworkReply::NetworkError statusCodeFromHttp(int httpStatusCode, const QUrl &url)
static QByteArray makeCacheKey(QUrl &url, QNetworkProxy *proxy, const QString &peerVerifyName)
static QString makeServerErrorString(int code, const QUrl &url, const QString &reasonPhrase)
bool operator<(const QNetworkAuthenticationCredential &t1, const QNetworkAuthenticationCredential &t2)
Q_DECLARE_TYPEINFO(QNetworkAuthenticationCredential, Q_RELOCATABLE_TYPE)