A network access manager which processes network requests in a separate thread.
More...
#include <networkaccessmanager.h>
Inherits QThread.
|
void | run () noexcept override |
|
void | stop () noexcept |
|
A network access manager which processes network requests in a separate thread.
- Note
- One instance of this class must be created in the main application thread, and must be deleted before stopping the main application thread. It's not allowed to create a librepcb::NetworkAccessManager object in other threads, or to create multiple instances at the same time.
After the singleton was created, you can get it with the static method instance(). But for executing network requests, you don't need to access this object directly. You only need the classes librepcb::NetworkRequest and librepcb::FileDownload instead.
- See also
- librepcb::NetworkRequestBase, librepcb::NetworkRequest, librepcb::FileDownload
◆ NetworkAccessManager() [1/2]
◆ NetworkAccessManager() [2/2]
◆ ~NetworkAccessManager()
◆ get()
QNetworkReply * get |
( |
const QNetworkRequest & |
request | ) |
|
|
noexcept |
◆ post()
QNetworkReply * post |
( |
const QNetworkRequest & |
request, |
|
|
const QByteArray & |
data |
|
) |
| |
|
noexcept |
◆ readFromCache()
std::unique_ptr< QIODevice > readFromCache |
( |
const QUrl & |
url, |
|
|
QString & |
contentType |
|
) |
| |
|
noexcept |
◆ setMinimumCacheExpirationDate()
bool setMinimumCacheExpirationDate |
( |
const QUrl & |
url, |
|
|
const QDateTime & |
dt |
|
) |
| |
|
noexcept |
◆ operator=()
◆ instance()
◆ run()
◆ stop()
◆ mCacheFp
◆ mThreadStartSemaphore
QSemaphore mThreadStartSemaphore |
|
private |
◆ mManager
QNetworkAccessManager* mManager |
|
private |
◆ sInstance
The documentation for this class was generated from the following files: