LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NetworkRequest Class Referencefinal

This class is used to process general purpose network requests (up to 100MB) More...

#include <networkrequest.h>

+ Inheritance diagram for NetworkRequest:
+ Collaboration diagram for NetworkRequest:

Signals

void dataReceived (QByteArray data)
 Data successfully received signal (emited 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 (emited right before finished()) More...
 
void succeeded ()
 Request succeeded signal (emited right before finished()) More...
 
void errored (QString errorMsg)
 Request errored signal (emited 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) noexcept
 
 ~NetworkRequest () noexcept
 
NetworkRequestoperator= (const NetworkRequest &rhs)=delete
 
- Public Member Functions inherited from NetworkRequestBase
 NetworkRequestBase ()=delete
 
 NetworkRequestBase (const NetworkRequestBase &other)=delete
 
 NetworkRequestBase (const QUrl &url) noexcept
 
virtual ~NetworkRequestBase () noexcept
 
void setHeaderField (const QByteArray &name, const QByteArray &value) noexcept
 Set a HTTP header field for the network request. More...
 
void setExpectedReplyContentSize (qint64 bytes) noexcept
 Set the expected size of the requested content. More...
 
NetworkRequestBaseoperator= (const NetworkRequestBase &rhs)=delete
 

Private Member Functions

void prepareRequest () override
 
void finalizeRequest () override
 
void emitSuccessfullyFinishedSignals () noexceptoverride
 
void fetchNewData () noexceptoverride
 

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
 
qint64 mExpectedContentSize
 
QList< QUrl > mRedirectedUrls
 
QNetworkRequest mRequest
 
QScopedPointer< QNetworkReply > mReply
 
bool mStarted
 
bool mAborted
 
bool mErrored
 
bool mFinished
 

Detailed Description

This class is used to process general purpose network requests (up to 100MB)

See Also
librepcb::NetworkRequestBase, librepcb::NetworkAccessManager
Author
ubruhin
Date
2016-09-12

Constructor & Destructor Documentation

NetworkRequest ( )
delete
NetworkRequest ( const NetworkRequest other)
delete
NetworkRequest ( const QUrl &  url)
noexcept
~NetworkRequest ( )
noexcept

Member Function Documentation

NetworkRequest& operator= ( const NetworkRequest rhs)
delete
void dataReceived ( QByteArray  data)
signal

Data successfully received signal (emited right before finished())

+ Here is the caller graph for this function:

void prepareRequest ( )
overrideprivatevirtual

Implements NetworkRequestBase.

void finalizeRequest ( )
overrideprivatevirtual

Implements NetworkRequestBase.

void emitSuccessfullyFinishedSignals ( )
overrideprivatevirtualnoexcept

Implements NetworkRequestBase.

void fetchNewData ( )
overrideprivatevirtualnoexcept

Implements NetworkRequestBase.

Member Data Documentation

QByteArray mReceivedData
private

The documentation for this class was generated from the following files: