44 #include <QtNetwork/qsslconfiguration.h> 49 : readBufferMaxSize(0),
415 return d_func()->readBufferMaxSize;
439 d->readBufferMaxSize =
size;
448 return d_func()->manager;
460 return d_func()->request;
470 return d_func()->operation;
481 return d_func()->errorCode;
496 return d_func()->isFinished;
523 return d_func()->url;
535 return d_func()->cookedHeaders.
value(header);
547 return d->findRawHeader(headerName) !=
d->rawHeaders.constEnd();
563 d->findRawHeader(headerName);
564 if (it !=
d->rawHeaders.constEnd())
584 return d->rawHeaders;
594 return d_func()->rawHeadersKeys();
609 return d_func()->attributes.
value(code);
612 #ifndef QT_NO_OPENSSL 629 void *arr[] = { &config, 0 };
647 void *arr[] = { 0, © };
682 void *arr[] = { 0, © };
761 d->errorCode = errorCode;
806 d->setCookedHeader(header, value);
823 d->setRawHeader(headerName, value);
837 d->attributes.insert(code, value);
839 d->attributes.remove(code);
The QVariant class acts like a union for the most common Qt data types.
virtual qint64 size() const
For open random-access devices, this function returns the size of the device.
NetworkError error() const
Returns the error that was found during the processing of this request.
#define QT_END_NAMESPACE
This macro expands to.
void setUrl(const QUrl &url)
Sets the URL being processed to be url.
virtual void setReadBufferSize(qint64 size)
Sets the size of the read buffer to be size bytes.
virtual void close()
First emits aboutToClose(), then closes the device and sets its OpenMode to NotOpen.
void setError(NetworkError errorCode, const QString &errorString)
Sets the error condition to be errorCode.
#define it(className, varName)
QVariant attribute(QNetworkRequest::Attribute code) const
Returns the attribute associated with the code code.
static QByteArray headerName(QNetworkRequest::KnownHeaders header)
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
The QByteArray class provides an array of bytes.
void setAttribute(QNetworkRequest::Attribute code, const QVariant &value)
Sets the attribute code to have value value.
bool isRunning() const
Returns true when the request is still processing and the reply has not finished or was aborted yet...
QString errorString() const
Returns a human-readable description of the last device error that occurred.
NetworkError
Indicates all possible error conditions found during the processing of the request.
virtual qint64 writeData(const char *data, qint64 len)
Operation
Indicates the operation this reply is processing.
const QList< RawHeaderPair > & rawHeaderPairs() const
Returns a list of raw header pairs.
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
KnownHeaders
List of known header types that QNetworkRequest parses.
QNetworkRequest request() const
Returns the request that was posted for this reply.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
void setOperation(QNetworkAccessManager::Operation operation)
Sets the associated operation for this object to be operation.
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual void close()
Closes this device for reading.
bool isNull() const
Returns true if this is a null QSslConfiguration object.
qint64 readBufferSize() const
Returns the size of the read buffer, in bytes.
void setHeader(QNetworkRequest::KnownHeaders header, const QVariant &value)
Sets the known header header to be of value value.
QList< QByteArray > rawHeaderList() const
Returns a list of headers fields that were sent by the remote server, in the order that they were sen...
void setRawHeader(const QByteArray &headerName, const QByteArray &value)
Sets the raw header headerName to be of value value.
~QNetworkReply()
Disposes of this reply and frees any resources associated with it.
The QNetworkAccessManager class allows the application to send network requests and receive replies...
void setRequest(const QNetworkRequest &request)
Sets the associated request for this object to be request.
QVariant header(QNetworkRequest::KnownHeaders header) const
Returns the value of the known header header, if that header was sent by the remote server...
Attribute
Attribute codes for the QNetworkRequest and QNetworkReply.
virtual void ignoreSslErrors()
If this function is called, SSL errors related to network connection will be ignored, including certificate validation errors.
void setSslConfiguration(const QSslConfiguration &configuration)
Sets the SSL configuration for the network connection associated with this request, if possible, to be that of config.
void finished()
This signal is emitted when the reply has finished processing.
QByteArray rawHeader(const QByteArray &headerName) const
Returns the raw contents of the header headerName as sent by the remote server.
bool isFinished() const
Returns true when the reply has finished or was aborted.
QNetworkReply(QObject *parent=0)
Creates a QNetworkReply object with parent parent.
void setFinished(bool)
Sets the reply as finished.
QObject * parent() const
Returns a pointer to the parent object.
void setErrorString(const QString &errorString)
Sets the human readable description of the last device error that occurred to str.
const_iterator ConstIterator
Qt-style synonym for QList::const_iterator.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
virtual bool isSequential() const
The QSslConfiguration class holds the configuration and state of an SSL connection.
bool hasRawHeader(const QByteArray &headerName) const
Returns true if the raw header of name headerName was sent by the remote server.
QUrl url() const
Returns the URL of the content downloaded or uploaded.
QNetworkAccessManager * manager() const
Returns the QNetworkAccessManager that was used to create this QNetworkReply object.
T value() const
Returns the stored value converted to the template type T.
bool isValid() const
Returns true if the storage type of this variant is not QVariant::Invalid; otherwise returns false...
The QIODevice class is the base interface class of all I/O devices in Qt.
QNetworkAccessManager::Operation operation() const
Returns the operation that was posted for this reply.
QSslConfiguration sslConfiguration() const
Returns the SSL configuration and state associated with this reply, if SSL was used.
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
The QList class is a template class that provides lists.