CPPMyth
Library to interoperate with MythTV server
Loading...
Searching...
No Matches
Myth::ProtoMonitor Class Reference
Inheritance diagram for Myth::ProtoMonitor:
Collaboration diagram for Myth::ProtoMonitor:

Public Member Functions

 ProtoMonitor (const std::string &server, unsigned port)
 ProtoMonitor (const std::string &server, unsigned port, bool frontend)
virtual bool Open ()
virtual void Close ()
virtual bool IsOpen ()
ProtoRecorderPtr GetRecorderFromNum (int rnum)
bool QueryFreeSpaceSummary (int64_t *total, int64_t *used)
std::string GetSetting (const std::string &hostname, const std::string &setting)
bool SetSetting (const std::string &hostname, const std::string &setting, const std::string &value)
bool QueryGenpixmap (const Program &program)
bool DeleteRecording (const Program &program, bool force=false, bool forget=false)
bool UndeleteRecording (const Program &program)
bool StopRecording (const Program &program)
bool CancelNextRecording (int rnum, bool cancel)
StorageGroupFilePtr QuerySGFile (const std::string &hostname, const std::string &sgname, const std::string &filename)
MarkListPtr GetCutList (const Program &program)
MarkListPtr GetCommBreakList (const Program &program)
bool BlockShutdown ()
bool AllowShutdown ()
CardInputListPtr GetFreeInputs (int rnum=0)
 Asks the backend for a list of free inputs. A free input is one that is connected but not busy, not in a busy input group or is locked.
Public Member Functions inherited from Myth::ProtoBase
 ProtoBase (const std::string &server, unsigned port)
virtual unsigned GetProtoVersion () const
virtual std::string GetServer () const
virtual unsigned GetPort () const
virtual int GetSocketErrNo () const
virtual int GetSocket () const
virtual bool HasHanging () const
virtual void CleanHanging ()
virtual ERROR_t GetProtoError () const

Private Member Functions

bool Announce75 ()
bool Announce88 ()
ProtoRecorderPtr GetRecorderFromNum75 (int rnum)
bool QueryFreeSpaceSummary75 (int64_t *total, int64_t *used)
std::string GetSetting75 (const std::string &hostname, const std::string &setting)
bool SetSetting75 (const std::string &hostname, const std::string &setting, const std::string &value)
bool QueryGenpixmap75 (const Program &program)
bool DeleteRecording75 (const Program &program, bool force, bool forget)
bool UndeleteRecording75 (const Program &program)
bool StopRecording75 (const Program &program)
bool CancelNextRecording75 (int rnum, bool cancel)
StorageGroupFilePtr QuerySGFile75 (const std::string &hostname, const std::string &sgname, const std::string &filename)
MarkListPtr GetCutList75 (const Program &program)
MarkListPtr GetCommBreakList75 (const Program &program)
bool BlockShutdown75 ()
bool AllowShutdown75 ()
std::vector< int > GetFreeCardIdList75 ()
CardInputListPtr GetFreeInputs75 ()
CardInputListPtr GetFreeInputs79 ()
CardInputListPtr GetFreeInputs81 ()
CardInputListPtr GetFreeInputs87 (int rnum)
CardInputListPtr GetFreeInputs89 (int rnum)
CardInputListPtr GetFreeInputs90 (int rnum)
CardInputListPtr GetFreeInputs91 (int rnum)

Private Attributes

bool m_frontend

Additional Inherited Members

Public Types inherited from Myth::ProtoBase
enum  ERROR_t { ERROR_NO_ERROR = 0 , ERROR_SERVER_UNREACHABLE , ERROR_SOCKET_ERROR , ERROR_UNKNOWN_VERSION }
Protected Member Functions inherited from Myth::ProtoBase
bool OpenConnection (int rcvbuf)
void HangException ()
bool SendCommand (const char *cmd, bool feedback=true)
size_t GetMessageLength () const
bool ReadField (std::string &field)
bool IsMessageOK (const std::string &field) const
size_t FlushMessage ()
bool RcvMessageLength ()
ProgramPtr RcvProgramInfo ()
void MakeProgramInfo (const Program &program, std::string &msg)
Protected Attributes inherited from Myth::ProtoBase
OS::Latch * m_latch
TcpSocket * m_socket
unsigned m_protoVersion
std::string m_server
unsigned m_port
bool m_hang
 Connection hang: while true allow retry.
bool m_tainted
 Connection has hung since last reset.
