MythTV  master
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
MythSystemLegacy Class Reference

#include <mythsystemlegacy.h>

Inheritance diagram for MythSystemLegacy:
Inheritance graph
[legend]
Collaboration diagram for MythSystemLegacy:
Collaboration graph
[legend]

Signals

void started (void)
 
void finished (void)
 
void error (uint status)
 
void readDataReady (int fd)
 

Public Member Functions

 MythSystemLegacy (QObject *=nullptr)
 
 MythSystemLegacy (const QString &, uint, QObject *=nullptr)
 
 MythSystemLegacy (const QString &, const QStringList &, uint, QObject *=nullptr)
 
 ~MythSystemLegacy (void)
 
void SetCommand (const QString &, uint)
 Resets an existing MythSystemLegacy object to a new command. More...
 
void SetCommand (const QString &, const QStringList &, uint)
 Resets an existing MythSystemLegacy object to a new command. More...
 
void SetDirectory (const QString &)
 
bool SetNice (int nice)
 
bool SetIOPrio (int prio)
 
void Run (time_t timeout=0)
 Runs a command inside the /bin/sh shell. Returns immediately. More...
 
uint Wait (time_t timeout=0)
 
int Write (const QByteArray &)
 This writes to the standard input of the program being run. More...
 
QByteArray Read (int size)
 
QByteArray ReadErr (int size)
 
QByteArray & ReadAll ()
 
QByteArray & ReadAllErr ()
 
void Term (bool force=false)
 
void Signal (MythSignal)
 
bool isBackground (void)
 
bool doAutoCleanup (void)
 
bool onlyLowExitVal (void)
 
void HandlePreRun (void)
 
void HandlePostRun (void)
 
uint GetStatus (void)
 
void SetStatus (uint status)
 
QString & GetLogCmd (void)
 
QString & GetDirectory (void)
 
bool GetSetting (const char *setting)
 
QString & GetCommand (void)
 
void SetCommand (QString &cmd)
 
QStringList & GetArgs (void)
 
void SetArgs (QStringList &args)
 
int GetNice (void)
 
int GetIOPrio (void)
 
QBuffer * GetBuffer (int index)
 
void Unlock (void)
 

Static Public Member Functions

static QString ShellEscape (const QString &in)
 

Protected Member Functions

void ProcessFlags (uint flags)
 

Protected Attributes

uint m_status
 
QSemaphore m_semReady
 
QString m_command
 
QString m_logcmd
 
QStringList m_args
 
QString m_directory
 
int m_nice {0}
 
int m_ioprio {0}
 
Setting_t m_settings
 
QBuffer m_stdbuff [3]
 

Private Member Functions

void initializePrivate (void)
 

Private Attributes

MythSystemLegacyPrivated {nullptr}
 

Friends

class MythSystemLegacyPrivate
 

Detailed Description

Definition at line 69 of file mythsystemlegacy.h.

Constructor & Destructor Documentation

◆ MythSystemLegacy() [1/3]

MythSystemLegacy::MythSystemLegacy ( QObject *  parent = nullptr)
explicit

Definition at line 67 of file mythsystemlegacy.cpp.

◆ MythSystemLegacy() [2/3]

MythSystemLegacy::MythSystemLegacy ( const QString &  command,
uint  flags,
QObject *  parent = nullptr 
)

Definition at line 75 of file mythsystemlegacy.cpp.

◆ MythSystemLegacy() [3/3]

MythSystemLegacy::MythSystemLegacy ( const QString &  command,
const QStringList &  args,
uint  flags,
QObject *  parent = nullptr 
)

Definition at line 119 of file mythsystemlegacy.cpp.

◆ ~MythSystemLegacy()

MythSystemLegacy::~MythSystemLegacy ( void  )

Definition at line 178 of file mythsystemlegacy.cpp.

Member Function Documentation

◆ SetCommand() [1/3]

void MythSystemLegacy::SetCommand ( const QString &  command,
uint  flags 
)

Resets an existing MythSystemLegacy object to a new command.

