34#include <NDEVR/BaseValues.h>
35#include <NDEVR/TimeSpan.h>
36#include <NDEVR/String.h>
41class QNetworkAccessManager;
54 virtual QByteArray
data() = 0;
78 return rxTime() - txTime();
82 return ((serverTime() - rxTime()) - (serverTime() - txTime())) / 2.0;
125 void fileDownloadedSlot();
126 void downloadedErrorSlot(
int error);
127 void updateDownloadProgressSlot(qint64 ist, qint64 max);
134 uint08 m_current_download_size;
135 uint08 m_total_download_size;
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:59
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
Definition ItemDownloader.h:104
void percentChangedSignal()
ItemDownloader(QUrl url, QObject *parent=nullptr)
const QByteArray & downloadedData() const
fltp08 downloadPercent() const
static NetworkAccessManager * NetworkManager()
static void SetAccessManager(NetworkAccessManager *manager)
uint08 currentDownloadSize() const
Definition ItemDownloader.h:111
void setNetworkRequest(const String &url)
static bool HasNetworkManager()
virtual ~ItemDownloader()
void downloadFailedSignal(int)
ItemDownloader(const String &url, QObject *parent=nullptr)
uint08 totalDownloadSize() const
Definition ItemDownloader.h:112
Definition ItemDownloader.h:96
virtual TimeRequest * networkTimeFromURL(const String &url, uint02 port=123)=0
virtual NetworkRequest * uploadToURL(const WebTarget &request, const File &data)=0
virtual NetworkRequest * uploadToURL(const WebTarget &request, const Buffer< uint01 > &data)=0
virtual NetworkRequest * downloadFromURL(const WebTarget &url)=0
Definition ItemDownloader.h:47
void errorOccurredSignal(int error)
void downloadProgressSignal(qint64 bytesReceived, qint64 bytesTotal)
void uploadProgressSignal(qint64 bytesSent, qint64 bytesTotal)
void redirectAllowedSignal()
void socketStartedConnectingSignal()
virtual QByteArray data()=0
virtual bool isRunning()=0
void metaDataChangedSignal()
Handles timing out certain operations such as downloads.
Definition ReplyTimeout.h:11
The core String class for the software.
Definition String.h:47
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
Definition ItemDownloader.h:70
TimeSpan roundTripDelay() const
Definition ItemDownloader.h:76
void errorOccurredSignal(int error)
virtual Time serverTime() const =0
TimeSpan localClockOffset() const
Definition ItemDownloader.h:80
virtual Time rxTime() const =0
virtual Time txTime() const =0
Stores a time span, or difference between two times, with an optional start time.
Definition TimeSpan.h:46
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
Definition BaseValues.hpp:104
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:86
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:146
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved.
Definition BaseValues.hpp:230
Definition ItemDownloader.h:89
uint02 port
Definition ItemDownloader.h:93
String url
Definition ItemDownloader.h:90
String password
Definition ItemDownloader.h:92
String username
Definition ItemDownloader.h:91