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

Public Member Functions

 ProtoEvent (const std::string &server, unsigned port)
virtual bool Open ()
virtual void Close ()
int RcvBackendMessage (unsigned timeout, EventMessage **msg)
 Wait for new backend message from event connection.
Public Member Functions inherited from Myth::ProtoBase
 ProtoBase (const std::string &server, unsigned port)
virtual bool IsOpen ()
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 ()
SignalStatusPtr RcvSignalStatus ()

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 32 of file mythprotoevent.h.

Constructor & Destructor Documentation

◆ ProtoEvent()

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

Definition at line 56 of file mythprotoevent.cpp.

Member Function Documentation

◆ Announce75()

bool ProtoEvent::Announce75 ( )
private

Definition at line 84 of file mythprotoevent.cpp.

◆ Close()

void ProtoEvent::Close ( )
virtual

Reimplemented from Myth::ProtoBase.

Definition at line 77 of file mythprotoevent.cpp.

◆ Open()

bool ProtoEvent::Open ( )
virtual

Implements Myth::ProtoBase.

Definition at line 61 of file mythprotoevent.cpp.

◆ RcvBackendMessage()

int ProtoEvent::RcvBackendMessage ( unsigned timeout,
EventMessage ** msg )

Wait for new backend message from event connection.

Parameters
timeoutNumber of seconds
msgHandle MythEventMessage
Returns
success: 0 = No message, 1 = New message received
failure: -(errno)

Definition at line 131 of file mythprotoevent.cpp.

References Myth::ProtoBase::m_hang, and Myth::ProtoBase::ReadField().

◆ RcvSignalStatus()

SignalStatusPtr ProtoEvent::RcvSignalStatus ( )
private

Definition at line 103 of file mythprotoevent.cpp.


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