add files for ATBUpdateOpkg

This commit is contained in:
2025-02-18 14:49:52 +01:00
parent c05db3b323
commit 63a959315b
4 changed files with 325 additions and 0 deletions

29
Opkg/opkg_command.h Normal file
View File

@@ -0,0 +1,29 @@
#ifndef OPKG_COMMND_H_INCLUDED
#define OPKG_COMMND_H_INCLUDED
#include <QStringList>
class OpkgCommand {
QString const m_opkg_commands_dir{"/etc/psa_update/"};
bool m_noaction;
QString m_opkg_commands_filename;
QStringList m_commands;
bool execCommands();
bool execCommandsInternal();
bool cleanUpOpkgCache();
public:
OpkgCommand(bool noaction = false,
QString const &opkg_commands_file_name="opkg_commands");
bool exec(QString const &cmd, QStringList const &options,
int start_timeout = 100000, int finish_timeout = 100000);
QStringList commands() { return m_commands; }
QStringList const &commands() const { return m_commands; }
bool readCommands();
};
#endif // OPKG_COMMND_H_INCLUDED