Go to the documentation of this file.
22 #ifndef MYTHSYSTEMLEGACY_H
23 #define MYTHSYSTEMLEGACY_H
51 #include <QStringList>
75 QObject *parent =
nullptr);
79 void SetCommand(
const QString &command,
uint flags);
81 void SetCommand(
const QString &command,
const QStringList &
args,
uint flags);
83 void SetDirectory(
const QString &directory);
85 bool SetNice(
int nice);
87 bool SetIOPrio(
int prio);
91 void Run(std::chrono::seconds
timeout = 0s);
95 int Write(
const QByteArray &ba);
96 QByteArray Read(
int size);
97 QByteArray ReadErr(
int size);
99 QByteArray& ReadAll();
101 QByteArray& ReadAllErr();
104 void Term(
bool force =
false);
115 void HandlePreRun(
void);
117 void HandlePostRun(
void);
135 {
return m_settings.value(QString(setting)); }
154 QBuffer *
GetBuffer(
int index) {
return &m_stdbuff[index]; }
157 void Unlock(
void) { m_semReady.release(1); }
174 void initializePrivate(
void);
179 void ProcessFlags(
uint flags);
199 std::chrono::seconds
timeout = 0s);
201 uint Flags =
kMSNone, std::chrono::seconds Timeout = 0s);
203 #endif // MYTHSYSTEMLEGACY_H
void SetStatus(uint status)
uint GetStatus(void) const
QString & GetDirectory(void)
void SetCommand(const QString &cmd)
bool onlyLowExitVal(void)
QBuffer * GetBuffer(int index)
@ GENERIC_EXIT_OK
Exited with no error.
QStringList & GetArgs(void)
bool GetSetting(const char *setting)
void SetArgs(const QStringList &args)
QString & GetLogCmd(void)
std::array< QBuffer, 3 > m_stdbuff
void readDataReady(int fd)
QMap< QString, bool > Setting
int GetIOPrio(void) const
QString & GetCommand(void)
MBASE_PUBLIC uint myth_system(const QString &command, uint flags=kMSNone, std::chrono::seconds timeout=0s)
QString ShellEscape(const QString &src)
void MBASE_PUBLIC ShutdownMythSystemLegacy(void)
static const iso6937table * d