size_t m_msgLength
size_t m_msgConsumed

Detailed Description

Definition at line 35 of file mythprotomonitor.h.

Constructor & Destructor Documentation

◆ ProtoMonitor() [1/2]

ProtoMonitor::ProtoMonitor ( const std::string & server,
unsigned port )

Definition at line 39 of file mythprotomonitor.cpp.

◆ ProtoMonitor() [2/2]

ProtoMonitor::ProtoMonitor ( const std::string & server,
unsigned port,
bool frontend )

Definition at line 45 of file mythprotomonitor.cpp.

Member Function Documentation

◆ AllowShutdown()

bool Myth::ProtoMonitor::AllowShutdown ( )
inline

Definition at line 97 of file mythprotomonitor.h.

◆ AllowShutdown75()

bool ProtoMonitor::AllowShutdown75 ( )
private

Definition at line 512 of file mythprotomonitor.cpp.

◆ Announce75()

bool ProtoMonitor::Announce75 ( )
private

Definition at line 86 of file mythprotomonitor.cpp.

◆ Announce88()

bool ProtoMonitor::Announce88 ( )
private

Definition at line 105 of file mythprotomonitor.cpp.

◆ BlockShutdown()

bool Myth::ProtoMonitor::BlockShutdown ( )
inline

Definition at line 93 of file mythprotomonitor.h.

◆ BlockShutdown75()

bool ProtoMonitor::BlockShutdown75 ( )
private

Definition at line 490 of file mythprotomonitor.cpp.

◆ CancelNextRecording()

bool Myth::ProtoMonitor::CancelNextRecording ( int rnum,
bool cancel )
inline

Definition at line 77 of file mythprotomonitor.h.

◆ CancelNextRecording75()

bool ProtoMonitor::CancelNextRecording75 ( int rnum,
bool cancel )
private

Definition at line 339 of file mythprotomonitor.cpp.

◆ Close()

void ProtoMonitor::Close ( )
virtual

Reimplemented from Myth::ProtoBase.

Definition at line 71 of file mythprotomonitor.cpp.

◆ DeleteRecording()

bool Myth::ProtoMonitor::DeleteRecording ( const Program & program,
bool force = false,
bool forget = false )
inline

Definition at line 65 of file mythprotomonitor.h.

◆ DeleteRecording75()

bool ProtoMonitor::DeleteRecording75 ( const Program & program,
bool force,
bool forget )
private

Definition at line 253 of file mythprotomonitor.cpp.

◆ GetCommBreakList()

MarkListPtr Myth::ProtoMonitor::GetCommBreakList ( const Program & program)
inline

Definition at line 89 of file mythprotomonitor.h.

◆ GetCommBreakList75()

MarkListPtr ProtoMonitor::GetCommBreakList75 ( const Program & program)
private

Definition at line 447 of file mythprotomonitor.cpp.

◆ GetCutList()

MarkListPtr Myth::ProtoMonitor::GetCutList ( const Program & program)
inline

Definition at line 85 of file mythprotomonitor.h.

◆ GetCutList75()

MarkListPtr ProtoMonitor::GetCutList75 ( const Program & program)
private

Definition at line 404 of file mythprotomonitor.cpp.

◆ GetFreeCardIdList75()

std::vector< int > ProtoMonitor::GetFreeCardIdList75 ( )
private

Definition at line 534 of file mythprotomonitor.cpp.

◆ GetFreeInputs()

CardInputListPtr Myth::ProtoMonitor::GetFreeInputs ( int rnum = 0)
inline

Asks the backend for a list of free inputs. A free input is one that is connected but not busy, not in a busy input group or is locked.

Parameters
rnumSince protocol 87: Input to exclude (not counted as busy). Defaulted with 0 for none.
Returns

Definition at line 106 of file mythprotomonitor.h.

◆ GetFreeInputs75()

CardInputListPtr ProtoMonitor::GetFreeInputs75 ( )
private

Definition at line 564 of file mythprotomonitor.cpp.

◆ GetFreeInputs79()

CardInputListPtr ProtoMonitor::GetFreeInputs79 ( )
private

Definition at line 611 of file mythprotomonitor.cpp.

◆ GetFreeInputs81()

CardInputListPtr ProtoMonitor::GetFreeInputs81 ( )
private

Definition at line 666 of file mythprotomonitor.cpp.

◆ GetFreeInputs87()