Definition at line 88 of file mythsystemlegacy.cpp.

Referenced by Search::executeSearch(), and MythSystemLegacy().

◆ SetCommand() [2/3]

void MythSystemLegacy::SetCommand ( const QString &  command,
const QStringList &  args,
uint  flags 
)

Resets an existing MythSystemLegacy object to a new command.

Definition at line 133 of file mythsystemlegacy.cpp.

◆ SetDirectory()

void MythSystemLegacy::SetDirectory ( const QString &  directory)

◆ SetNice()

bool MythSystemLegacy::SetNice ( int  nice)

◆ SetIOPrio()

bool MythSystemLegacy::SetIOPrio ( int  prio)

◆ Run()

void MythSystemLegacy::Run ( time_t  timeout = 0)

◆ Wait()

uint MythSystemLegacy::Wait ( time_t  timeout = 0)

◆ Write()

int MythSystemLegacy::Write ( const QByteArray &  ba)

This writes to the standard input of the program being run.

All calls to this must be done before Run() is called. All calls after Run() is called are silently ignored.

Definition at line 411 of file mythsystemlegacy.cpp.

◆ Read()

QByteArray MythSystemLegacy::Read ( int  size)

Definition at line 387 of file mythsystemlegacy.cpp.

◆ ReadErr()

QByteArray MythSystemLegacy::ReadErr ( int  size)

Definition at line 392 of file mythsystemlegacy.cpp.

◆ ReadAll()

QByteArray & MythSystemLegacy::ReadAll ( void  )

◆ ReadAllErr()

QByteArray & MythSystemLegacy::ReadAllErr ( void  )

Definition at line 402 of file mythsystemlegacy.cpp.

Referenced by MediaMonitorUnix::GetDeviceFile().

◆ Term()

void MythSystemLegacy::Term ( bool  force = false)

◆ Signal()

void MythSystemLegacy::Signal ( MythSignal  sig)

Definition at line 295 of file mythsystemlegacy.cpp.

Referenced by WeatherSource::~WeatherSource().

◆ isBackground()

bool MythSystemLegacy::isBackground ( void  )
inline

Definition at line 110 of file mythsystemlegacy.h.

◆ doAutoCleanup()

bool MythSystemLegacy::doAutoCleanup ( void  )
inline

Definition at line 112 of file mythsystemlegacy.h.

◆ onlyLowExitVal()

bool MythSystemLegacy::onlyLowExitVal ( void  )
inline

Definition at line 115 of file mythsystemlegacy.h.

◆ HandlePreRun()

void MythSystemLegacy::HandlePreRun ( void  )

Definition at line 419 of file mythsystemlegacy.cpp.

Referenced by Run().

◆ HandlePostRun()

void MythSystemLegacy::HandlePostRun ( void  )

Definition at line 450 of file mythsystemlegacy.cpp.

◆ GetStatus()

uint MythSystemLegacy::GetStatus ( void  )
inline

◆ SetStatus()

void MythSystemLegacy::SetStatus ( uint  status)
inline

Definition at line 126 of file mythsystemlegacy.h.

◆ GetLogCmd()

QString& MythSystemLegacy::GetLogCmd ( void  )
inline

Definition at line 130 of file mythsystemlegacy.h.

◆ GetDirectory()

QString& MythSystemLegacy::GetDirectory ( void  )
inline

Definition at line 132 of file mythsystemlegacy.h.

◆ GetSetting()

bool MythSystemLegacy::GetSetting ( const char *  setting)
inline

◆ GetCommand()

QString& MythSystemLegacy::GetCommand ( void  )
inline

Definition at line 140 of file mythsystemlegacy.h.

◆ SetCommand() [3/3]

void MythSystemLegacy::SetCommand ( QString &  cmd)
inline

Definition at line 143 of file mythsystemlegacy.h.

◆ GetArgs()

QStringList& MythSystemLegacy::GetArgs ( void  )
inline

Definition at line 147 of file mythsystemlegacy.h.

