MythTV  master
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
PlaybackSock Class Reference

#include <playbacksock.h>

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

Public Member Functions

 PlaybackSock (MainServer *parent, MythSocket *lsock, QString lhostname, PlaybackSockEventsMode eventsMode)
 
void SetDisconnected (void)
 
bool IsDisconnected (void) const
 
MythSocketgetSocket (void) const
 
QString getHostname (void) const
 
bool isLocal (void) const
 
bool wantsEvents (void) const
 
bool wantsNonSystemEvents (void) const
 
bool wantsSystemEvents (void) const
 
bool wantsOnlySystemEvents (void) const
 
PlaybackSockEventsMode eventsMode (void) const
 
bool getBlockShutdown (void) const
 
void setBlockShutdown (bool value)
 
bool IsFrontend (void) const
 
void SetAsFrontend (void)
 
bool isSlaveBackend (void) const
 
void setAsSlaveBackend (void)
 
bool isMediaServer (void) const
 
void setAsMediaServer (void)
 
void setIP (QString &lip)
 
QString getIP (void) const
 
bool GoToSleep (void)
 Tells a slave to go to sleep. More...
 
void GetDiskSpace (QStringList &o_strlist)
 Appends host's dir's total and used space in kilobytes. More...
 
int DeleteFile (const QString &filename, const QString &sgroup)
 
int StopRecording (const ProgramInfo *pginfo)
 
int CheckRecordingActive (const ProgramInfo *pginfo)
 
int DeleteRecording (const ProgramInfo *pginfo, bool forceMetadataDelete=false)
 
bool FillProgramInfo (ProgramInfo &pginfo, const QString &playbackhost)
 
QStringList GetSGFileList (QString &host, QString &groupname, QString &directory, bool fileNamesOnly)
 
QStringList GetSGFileQuery (QString &host, QString &groupname, QString &filename)
 
QString GetFileHash (const QString &filename, const QString &storageGroup)
 
QStringList GetFindFile (const QString &host, const QString &filename, const QString &storageGroup, bool useRegex)
 
QStringList GenPreviewPixmap (const QString &token, const ProgramInfo *pginfo)
 
QStringList GenPreviewPixmap (const QString &token, const ProgramInfo *pginfo, bool time_fmt_sec, long long time, const QString &outputFile, const QSize &outputSize)
 
QDateTime PixmapLastModified (const ProgramInfo *pginfo)
 
bool CheckFile (ProgramInfo *pginfo)
 
bool IsBusy (int capturecardnum, InputInfo *busy_input=nullptr, int time_buffer=5)
 
int GetEncoderState (int capturecardnum)
 Returns the maximum bits per second the recorder can produce. More...
 
long long GetMaxBitrate (int capturecardnum)
 
ProgramInfoGetRecording (uint cardid)
 Returns the ProgramInfo being used by any current recording. More...
 
bool EncoderIsRecording (int capturecardnum, const ProgramInfo *pginfo)
 
RecStatus::Type StartRecording (int capturecardnum, ProgramInfo *pginfo)
 
RecStatus::Type GetRecordingStatus (int capturecardnum)
 
void RecordPending (int capturecardnum, const ProgramInfo *pginfo, int secsleft, bool hasLater)
 
int SetSignalMonitoringRate (int capturecardnum, int rate, int notifyFrontend)
 
void SetNextLiveTVDir (int capturecardnum, const QString &dir)
 
void CancelNextRecording (int capturecardnum, bool cancel)
 
QStringList ForwardRequest (const QStringList &)
 
bool ReadStringList (QStringList &list)
 
bool AddChildInput (uint childid)
 Tells a slave to add a child input. More...
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter (const QString &debugName, bool logDebug=true)
 Creates reference counter with an initial value of 1. More...
 
virtual int IncrRef (void)
 Increments reference count. More...
 
virtual int DecrRef (void)
 Decrements reference count and deletes on 0. More...
 

Protected Member Functions

virtual ~PlaybackSock ()
 
- Protected Member Functions inherited from ReferenceCounter
virtual ~ReferenceCounter (void)
 Called on destruction, will warn if object deleted with references in place. More...
 

Private Member Functions

bool SendReceiveStringList (QStringList &strlist, uint min_reply_length=0)
 

Private Attributes

MythSocketm_sock {nullptr}
 
QString m_hostname
 
QString m_ip
 
bool m_local {true}
 
PlaybackSockEventsMode m_eventsMode
 
bool m_blockshutdown {true}
 
