From 8281303a55ba7e6e2eae61d3730211f62100b68b Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Mon, 19 Jun 2023 16:00:22 +0200 Subject: [PATCH] Added updateDC() and updatePrinterTemplate() --- update.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/update.h b/update.h index 5ce8665..ab30e4d 100644 --- a/update.h +++ b/update.h @@ -33,7 +33,7 @@ class Update : public QObject { bool m_init; bool updateBinary(char const *fileToSendToDC); - bool updatePrinterConf(int nrOfTemplate, char const *fileToSendToDC); + bool updatePrinterConf(int templateIdx, QString fileToSendToDC); bool finishUpdate(bool finish); QStringList getOpenLines(); QStringList split(QString line, QChar sep = ','); @@ -42,6 +42,7 @@ class Update : public QObject { public: enum class DownloadResult {OK, ERROR, TIMEOUT, NOP}; + enum class FileTypeJson {CONFIG=1, DEVICE, CASH, SERIAL, TIME, PRINTER}; static hwinf *loadDCPlugin(QDir const &plugInDir, QString const &fn); @@ -68,5 +69,8 @@ private: bool resetDeviceController() const; QByteArray loadBinaryDCFile(QString filename) const; bool downloadBinaryToDC(QString const &bFile) const; + bool updateDC(QString bFile, QString br, QString serial) const; + bool updatePrinterTemplate(enum FileTypeJson type, int templateIdx, + QString fname, QString br, QString serial) const; }; #endif // UPDATE_H_INCLUDED