43 #include "private/qdataurl_p.h" 44 #include <QtCore/QCoreApplication> 45 #include <QtCore/QMetaObject> 78 if (!
d->decodeDataUrlResult.first.isNull()) {
79 QString &mimeType =
d->decodeDataUrlResult.first;
85 d->decodedData.setBuffer(&
d->decodeDataUrlResult.second);
127 return d->decodedData.size();
141 return d->decodedData.read(data, maxlen);
147 #include "moc_qnetworkreplydataimpl_p.cpp"
#define QT_END_NAMESPACE
This macro expands to.
void setUrl(const QUrl &url)
Sets the URL being processed to be url.
void setError(NetworkError errorCode, const QString &errorString)
Sets the error condition to be errorCode.
virtual qint64 bytesAvailable() const
Returns the number of bytes that are available for reading.
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
NetworkError
Indicates all possible error conditions found during the processing of the request.
qint64 size() const
For open random-access devices, this function returns the size of the device.
Operation
Indicates the operation this reply is processing.
#define Q_ARG(type, data)
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.
QUrl url() const
Returns the URL this network request is referring to.
static QString translate(const char *context, const char *key, const char *disambiguation=0, Encoding encoding=CodecForTr)
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.
static const char * data(const QByteArray &arr)
void setHeader(QNetworkRequest::KnownHeaders header, const QVariant &value)
Sets the known header header to be of value value.
virtual void close()
Closes this device for reading.
void setRequest(const QNetworkRequest &request)
Sets the associated request for this object to be request.
QByteArray toEncoded(FormattingOptions options=None) const
Returns the encoded representation of the URL if it's valid; otherwise an empty QByteArray is returne...
virtual bool isSequential() const
QNetworkReplyDataImpl(QObject *parent, const QNetworkRequest &req, const QNetworkAccessManager::Operation op)
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
virtual void abort()
Aborts the operation immediately and close down any network connections still open.
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
void setFinished(bool)
Sets the reply as finished.
virtual qint64 bytesAvailable() const
Returns the number of bytes that are available for reading.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
virtual bool open(OpenMode mode)
Opens the device and sets its OpenMode to mode.
~QNetworkReplyDataImplPrivate()
virtual qint64 readData(char *data, qint64 maxlen)
QUrl url() const
Returns the URL of the content downloaded or uploaded.
Q_CORE_EXPORT QPair< QString, QByteArray > qDecodeDataUrl(const QUrl &uri)
Decode a data: URL into its mimetype and payload.
QNetworkReplyDataImplPrivate()