bool m_backend {false}
 
bool m_mediaserver {false}
 
bool m_frontend {false}
 
QMutex m_sockLock
 
bool m_disconnected {false}
 
MainServerm_parent {nullptr}
 

Additional Inherited Members

- Static Public Member Functions inherited from ReferenceCounter
static void PrintDebug (void)
 Print out any leaks if that level of debugging is enabled. More...
 
- Protected Attributes inherited from ReferenceCounter
bool m_logDebug
 This is used to suppress creating LoggingItem classes for LoggingItem reference count changes. More...
 
QAtomicInt m_referenceCount {1}
 

Detailed Description

Definition at line 28 of file playbacksock.h.

Constructor & Destructor Documentation

◆ PlaybackSock()

PlaybackSock::PlaybackSock ( MainServer parent,
MythSocket lsock,
QString  lhostname,
PlaybackSockEventsMode  eventsMode 
)

Definition at line 19 of file playbacksock.cpp.

◆ ~PlaybackSock()

PlaybackSock::~PlaybackSock ( )
protectedvirtual

Definition at line 35 of file playbacksock.cpp.

Member Function Documentation

◆ SetDisconnected()

void PlaybackSock::SetDisconnected ( void  )
inline

Definition at line 34 of file playbacksock.h.

◆ IsDisconnected()

bool PlaybackSock::IsDisconnected ( void  ) const
inline

Definition at line 35 of file playbacksock.h.

◆ getSocket()

MythSocket* PlaybackSock::getSocket ( void  ) const
inline

Definition at line 37 of file playbacksock.h.

Referenced by RenameThread::run().

◆ getHostname()

QString PlaybackSock::getHostname ( void  ) const
inline

Definition at line 38 of file playbacksock.h.

◆ isLocal()

bool PlaybackSock::isLocal ( void  ) const
inline

Definition at line 40 of file playbacksock.h.

◆ wantsEvents()

bool PlaybackSock::wantsEvents ( void  ) const

Definition at line 41 of file playbacksock.cpp.

◆ wantsNonSystemEvents()

bool PlaybackSock::wantsNonSystemEvents ( void  ) const

Definition at line 46 of file playbacksock.cpp.

◆ wantsSystemEvents()

bool PlaybackSock::wantsSystemEvents ( void  ) const

Definition at line 52 of file playbacksock.cpp.

◆ wantsOnlySystemEvents()

bool PlaybackSock::wantsOnlySystemEvents ( void  ) const

Definition at line 58 of file playbacksock.cpp.

◆ eventsMode()

PlaybackSockEventsMode PlaybackSock::eventsMode ( void  ) const

Definition at line 63 of file playbacksock.cpp.

Referenced by PlaybackSock().

◆ getBlockShutdown()

bool PlaybackSock::getBlockShutdown ( void  ) const
inline

Definition at line 47 of file playbacksock.h.

◆ setBlockShutdown()

void PlaybackSock::setBlockShutdown ( bool  value)
inline

Definition at line 48 of file playbacksock.h.

◆ IsFrontend()

bool PlaybackSock::IsFrontend ( void  ) const
inline

Definition at line 50 of file playbacksock.h.

◆ SetAsFrontend()

void PlaybackSock::SetAsFrontend ( void  )
inline

Definition at line 51 of file playbacksock.h.

◆ isSlaveBackend()

bool PlaybackSock::isSlaveBackend ( void  ) const
inline

Definition at line 54 of file playbacksock.h.

◆ setAsSlaveBackend()

void PlaybackSock::setAsSlaveBackend ( void  )
inline

Definition at line 55 of file playbacksock.h.

◆ isMediaServer()

bool PlaybackSock::isMediaServer ( void  ) const
inline

Definition at line 57 of file playbacksock.h.

◆ setAsMediaServer()

void PlaybackSock::setAsMediaServer ( void  )
inline

Definition at line 58 of file playbacksock.h.

◆ setIP()

void PlaybackSock::setIP ( QString &  lip)
inline

Definition at line 60 of file playbacksock.h.

◆ getIP()

QString PlaybackSock::getIP ( void  ) const
inline

Definition at line 61 of file playbacksock.h.

◆ GoToSleep()

bool PlaybackSock::GoToSleep ( void  )

Tells a slave to go to sleep.

Definition at line 132 of file playbacksock.cpp.

Referenced by EncoderLink::GoToSleep().

◆ GetDiskSpace()

void PlaybackSock::GetDiskSpace ( QStringList &  o_strlist)

