LibrePCB Developers Documentation
|
This class is used to process general purpose network requests (up to 100MB) More...
#include <networkrequest.h>
Signals | |
void | dataReceived (QByteArray data, QString contentType) |
Data successfully received signal (emitted right before finished()) More... | |
Signals inherited from NetworkRequestBase | |
void | startRequested () |
Internal signal, don't use it from outside. More... | |
void | progressState (QString state) |
Reply progress / state changed signal. More... | |
void | progressPercent (int percent) |
Reply content download progress signal (simple) More... | |
void | progress (qint64 bytesReceived, qint64 bytesTotal, int percent) |
Reply content download progress signal (extended) More... | |
void | aborted () |
Request aborted signal (emitted right before finished()) More... | |
void | succeeded () |
Request succeeded signal (emitted right before finished()) More... | |
void | errored (QString errorMsg) |
Request errored signal (emitted right before finished()) More... | |
void | finished (bool success) |
Request finished signal. More... | |
Public Member Functions | |
NetworkRequest ()=delete | |
NetworkRequest (const NetworkRequest &other)=delete | |
NetworkRequest (const QUrl &url, const QByteArray &postData=QByteArray()) noexcept | |
~NetworkRequest () noexcept | |
NetworkRequest & | operator= (const NetworkRequest &rhs)=delete |
Public Member Functions inherited from NetworkRequestBase | |
NetworkRequestBase ()=delete | |
NetworkRequestBase (const NetworkRequestBase &other)=delete | |
NetworkRequestBase (const QUrl &url, const QByteArray &postData=QByteArray()) noexcept | |
virtual | ~NetworkRequestBase () noexcept |
void | setHeaderField (const QByteArray &name, const QByteArray &value) noexcept |
Set a HTTP header field for the network request. More... | |
void | setCacheLoadControl (QNetworkRequest::CacheLoadControl value) noexcept |
Set the cache load control attribute. More... | |
void | setExpectedReplyContentSize (qint64 bytes) noexcept |
Set the expected size of the requested content. More... | |
void | setMinimumCacheTime (int seconds) noexcept |
Set the minimum time the request should be cached. More... | |
void | useBrowserUserAgent () noexcept |
Use a typical browser user agent for this request. More... | |
NetworkRequestBase & | operator= (const NetworkRequestBase &rhs)=delete |
virtual void | prepareRequest ()=0 |
virtual void | finalizeRequest ()=0 |
virtual void | emitSuccessfullyFinishedSignals (QString contentType) noexcept=0 |
virtual void | fetchNewData (QIODevice &device) noexcept=0 |
Private Member Functions | |
void | prepareRequest () override |
void | finalizeRequest () override |
void | emitSuccessfullyFinishedSignals (QString contentType) noexcept override |
void | fetchNewData (QIODevice &device) noexcept override |
Private Attributes | |
QByteArray | mReceivedData |
Additional Inherited Members | |
Public Slots inherited from NetworkRequestBase | |
void | start () noexcept |
Start downloading the requested content. More... | |
void | abort () noexcept |
Abort downloading the requested content. More... | |
Protected Attributes inherited from NetworkRequestBase | |
QUrl | mUrl |
QByteArray | mPostData |
qint64 | mExpectedContentSize |
int | mMinimumCacheTime |
QList< QUrl > | mRedirectedUrls |
QNetworkRequest | mRequest |
QScopedPointer< QNetworkReply > | mReply |
bool | mStarted |
bool | mAborted |
bool | mErrored |
bool | mFinished |
This class is used to process general purpose network requests (up to 100MB)
|
delete |
|
delete |
|
noexcept |
|
noexcept |
|
delete |
|
signal |
Data successfully received signal (emitted right before finished())
|
overrideprivatevirtual |
Implements NetworkRequestBase.
|
overrideprivatevirtual |
Implements NetworkRequestBase.
|
overrideprivatevirtualnoexcept |
Implements NetworkRequestBase.
|
overrideprivatevirtualnoexcept |
Implements NetworkRequestBase.
|
private |