NDEVR
API Documentation
QtNetworkAccessManager

Allows the application to request network data using the Qt Framework. More...

Inheritance diagram for QtNetworkAccessManager:
[legend]
Collaboration diagram for QtNetworkAccessManager:
[legend]

Public Member Functions

virtual NetworkRequestdownloadFromURL (const WebTarget &url) override
 Creates a network request to download content from the specified URL.
virtual TimeRequestnetworkTimeFromURL (const StringView &url, uint02 port) override
 Creates an NTP time request to retrieve network time from the specified server.
virtual NetworkRequestuploadToURL (const WebTarget &request, const Buffer< uint01 > &data) override
 Creates a network request to upload raw byte data to the specified URL.
NetworkRequestuploadToURL (const WebTarget &request, const File &data) override
 Creates a network request to upload a file to the specified URL.

Static Public Member Functions

static QNetworkRequest ConvertToRequest (const WebTarget &target)
 Converts a WebTarget into a QNetworkRequest.

Protected Attributes

QNetworkAccessManager * m_manager = nullptr
 The underlying Qt network access manager.

Detailed Description

Allows the application to request network data using the Qt Framework.


Definition at line 81 of file QTNetworkRequest.h.

Member Function Documentation

◆ ConvertToRequest()

QNetworkRequest QtNetworkAccessManager::ConvertToRequest ( const WebTarget & target)
static

Converts a WebTarget into a QNetworkRequest.

Parameters
[in]targetThe web target containing URL and header information.
Returns
A QNetworkRequest configured from the given target.

◆ downloadFromURL()

virtual NetworkRequest * QtNetworkAccessManager::downloadFromURL ( const WebTarget & url)
overridevirtual

Creates a network request to download content from the specified URL.

Parameters
[in]urlThe web target to download from.
Returns
A new NetworkRequest for the download operation.

Implements NetworkAccessManager.

◆ networkTimeFromURL()

virtual TimeRequest * QtNetworkAccessManager::networkTimeFromURL ( const StringView & url,
uint02 port )
overridevirtual

Creates an NTP time request to retrieve network time from the specified server.

Parameters
[in]urlThe NTP server hostname.
[in]portThe NTP server port.
Returns
A new TimeRequest for the NTP time query.

Implements NetworkAccessManager.

◆ uploadToURL() [1/2]

virtual NetworkRequest * QtNetworkAccessManager::uploadToURL ( const WebTarget & request,
const Buffer< uint01 > & data )
overridevirtual

Creates a network request to upload raw byte data to the specified URL.

Parameters
[in]requestThe web target to upload to.
[in]dataThe raw byte data to upload.
Returns
A new NetworkRequest for the upload operation.

Implements NetworkAccessManager.

◆ uploadToURL() [2/2]

NetworkRequest * QtNetworkAccessManager::uploadToURL ( const WebTarget & request,
const File & data )
overridevirtual

Creates a network request to upload a file to the specified URL.

Parameters
[in]requestThe web target to upload to.
[in]dataThe file to upload.
Returns
A new NetworkRequest for the upload operation.

Implements NetworkAccessManager.


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