Appends host's dir's total and used space in kilobytes.

Definition at line 142 of file playbacksock.cpp.

Referenced by EncoderLink::GetDiskSpace().

◆ DeleteFile()

int PlaybackSock::DeleteFile ( const QString &  filename,
const QString &  sgroup 
)

Definition at line 163 of file playbacksock.cpp.

◆ StopRecording()

int PlaybackSock::StopRecording ( const ProgramInfo pginfo)

Definition at line 175 of file playbacksock.cpp.

Referenced by MainServer::DoHandleStopRecording().

◆ CheckRecordingActive()

int PlaybackSock::CheckRecordingActive ( const ProgramInfo pginfo)

Definition at line 152 of file playbacksock.cpp.

Referenced by MainServer::HandleCheckRecordingActive().

◆ DeleteRecording()

int PlaybackSock::DeleteRecording ( const ProgramInfo pginfo,
bool  forceMetadataDelete = false 
)

Definition at line 186 of file playbacksock.cpp.

Referenced by MainServer::DoHandleDeleteRecording().

◆ FillProgramInfo()

bool PlaybackSock::FillProgramInfo ( ProgramInfo pginfo,
const QString &  playbackhost 
)

Definition at line 204 of file playbacksock.cpp.

Referenced by MainServer::HandleQueryRecordings().

◆ GetSGFileList()

QStringList PlaybackSock::GetSGFileList ( QString &  host,
QString &  groupname,
QString &  directory,
bool  fileNamesOnly 
)

Definition at line 224 of file playbacksock.cpp.

Referenced by MainServer::HandleSGGetFileList().

◆ GetSGFileQuery()

QStringList PlaybackSock::GetSGFileQuery ( QString &  host,
QString &  groupname,
QString &  filename 
)

Definition at line 238 of file playbacksock.cpp.

Referenced by MainServer::HandleSGFileQuery().

◆ GetFileHash()

QString PlaybackSock::GetFileHash ( const QString &  filename,
const QString &  storageGroup 
)

Definition at line 251 of file playbacksock.cpp.

Referenced by MainServer::HandleQueryFileHash().

◆ GetFindFile()

QStringList PlaybackSock::GetFindFile ( const QString &  host,
const QString &  filename,
const QString &  storageGroup,
bool  useRegex 
)

Definition at line 261 of file playbacksock.cpp.

Referenced by MainServer::HandleQueryFindFile().

◆ GenPreviewPixmap() [1/2]

QStringList PlaybackSock::GenPreviewPixmap ( const QString &  token,
const ProgramInfo pginfo 
)

Definition at line 275 of file playbacksock.cpp.

Referenced by MainServer::HandleGenPreviewPixmap().

◆ GenPreviewPixmap() [2/2]

QStringList PlaybackSock::GenPreviewPixmap ( const QString &  token,
const ProgramInfo pginfo,
bool  time_fmt_sec,
long long  time,
const QString &  outputFile,
const QSize &  outputSize 
)

Definition at line 287 of file playbacksock.cpp.

◆ PixmapLastModified()

QDateTime PlaybackSock::PixmapLastModified ( const ProgramInfo pginfo)

Definition at line 308 of file playbacksock.cpp.

Referenced by MainServer::HandlePixmapLastModified().

◆ CheckFile()

bool PlaybackSock::CheckFile ( ProgramInfo pginfo)

Definition at line 325 of file playbacksock.cpp.

Referenced by EncoderLink::CheckFile(), and MainServer::HandleQueryCheckFile().

◆ IsBusy()

bool PlaybackSock::IsBusy ( int  capturecardnum,
InputInfo busy_input = nullptr,
int  time_buffer = 5 
)

Definition at line 340 of file playbacksock.cpp.

Referenced by EncoderLink::IsBusy().

◆ GetEncoderState()

int PlaybackSock::GetEncoderState ( int  capturecardnum)

Returns the maximum bits per second the recorder can produce.

Parameters
capturecardnumRecorder ID in the database.

Definition at line 383 of file playbacksock.cpp.

Referenced by EncoderLink::GetFlags(), and EncoderLink::GetState().

◆ GetMaxBitrate()

long long PlaybackSock::GetMaxBitrate ( int  capturecardnum)

Definition at line 400 of file playbacksock.cpp.

Referenced by EncoderLink::GetMaxBitrate().

◆ GetRecording()

ProgramInfo * PlaybackSock::GetRecording ( uint  cardid)

