Add worker-object to be able to update for the worker.

This commit is contained in:
2023-08-02 15:47:19 +02:00
parent b508c0517d
commit 332d689b8c
2 changed files with 37 additions and 18 deletions

View File

@@ -9,7 +9,6 @@
#include <QProcess>
#include "plugins/interfaces.h"
#include "apism/apism_client.h"
#ifdef PTU5
#define SERIAL_PORT "ttymxc2"
@@ -17,15 +16,12 @@
#define SERIAL_PORT "ttyUSB0"
#endif
class Update;
// TODO: check hardware compatibility
// TODO: opkg commandos
class Worker;
class Update : public QObject {
Q_OBJECT
hwinf *m_hw;
Worker *m_worker;
char const *m_serialInterface;
char const *m_baudrate;
QString m_customerRepository;
@@ -44,6 +40,7 @@ public:
explicit Update(hwinf *hw,
Worker *worker,
QString customerRepository,
QString customerNrStr,
QString branchName,
@@ -53,7 +50,7 @@ public:
char const *serialInterface = SERIAL_PORT,
char const *baudrate = "115200");
virtual ~Update() override;
bool doUpdate(QStringList const &linesToWorkOn);
bool doUpdate(int &displayIndex, QStringList const &linesToWorkOn);
//QString customerId() { return m_customerId; }
//QString const customerId() const { return m_customerId; }