Reordered and extended interface-api for download-thread and reporting-thread:

virtual bool dcDownloadRequest(QString const &fileToDownload) const;
virtual bool dcDownloadRequested() const;
virtual bool dcDownloadResetRequest() const;
virtual bool dcDownloadRequestAck() const;
virtual bool dcDownloadRunning() const;
virtual bool dcDownloadFinished();

virtual bool dcDownloadReportStart() const;
virtual bool dcDownloadReportRunning() const;

virtual bool dcDownloadReportFinished();
virtual bool dcDownloadThreadStart();
virtual bool dcDownloadThreadRunning() const;
virtual void dcDownloadThreadFinalize(DownloadThread *);

virtual bool dcDownloadThreadFinished() const;
virtual bool dcDownloadReportThreadStart();
virtual bool dcDownloadReportThreadRunning() const;
virtual void dcDownloadReportThreadFinalize();
virtual void dcDownloadReportThreadQuit();

virtual bool dcDownloadReportThreadFinished() const;
virtual QString dcDownloadFileName() const;
virtual bool dcDownloadSetRequested(bool requested);
virtual bool dcDownloadSetRunning(bool running);
virtual bool dcDownloadSetFinished(bool finished);
virtual void dcDownloadSetTotalBlockNumber(uint16_t totalBlockNumber);
virtual void dcDownloadSetCurrentBlockNumber(uint16_t currentBlockNumber);
virtual bool dcDownloadGetRequested() const;
virtual bool dcDownloadGetRunning() const;
virtual bool dcDownloadGetFinished() const;
virtual uint16_t dcDownloadGetTotalBlockNumber() const;
virtual uint16_t dcDownloadGetCurrentBlockNumber() const;
This commit is contained in:
Gerhard Hoffmann 2023-12-08 12:44:53 +01:00
parent b7ff6dcdbe
commit 6b9e795206

View File

@ -399,6 +399,7 @@ struct T_bna
};
class hwapi;
class DownloadThread;
class hwinf
{
@ -2276,30 +2277,53 @@ public:
// download device controller
virtual void dcDownloadStart() {}
virtual bool dcDownloadFinished() { return true; }
virtual bool dcDownloadRequest(QString const &fileToDownload) {
virtual bool dcDownloadRequest(QString const &fileToDownload) const {
Q_UNUSED(fileToDownload);
return false;
}
virtual bool dcDownloadRequested() const { return false; }
virtual bool dcDownloadResetRequest() { return false; }
virtual QString dcDownloadFileName() const { return ""; }
virtual void dcDownloadReportStart() {}
virtual bool dcDownloadReportRunning() { return true; }
virtual bool dcDownloadResetRequest() const { return false; }
virtual bool dcDownloadRequestAck() const { return false; }
virtual bool dcDownloadRunning() const { return false; }
virtual bool dcDownloadFinished() { return false; }
virtual bool dcDownloadReportStart() const { return false; }
virtual bool dcDownloadReportRunning() const { return true; }
virtual bool dcDownloadReportFinished() { return true; }
virtual bool dcDownloadThreadStart() { return false; }
virtual bool dcDownloadThreadRunning() const { return true; }
virtual void dcDownloadThreadFinalize(DownloadThread *) {}
virtual bool dcDownloadThreadFinished() const { return true; }
virtual bool dcDownloadReportThreadStart() { return false; }
virtual bool dcDownloadReportThreadRunning() const { return true; }
virtual void dcDownloadReportThreadFinalize() {}
virtual void dcDownloadReportThreadQuit() {}
virtual bool dcDownloadReportThreadFinished() const { return true; }
virtual QString dcDownloadFileName() const { return ""; }
virtual bool dcDownloadSetRequested(bool requested) {
Q_UNUSED(requested); return false;
}
virtual bool dcDownloadSetRunning(bool running) {
Q_UNUSED(running); return false;
}
virtual bool dcDownloadSetFinished(bool finished) {
Q_UNUSED(finished); return false;
}
virtual void dcDownloadSetTotalBlockNumber(uint16_t totalBlockNumber) {
Q_UNUSED(totalBlockNumber);
}
virtual void dcDownloadSetCurrentBlockNumber(uint16_t currentBlockNumber) {
Q_UNUSED(currentBlockNumber);
}
virtual bool dcDownloadGetRequested() const { return false; }
virtual bool dcDownloadGetRunning() const { return false; }
virtual bool dcDownloadGetFinished() const { return false; }
virtual uint16_t dcDownloadGetTotalBlockNumber() const { return 0; }
virtual uint16_t dcDownloadGetCurrentBlockNumber() const { return 0; }
virtual bool dcDownloadRunning() const { return false; }
virtual bool dcDownloadFinished() const { return false; }
virtual QObject const *getAPI() { return nullptr; }
signals: // for download