Add reporting thread and download thread.

This commit is contained in:
Gerhard Hoffmann 2023-12-03 19:53:18 +01:00
parent 8e287e3163
commit 68813a49c5

View File

@ -20,6 +20,9 @@
*/
#include "hwapi.h"
#include "reporting_thread.h"
#include "download_thread.h"
#include <algorithm>
#include <cstring>
@ -4373,7 +4376,11 @@ uint16_t hwapi::bna_getStackerLevel(uint32_t *amountInStacker, uint16_t *countOf
return anzahl;
}
void hwapi::dcDownloadInit(QString const &dcFileToDownload) {
hwapi *hwapi::getAPI() {
return this;
}
void hwapi::dcDownloadRequest(QString const &dcFileToDownload) {
char *fNameBuffer = SharedMem::getData()->m_downLoadDC.m_filename;
size_t const size = sizeof(SharedMem::getData()->m_downLoadDC.m_filename);
@ -4392,7 +4399,11 @@ void hwapi::dcDownloadStart() {
}
void hwapi::dcDownloadReportStart() {
if (SharedMem::getDataConst()->m_downLoadDC.m_started ||
SharedMem::getDataConst()->m_downLoadDC.m_running) {
m_reportingThread = new ReportingThread(this);
m_reportingThread->start();
}
}
bool hwapi::dcDownloadRequested() const {