Returns the ProgramInfo being used by any current recording.

Caller is responsible for deleting the ProgramInfo when done with it.

Definition at line 415 of file playbacksock.cpp.

Referenced by EncoderLink::GetRecording().

◆ EncoderIsRecording()

bool PlaybackSock::EncoderIsRecording ( int  capturecardnum,
const ProgramInfo pginfo 
)

Definition at line 433 of file playbacksock.cpp.

Referenced by EncoderLink::MatchesRecording().

◆ StartRecording()

RecStatus::Type PlaybackSock::StartRecording ( int  capturecardnum,
ProgramInfo pginfo 
)

Definition at line 446 of file playbacksock.cpp.

Referenced by EncoderLink::StartRecording().

◆ GetRecordingStatus()

RecStatus::Type PlaybackSock::GetRecordingStatus ( int  capturecardnum)

Definition at line 469 of file playbacksock.cpp.

Referenced by EncoderLink::GetRecordingStatus().

◆ RecordPending()

void PlaybackSock::RecordPending ( int  capturecardnum,
const ProgramInfo pginfo,
int  secsleft,
bool  hasLater 
)

Definition at line 486 of file playbacksock.cpp.

Referenced by EncoderLink::RecordPending().

◆ SetSignalMonitoringRate()

int PlaybackSock::SetSignalMonitoringRate ( int  capturecardnum,
int  rate,
int  notifyFrontend 
)

Definition at line 498 of file playbacksock.cpp.

Referenced by EncoderLink::SetSignalMonitoringRate().

◆ SetNextLiveTVDir()

void PlaybackSock::SetNextLiveTVDir ( int  capturecardnum,
const QString &  dir 
)

Definition at line 512 of file playbacksock.cpp.

Referenced by EncoderLink::SetNextLiveTVDir().

◆ CancelNextRecording()

void PlaybackSock::CancelNextRecording ( int  capturecardnum,
bool  cancel 
)

Definition at line 521 of file playbacksock.cpp.

Referenced by EncoderLink::CancelNextRecording().

◆ ForwardRequest()

QStringList PlaybackSock::ForwardRequest ( const QStringList &  slist)

◆ ReadStringList()

bool PlaybackSock::ReadStringList ( QStringList &  list)

Definition at line 68 of file playbacksock.cpp.

◆ AddChildInput()

bool PlaybackSock::AddChildInput ( uint  childid)

Tells a slave to add a child input.

Definition at line 544 of file playbacksock.cpp.

Referenced by EncoderLink::AddChildInput().

◆ SendReceiveStringList()

bool PlaybackSock::SendReceiveStringList ( QStringList &  strlist,
uint  min_reply_length = 0 
)
private

Member Data Documentation

◆ m_sock

MythSocket* PlaybackSock::m_sock {nullptr}
private

Definition at line 118 of file playbacksock.h.

Referenced by PlaybackSock(), ReadStringList(), SendReceiveStringList(), and ~PlaybackSock().

◆ m_hostname

QString PlaybackSock::m_hostname
private

Definition at line 119 of file playbacksock.h.

Referenced by PlaybackSock().

◆ m_ip

QString PlaybackSock::m_ip
private

Definition at line 120 of file playbacksock.h.

Referenced by PlaybackSock().

◆ m_local

bool PlaybackSock::m_local {true}
private

Definition at line 122 of file playbacksock.h.

Referenced by PlaybackSock().

◆ m_eventsMode

PlaybackSockEventsMode PlaybackSock::m_eventsMode
private

◆ m_blockshutdown

bool PlaybackSock::m_blockshutdown {true}
private

Definition at line 124 of file playbacksock.h.

◆ m_backend

bool PlaybackSock::m_backend {false}
private

Definition at line 125 of file playbacksock.h.

◆ m_mediaserver

bool PlaybackSock::m_mediaserver {false}
private

Definition at line 126 of file playbacksock.h.

◆ m_frontend

bool PlaybackSock::m_frontend {false}
private

Definition at line 127 of file playbacksock.h.

◆ m_sockLock

QMutex PlaybackSock::m_sockLock
private

Definition at line 129 of file playbacksock.h.

Referenced by ReadStringList(), and SendReceiveStringList().

◆ m_disconnected

bool PlaybackSock::m_disconnected {false}
private

Definition at line 131 of file playbacksock.h.

◆ m_parent

MainServer* PlaybackSock::m_parent {nullptr}
private

Definition at line 133 of file playbacksock.h.

Referenced by PlaybackSock().


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