48 #include "QtCore/qhash.h" 49 #include "QtCore/qmutex.h" 50 #include "QtNetwork/private/qnetworksession_p.h" 56 #include "private/qnoncontiguousbytedevice_p.h" 83 factoryData()->append(
this);
88 if (QNetworkAccessBackendFactoryData::valid) {
90 factoryData()->removeAll(
this);
97 if (QNetworkAccessBackendFactoryData::valid) {
100 end = factoryData()->constEnd();
115 if (reply->outgoingDataBuffer)
117 else if (reply->outgoingData) {
123 bool bufferDisallowed =
126 if (bufferDisallowed)
127 uploadByteDevice->disableReset();
130 if (!isSynchronous())
133 return uploadByteDevice.data();
140 if (reply->isFinished)
142 reply->emitUploadProgress(bytesSent, bytesTotal);
220 #ifndef QT_NO_NETWORKPROXY 272 return reply->q_func()->header(header);
282 return reply->q_func()->hasRawHeader(headerName);
287 return reply->q_func()->rawHeader(headerName);
292 return reply->q_func()->rawHeaderList();
302 return reply->q_func()->attribute(code);
332 #ifndef QT_NO_NETWORKPROXY 357 #ifndef QT_NO_OPENSSL 371 #ifndef QT_NO_BEARERMANAGEMENT 374 if (networkSession) {
376 if (networkSession->isOpen() &&
399 #ifndef QT_NO_NETWORKPROXY 400 #ifndef QT_NO_BEARERMANAGEMENT 419 #else // QT_NO_BEARERMANAGEMENT The QVariant class acts like a union for the most common Qt data types.
void appendDownstreamDataDownloadBuffer(qint64, qint64)
QNetworkAccessBackendFactoryData()
virtual void emitReadBufferFreed(qint64 size)
virtual void setSslConfiguration(const QSslConfiguration &configuration)
QVariant sessionProperty(const QString &key) const
Returns the value for property key.
#define QT_END_NAMESPACE
This macro expands to.
void setAttribute(QNetworkRequest::Attribute code, const QVariant &value)
The QMutex class provides access serialization between threads.
int remove(const Key &key)
Removes all the items that have the key from the hash.
#define it(className, varName)
static QByteArray headerName(QNetworkRequest::KnownHeaders header)
virtual void setReadBufferSize(qint64 size)
QVariant header(QNetworkRequest::KnownHeaders header) const
The QByteArray class provides an array of bytes.
virtual ~QNetworkAccessBackend()
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
NetworkError
Indicates all possible error conditions found during the processing of the request.
Operation
Indicates the operation this reply is processing.
void proxyAuthenticationRequired(QNetworkAccessBackend *backend, const QNetworkProxy &proxy, QAuthenticator *authenticator)
QList< QNetworkProxy > proxyList
virtual void fetchSslConfiguration(QSslConfiguration &configuration) const
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
virtual QNetworkCacheMetaData fetchCacheMetaData(const QNetworkCacheMetaData &metaData) const
virtual void downstreamReadyWrite()
qint64 nextDownstreamBlockSize() const
The QNetworkConfigurationManager class manages the network configurations provided by the system...
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
QString host() const
Returns the host of the URL if it is defined; otherwise an empty string is returned.
void writeDownstreamDataDownloadBuffer(qint64, qint64)
QSharedPointer< QNetworkSession > getNetworkSession() const
void appendDownstreamData(QByteDataBuffer &data)
#define Q_BASIC_ATOMIC_INITIALIZER(a)
KnownHeaders
List of known header types that QNetworkRequest parses.
static QBasicAtomicInt valid
qint64 nextDownstreamBlockSize() const
bool hasRawHeader(const QByteArray &headerName) const
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
QNetworkAccessManagerPrivate * manager
Q_GUI_EXPORT QString errorString(EGLint code=eglGetError())
bool isCachingEnabled() const
void redirectionRequested(const QUrl &target)
QNetworkConfiguration configuration() const
Returns the QNetworkConfiguration that this network session object is based on.
bool isValid() const
Returns true if this QNetworkConfiguration object is valid.
The QNetworkProxy class provides a network layer proxy.
QNonContiguousByteDevice * createUploadByteDevice()
The QNetworkConfiguration class provides an abstraction of one or more access point configurations...
#define QT_BEGIN_NAMESPACE
This macro expands to.
QNetworkReplyImplPrivate * reply
virtual void setDownstreamLimited(bool b)
void emitReplyUploadProgress(qint64 bytesSent, qint64 bytesTotal)
QNetworkAccessBackendFactory()
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
#define Q_GLOBAL_STATIC(TYPE, NAME)
Declares a global static variable with the given type and name.
void setRawHeader(const QByteArray &headerName, const QByteArray &value)
QList< QNetworkProxy > proxyList() const
static const char * data(const QByteArray &arr)
char * getDownloadBuffer(qint64 size)
QNetworkAccessManager::Operation operation
void setHeader(QNetworkRequest::KnownHeaders header, const QVariant &value)
char * getDownloadBuffer(qint64)
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
QNetworkAccessManager::Operation operation() const
virtual void ignoreSslErrors()
QByteArray rawHeader(const QByteArray &headerName) const
The QAuthenticator class provides an authentication object.
QAbstractNetworkCache * networkCache() const
Attribute
Attribute codes for the QNetworkRequest and QNetworkReply.
The QNetworkProxyQuery class is used to query the proxy settings for a socket.
void authenticationRequired(QAuthenticator *auth)
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
void error(QNetworkReply::NetworkError code, const QString &errorString)
The QNetworkSession class provides control over the system's access points and enables session manage...
QNetworkRequest request() const
void sslErrors(const QList< QSslError > &errors)
void setUrl(const QUrl &url)
const_iterator ConstIterator
Qt-style synonym for QList::const_iterator.
void error(QNetworkReply::NetworkError code, const QString &errorString)
~QNetworkAccessBackendFactoryData()
void writeDownstreamData(QByteDataBuffer &list)
QVariant attribute(QNetworkRequest::Attribute code) const
static QNonContiguousByteDevice * create(QIODevice *device)
Create a QNonContiguousByteDevice out of a QIODevice.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
void authenticationRequired(QNetworkAccessBackend *backend, QAuthenticator *authenticator)
QNetworkAccessBackend * findBackend(QNetworkAccessManager::Operation op, const QNetworkRequest &request)
bool isCachingEnabled() const
QNetworkConfiguration configurationFromIdentifier(const QString &identifier) const
Returns the QNetworkConfiguration for identifier; otherwise returns an invalid QNetworkConfiguration...
void setCachingEnabled(bool enable)
A QNonContiguousByteDevice is a representation of a file, array or buffer that allows access with a r...
The QSslConfiguration class holds the configuration and state of an SSL connection.
void setCachingEnabled(bool enable)
The QHostAddress class provides an IP address.
virtual void copyFinished(QIODevice *)
QAbstractNetworkCache * networkCache
bool isValid() const
Returns true if the storage type of this variant is not QVariant::Invalid; otherwise returns false...
QList< QNetworkProxy > queryProxy(const QNetworkProxyQuery &query)
virtual ~QNetworkAccessBackendFactory()
The QIODevice class is the base interface class of all I/O devices in Qt.
static QByteArray headerValue(QNetworkRequest::KnownHeaders header, const QVariant &value)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
QList< QByteArray > rawHeaderList() const
virtual bool start()
Starts the backend.
void redirectionRequested(const QUrl &destination)
void sslErrors(const QList< QSslError > &errors)
The QList class is a template class that provides lists.
void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth)
The QAbstractNetworkCache class provides the interface for cache implementations. ...