MythTV  master
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
MythSystemLegacyWrapper Class Reference
Inheritance diagram for MythSystemLegacyWrapper:
Inheritance graph
[legend]
Collaboration diagram for MythSystemLegacyWrapper:
Collaboration graph
[legend]

Public Member Functions

 ~MythSystemLegacyWrapper (void) override
 
uint GetFlags (void) const override
 Returns the flags passed to the constructor. More...
 
QString GetStartingPath (void) const override
 Returns the starting path of the program. More...
 
Priority GetCPUPriority (void) const override
 Return the CPU Priority of the program. More...
 
Priority GetDiskPriority (void) const override
 Return the Disk Priority of the program. More...
 
bool Wait (std::chrono::milliseconds timeout) override
 Blocks until child process is collected or timeout reached. More...
 
QIODevice * GetStandardInputStream (void) override
 Returns the standard input stream for the program if the kMSStdIn flag was passed to the constructor. More...
 
QIODevice * GetStandardOutputStream (void) override
 Returns the standard output stream for the program if the kMSStdOut flag was passed to the constructor. More...
 
QIODevice * GetStandardErrorStream (void) override
 Returns the standard error stream for the program if the kMSStdErr flag was passed to the constructor. More...
 
void Signal (MythSignal sig) override
 Sends the selected signal to the program. More...
 
int GetExitCode (void) const override
 returns the exit code, if any, that the program returned. More...
 
- Public Member Functions inherited from MythSystem
virtual ~MythSystem (void)=default
 
 MythSystem (const MythSystem &)=delete
 
MythSystemoperator= (const MythSystem &)=delete
 

Static Public Member Functions

static MythSystemLegacyWrapperCreate (const QStringList &args, uint flags, const QString &startPath, Priority, Priority)
 
- Static Public Member Functions inherited from MythSystem
static MythSystemCreate (const QStringList &args, uint flags=kMSNone, const QString &startPath=QString(), Priority cpuPriority=kInheritPriority, Priority diskPriority=kInheritPriority)
 
static MythSystemCreate (const QString &args, uint flags=kMSNone, const QString &startPath=QString(), Priority cpuPriority=kInheritPriority, Priority diskPriority=kInheritPriority)
 

Private Member Functions

 MythSystemLegacyWrapper (MythSystemLegacy *legacy, uint flags)
 

Private Attributes

QScopedPointer< MythSystemLegacym_legacy
 
uint m_flags
 

Additional Inherited Members

- Public Types inherited from MythSystem
enum  Priority {
  kIdlePriority = 0, kLowestPriority, kLowPriority, kNormalPriority,
  kHighPriority, kHighestPriority, kTimeCriticalPriority, kInheritPriority
}
 Priorities that can be used for cpu and disk usage of child process. More...
 
- Protected Member Functions inherited from MythSystem
 MythSystem ()=default
 

Detailed Description

Definition at line 38 of file mythsystem.cpp.

Constructor & Destructor Documentation

◆ ~MythSystemLegacyWrapper()

MythSystemLegacyWrapper::~MythSystemLegacyWrapper ( void  )
inlineoverride

Definition at line 69 of file mythsystem.cpp.

◆ MythSystemLegacyWrapper()

MythSystemLegacyWrapper::MythSystemLegacyWrapper ( MythSystemLegacy legacy,
uint  flags 
)
inlineprivate

Definition at line 190 of file mythsystem.cpp.

Referenced by Create().

Member Function Documentation

◆ Create()

static MythSystemLegacyWrapper* MythSystemLegacyWrapper::Create ( const QStringList &  args,
uint  flags,
const QString &  startPath,
Priority  ,
Priority   
)
inlinestatic

Definition at line 41 of file mythsystem.cpp.

Referenced by MythSystem::Create().

◆ GetFlags()

uint MythSystemLegacyWrapper::GetFlags ( void  ) const
inlineoverridevirtual

Returns the flags passed to the constructor.

Implements MythSystem.

Definition at line 74 of file mythsystem.cpp.

◆ GetStartingPath()

QString MythSystemLegacyWrapper::GetStartingPath ( void  ) const
inlineoverridevirtual

Returns the starting path of the program.

Implements MythSystem.

Definition at line 80 of file mythsystem.cpp.

◆ GetCPUPriority()

Priority MythSystemLegacyWrapper::GetCPUPriority ( void  ) const
inlineoverridevirtual

Return the CPU Priority of the program.

Implements MythSystem.

Definition at line 86 of file mythsystem.cpp.

◆ GetDiskPriority()

Priority MythSystemLegacyWrapper::GetDiskPriority ( void  ) const
inlineoverridevirtual

Return the Disk Priority of the program.

Implements MythSystem.

Definition at line 92 of file mythsystem.cpp.

◆ Wait()

bool MythSystemLegacyWrapper::Wait ( std::chrono::milliseconds  timeout)
inlineoverridevirtual

Blocks until child process is collected or timeout reached.

Returns true if program has exited and has been collected. WARNING if program returns 142 then we will forever think it is running even though it is not. WARNING The legacy timeout is in seconds not milliseconds, timeout will be rounded.

Implements MythSystem.

Definition at line 103 of file mythsystem.cpp.

Referenced by GetStandardErrorStream(), GetStandardOutputStream(), and ~MythSystemLegacyWrapper().

◆ GetStandardInputStream()

QIODevice* MythSystemLegacyWrapper::GetStandardInputStream ( void  )
inlineoverridevirtual

Returns the standard input stream for the program if the kMSStdIn flag was passed to the constructor.

Note: This is not safe!

Implements MythSystem.

Definition at line 114 of file mythsystem.cpp.

◆ GetStandardOutputStream()

QIODevice* MythSystemLegacyWrapper::GetStandardOutputStream ( void  )
inlineoverridevirtual

Returns the standard output stream for the program if the kMSStdOut flag was passed to the constructor.

Implements MythSystem.

Definition at line 130 of file mythsystem.cpp.

◆ GetStandardErrorStream()

QIODevice* MythSystemLegacyWrapper::GetStandardErrorStream ( void  )
inlineoverridevirtual

Returns the standard error stream for the program if the kMSStdErr flag was passed to the constructor.

Implements MythSystem.

Definition at line 148 of file mythsystem.cpp.

◆ Signal()

void MythSystemLegacyWrapper::Signal ( MythSignal  sig)
inlineoverridevirtual

Sends the selected signal to the program.

Implements MythSystem.

Definition at line 165 of file mythsystem.cpp.

◆ GetExitCode()

int MythSystemLegacyWrapper::GetExitCode ( void  ) const
inlineoverridevirtual

returns the exit code, if any, that the program returned.

Returns -1 if the program exited without exit code. Returns -2 if the program has not yet been collected. Returns an exit code 0..255 if the program exited with exit code.

Implements MythSystem.

Definition at line 176 of file mythsystem.cpp.

Member Data Documentation

◆ m_legacy

QScopedPointer<MythSystemLegacy> MythSystemLegacyWrapper::m_legacy
private

◆ m_flags

uint MythSystemLegacyWrapper::m_flags
private

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