1 #ifndef TORCNETWORKREQUEST_H 2 #define TORCNETWORKREQUEST_H 15 TorcNetworkRequest(
const QNetworkRequest &Request, QNetworkAccessManager::Operation Type,
int BufferSize,
int *Abort);
16 TorcNetworkRequest(
const QNetworkRequest &Request,
const QByteArray &PostData,
int *Abort);
19 int Peek (
char* Buffer, qint32 BufferSize,
int Timeout);
20 int Read (
char* Buffer, qint32 BufferSize,
int Timeout,
bool Peek =
false);
21 qint64
Seek (qint64 Offset);
23 QByteArray
ReadAll (
int Timeout);
28 void SetRange (
int Start,
int End = 0);
34 QByteArray
GetHeader (
const QByteArray &Header)
const;
40 void Write (QNetworkReply *Reply);
44 bool WritePriv (QNetworkReply *Reply, const
char* Buffer,
int Size);
48 QNetworkAccessManager::Operation
m_type;
87 Q_DECLARE_METATYPE(QNetworkReply*)
89 #endif // TORCNETWORKREQUEST_H
TorcNetworkRequest(const QNetworkRequest &Request, QNetworkAccessManager::Operation Type, int BufferSize, int *Abort)
int Read(char *Buffer, qint32 BufferSize, int Timeout, bool Peek=false)
void SetReadSize(int Size)
void SetReplyError(QNetworkReply::NetworkError Error)
qint64 GetPosition(void) const
A reference counting implementation.
A wrapper around QNetworkRequest.
QNetworkReply::NetworkError GetReplyError(void) const
bool WaitForStart(int Timeout)
QNetworkAccessManager::Operation m_type
virtual ~TorcNetworkRequest()=default
const QByteArray m_postData
QByteArray & GetBuffer(void)
int Peek(char *Buffer, qint32 BufferSize, int Timeout)
bool m_byteServingAvailable
QString GetContentType(void) const
QUrl GetFinalURL(void) const
bool CanByteServe(void) const
QList< QNetworkReply::RawHeaderPair > m_rawHeaders
QNetworkRequest m_request
qint64 Seek(qint64 Offset)
void DownloadProgress(qint64 Received, qint64 Total)
void Write(QNetworkReply *Reply)
void Error(QNetworkReply::NetworkError Code)
QNetworkReply::NetworkError m_replyError
qint64 m_rewindPositionInFile
Subclass of QNetworkAccessManager for sending network requests and monitoring the network state...
QByteArray ReadAll(int Timeout)
QAtomicInt m_availableToRead
int m_replyBytesAvailable
int GetStatus(void) const
QByteArray GetHeader(const QByteArray &Header) const
Return the value of the given header, if present.
void SetRange(int Start, int End=0)
qint64 GetSize(void) const