add files for ATBUpdateOpkg
This commit is contained in:
29
Opkg/opkg_command.h
Normal file
29
Opkg/opkg_command.h
Normal 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
|
Reference in New Issue
Block a user