◆ SetArgs()

void MythSystemLegacy::SetArgs ( QStringList &  args)
inline

Definition at line 150 of file mythsystemlegacy.h.

◆ GetNice()

int MythSystemLegacy::GetNice ( void  )
inline

Definition at line 152 of file mythsystemlegacy.h.

◆ GetIOPrio()

int MythSystemLegacy::GetIOPrio ( void  )
inline

Definition at line 153 of file mythsystemlegacy.h.

◆ GetBuffer()

QBuffer* MythSystemLegacy::GetBuffer ( int  index)
inline

Definition at line 156 of file mythsystemlegacy.h.

◆ Unlock()

void MythSystemLegacy::Unlock ( void  )
inline

Definition at line 159 of file mythsystemlegacy.h.

◆ ShellEscape()

QString MythSystemLegacy::ShellEscape ( const QString &  in)
static

Definition at line 477 of file mythsystemlegacy.cpp.

Referenced by Search::executeSearch().

◆ started

void MythSystemLegacy::started ( void  )
signal

Referenced by Run().

◆ finished

void MythSystemLegacy::finished ( void  )
signal

◆ error

void MythSystemLegacy::error ( uint  status)
signal

Referenced by Run().

◆ readDataReady

void MythSystemLegacy::readDataReady ( int  fd)
signal

◆ initializePrivate()

void MythSystemLegacy::initializePrivate ( void  )
private

Definition at line 58 of file mythsystemlegacy.cpp.

Referenced by MythSystemLegacy().

◆ ProcessFlags()

void MythSystemLegacy::ProcessFlags ( uint  flags)
protected

Definition at line 334 of file mythsystemlegacy.cpp.

Referenced by SetCommand().

Friends And Related Function Documentation

◆ MythSystemLegacyPrivate

friend class MythSystemLegacyPrivate
friend

Definition at line 161 of file mythsystemlegacy.h.

Member Data Documentation

◆ d

MythSystemLegacyPrivate* MythSystemLegacy::d {nullptr}
private

◆ m_status

uint MythSystemLegacy::m_status
protected

Definition at line 183 of file mythsystemlegacy.h.

Referenced by ProcessFlags(), Run(), SetCommand(), Signal(), Term(), and Wait().

◆ m_semReady

QSemaphore MythSystemLegacy::m_semReady
protected

Definition at line 184 of file mythsystemlegacy.h.

Referenced by MythSystemLegacy(), Run(), and Wait().

◆ m_command

QString MythSystemLegacy::m_command
protected

Definition at line 186 of file mythsystemlegacy.h.

Referenced by ProcessFlags(), and SetCommand().

◆ m_logcmd

QString MythSystemLegacy::m_logcmd
protected

Definition at line 187 of file mythsystemlegacy.h.

Referenced by SetCommand().

◆ m_args

QStringList MythSystemLegacy::m_args
protected

Definition at line 188 of file mythsystemlegacy.h.

Referenced by SetCommand().

◆ m_directory

QString MythSystemLegacy::m_directory
protected

Definition at line 189 of file mythsystemlegacy.h.

Referenced by SetDirectory().

◆ m_nice

int MythSystemLegacy::m_nice {0}
protected

Definition at line 191 of file mythsystemlegacy.h.

Referenced by SetNice().

◆ m_ioprio

int MythSystemLegacy::m_ioprio {0}
protected

Definition at line 192 of file mythsystemlegacy.h.

Referenced by SetIOPrio().

◆ m_settings

Setting_t MythSystemLegacy::m_settings
protected

Definition at line 194 of file mythsystemlegacy.h.

Referenced by ProcessFlags(), SetCommand(), and SetDirectory().

◆ m_stdbuff

QBuffer MythSystemLegacy::m_stdbuff[3]
protected

Definition at line 195 of file mythsystemlegacy.h.

Referenced by Read(), ReadAll(), ReadAllErr(), ReadErr(), SetCommand(), and Write().


The documentation for this class was generated from the following files: