Added updateDC() and updatePrinterTemplate()

This commit is contained in:
Gerhard Hoffmann 2023-06-19 16:00:22 +02:00
parent a4afeeb396
commit 8281303a55

View File

@ -33,7 +33,7 @@ class Update : public QObject {
bool m_init; bool m_init;
bool updateBinary(char const *fileToSendToDC); bool updateBinary(char const *fileToSendToDC);
bool updatePrinterConf(int nrOfTemplate, char const *fileToSendToDC); bool updatePrinterConf(int templateIdx, QString fileToSendToDC);
bool finishUpdate(bool finish); bool finishUpdate(bool finish);
QStringList getOpenLines(); QStringList getOpenLines();
QStringList split(QString line, QChar sep = ','); QStringList split(QString line, QChar sep = ',');
@ -42,6 +42,7 @@ class Update : public QObject {
public: public:
enum class DownloadResult {OK, ERROR, TIMEOUT, NOP}; 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); static hwinf *loadDCPlugin(QDir const &plugInDir, QString const &fn);
@ -68,5 +69,8 @@ private:
bool resetDeviceController() const; bool resetDeviceController() const;
QByteArray loadBinaryDCFile(QString filename) const; QByteArray loadBinaryDCFile(QString filename) const;
bool downloadBinaryToDC(QString const &bFile) 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 #endif // UPDATE_H_INCLUDED