CardInputListPtr ProtoMonitor::GetFreeInputs87 ( int rnum)
private

Definition at line 723 of file mythprotomonitor.cpp.

◆ GetFreeInputs89()

CardInputListPtr ProtoMonitor::GetFreeInputs89 ( int rnum)
private

Definition at line 770 of file mythprotomonitor.cpp.

◆ GetFreeInputs90()

CardInputListPtr ProtoMonitor::GetFreeInputs90 ( int rnum)
private

Definition at line 819 of file mythprotomonitor.cpp.

◆ GetFreeInputs91()

CardInputListPtr ProtoMonitor::GetFreeInputs91 ( int rnum)
private

Definition at line 869 of file mythprotomonitor.cpp.

◆ GetRecorderFromNum()

ProtoRecorderPtr Myth::ProtoMonitor::GetRecorderFromNum ( int rnum)
inline

Definition at line 45 of file mythprotomonitor.h.

◆ GetRecorderFromNum75()

ProtoRecorderPtr ProtoMonitor::GetRecorderFromNum75 ( int rnum)
private

Definition at line 124 of file mythprotomonitor.cpp.

◆ GetSetting()

std::string Myth::ProtoMonitor::GetSetting ( const std::string & hostname,
const std::string & setting )
inline

Definition at line 53 of file mythprotomonitor.h.

◆ GetSetting75()

std::string ProtoMonitor::GetSetting75 ( const std::string & hostname,
const std::string & setting )
private

Definition at line 181 of file mythprotomonitor.cpp.

◆ IsOpen()

bool ProtoMonitor::IsOpen ( )
virtual

Reimplemented from Myth::ProtoBase.

Definition at line 78 of file mythprotomonitor.cpp.

◆ Open()

bool ProtoMonitor::Open ( )
virtual

Implements Myth::ProtoBase.

Definition at line 51 of file mythprotomonitor.cpp.

◆ QueryFreeSpaceSummary()

bool Myth::ProtoMonitor::QueryFreeSpaceSummary ( int64_t * total,
int64_t * used )
inline

Definition at line 49 of file mythprotomonitor.h.

◆ QueryFreeSpaceSummary75()

bool ProtoMonitor::QueryFreeSpaceSummary75 ( int64_t * total,
int64_t * used )
private

Definition at line 157 of file mythprotomonitor.cpp.

◆ QueryGenpixmap()

bool Myth::ProtoMonitor::QueryGenpixmap ( const Program & program)
inline

Definition at line 61 of file mythprotomonitor.h.

◆ QueryGenpixmap75()

bool ProtoMonitor::QueryGenpixmap75 ( const Program & program)
private

Definition at line 228 of file mythprotomonitor.cpp.

◆ QuerySGFile()

StorageGroupFilePtr Myth::ProtoMonitor::QuerySGFile ( const std::string & hostname,
const std::string & sgname,
const std::string & filename )
inline

Definition at line 81 of file mythprotomonitor.h.

◆ QuerySGFile75()

StorageGroupFilePtr ProtoMonitor::QuerySGFile75 ( const std::string & hostname,
const std::string & sgname,
const std::string & filename )
private

Definition at line 366 of file mythprotomonitor.cpp.

◆ SetSetting()

bool Myth::ProtoMonitor::SetSetting ( const std::string & hostname,
const std::string & setting,
const std::string & value )
inline

Definition at line 57 of file mythprotomonitor.h.

◆ SetSetting75()

bool ProtoMonitor::SetSetting75 ( const std::string & hostname,
const std::string & setting,
const std::string & value )
private

Definition at line 205 of file mythprotomonitor.cpp.

◆ StopRecording()

bool Myth::ProtoMonitor::StopRecording ( const Program & program)
inline

Definition at line 73 of file mythprotomonitor.h.

◆ StopRecording75()

bool ProtoMonitor::StopRecording75 ( const Program & program)
private

Definition at line 313 of file mythprotomonitor.cpp.

◆ UndeleteRecording()

bool Myth::ProtoMonitor::UndeleteRecording ( const Program & program)
inline

Definition at line 69 of file mythprotomonitor.h.

◆ UndeleteRecording75()

bool ProtoMonitor::UndeleteRecording75 ( const Program & program)
private

Definition at line 288 of file mythprotomonitor.cpp.

Field Documentation

◆ m_frontend

bool Myth::ProtoMonitor::m_frontend
private

Definition at line 118 of file mythprotomonitor.h.


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