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

Public Member Functions

 FilePlayback (const std::string &server, unsigned port)
bool Open ()
void Close ()
bool IsOpen ()
bool OpenTransfer (const std::string &pathname, const std::string &sgname)
void CloseTransfer ()
bool TransferIsOpen ()
int64_t GetSize () const
int Read (void *buffer, unsigned n)
int64_t Seek (int64_t offset, WHENCE_t whence)
int64_t GetPosition () const

Private Attributes

ProtoTransferPtr m_transfer
Private 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

Additional Inherited Members

Private Types inherited from Myth::ProtoBase
enum  ERROR_t { ERROR_NO_ERROR = 0 , ERROR_SERVER_UNREACHABLE , ERROR_SOCKET_ERROR , ERROR_UNKNOWN_VERSION }
Private Member Functions inherited from Myth::ProtoPlayback
 ProtoPlayback (const std::string &server, unsigned port)
void TransferDone (ProtoTransfer &transfer)
bool TransferIsOpen (ProtoTransfer &transfer)
int TransferRequestBlock (ProtoTransfer &transfer, void *buffer, unsigned n)
int64_t TransferSeek (ProtoTransfer &transfer, int64_t offset, WHENCE_t whence)
Private 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
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)

Detailed Description

Definition at line 32 of file mythfileplayback.h.

Constructor & Destructor Documentation

◆ FilePlayback()

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

Definition at line 38 of file mythfileplayback.cpp.

◆ ~FilePlayback()

FilePlayback::~FilePlayback ( )

Definition at line 45 of file mythfileplayback.cpp.

Member Function Documentation

◆ Close()

void FilePlayback::Close ( )
virtual

Reimplemented from Myth::ProtoPlayback.

Definition at line 59 of file mythfileplayback.cpp.

◆ CloseTransfer()

void FilePlayback::CloseTransfer ( )

Definition at line 80 of file mythfileplayback.cpp.

◆ GetPosition()

int64_t FilePlayback::GetPosition ( ) const
virtual

Implements Myth::Stream.

Definition at line 143 of file mythfileplayback.cpp.

◆ GetSize()

int64_t FilePlayback::GetSize ( ) const
virtual

Implements Myth::Stream.

Definition at line 102 of file mythfileplayback.cpp.

◆ IsOpen()

bool Myth::FilePlayback::IsOpen ( )
inlinevirtual

Reimplemented from Myth::ProtoPlayback.

Definition at line 40 of file mythfileplayback.h.

◆ Open()

bool FilePlayback::Open ( )
virtual

Reimplemented from Myth::ProtoPlayback.

Definition at line 50 of file mythfileplayback.cpp.

◆ OpenTransfer()

bool FilePlayback::OpenTransfer ( const std::string & pathname,
const std::string & sgname )

Definition at line 67 of file mythfileplayback.cpp.

◆ Read()

int FilePlayback::Read ( void * buffer,
unsigned n )
virtual

Implements Myth::Stream.

Definition at line 112 of file mythfileplayback.cpp.

◆ Seek()

int64_t FilePlayback::Seek ( int64_t offset,
WHENCE_t whence )
virtual

Implements Myth::Stream.

Definition at line 133 of file mythfileplayback.cpp.

◆ TransferIsOpen()

bool FilePlayback::TransferIsOpen ( )

Definition at line 92 of file mythfileplayback.cpp.

Field Documentation

◆ m_transfer

ProtoTransferPtr Myth::FilePlayback::m_transfer
private

Definition at line 52 of file mythfileplayback.h.


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