2#include <NDEVR/NtpClient.h>
3#include <NDEVR/ItemDownloader.h>
4#include <NDEVR/String.h>
6#include <NDEVR/Thread.h>
7#include <QNetworkRequest>
8#include <QNetworkAccessManager>
9#include <QNetworkReply>
59 virtual QByteArray
data()
override;
The equivelent of std::vector but with a bit more control.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Provides an interface for accessing resources on the internet.
A request for data or information from a network.
Allows the application to request network data using the Qt Framework.
virtual NetworkRequest * downloadFromURL(const WebTarget &url) override
Creates a network request to download content from the specified URL.
QNetworkAccessManager * m_manager
The underlying Qt network access manager.
static QNetworkRequest ConvertToRequest(const WebTarget &target)
Converts a WebTarget into a QNetworkRequest.
virtual NetworkRequest * uploadToURL(const WebTarget &request, const Buffer< uint01 > &data) override
Creates a network request to upload raw byte data to the specified URL.
virtual TimeRequest * networkTimeFromURL(const StringView &url, uint02 port) override
Creates an NTP time request to retrieve network time from the specified server.
NetworkRequest * uploadToURL(const WebTarget &request, const File &data) override
Creates a network request to upload a file to the specified URL.
void setData(const Buffer< uint01 > &data)
Sets the raw byte data to upload with this request.
void setData(const File &data)
Sets a file whose contents will be uploaded with this request.
void processErrorSlot(QNetworkReply::NetworkError error)
Handles network errors emitted by the QNetworkReply.
QNetworkRequest m_request
The underlying Qt network request.
QNetworkAccessManager * m_manager
The Qt network access manager executing the request.
virtual QByteArray data() override
Returns the response data received from the network.
File m_file
File to upload with the request.
Buffer< uint01 > m_data
Raw byte data to upload with the request.
void setReply(QNetworkReply *reply)
Assigns the QNetworkReply received from the network access manager.
virtual bool start() override
Initiates the network request.
QNetworkReply * m_reply
The active network reply, or nullptr if not started.
virtual void close() override
Closes the network reply and releases associated resources.
QtNetworkRequest(const QNetworkRequest &request, QNetworkAccessManager *manager)
Constructs a network request from a QNetworkRequest and access manager.
virtual void abort() override
Aborts the in-progress network request.
virtual bool isRunning() override
Checks whether the network request is still in progress.
The core String View class for the NDEVR API.
A request to get the time from the network.
The primary namespace for the NDEVR SDK.
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
static uint02 ntp_rx_port
Default local port for receiving NTP responses.
A url target and optional username and password for a network request.