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 (QString filename, 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, 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

MythSocketsock
 
QString hostname
 
QString ip
 
bool local
 
PlaybackSockEventsMode m_eventsMode
 
bool blockshutdown
 
bool backend
 
bool mediaserver
 
bool m_frontend
 
QMutex sockLock
 
bool disconnected
 
MainServerm_parent
 

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
 

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 18 of file playbacksock.cpp.

◆ ~PlaybackSock()

PlaybackSock::~PlaybackSock ( )
protectedvirtual

Definition at line 43 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 49 of file playbacksock.cpp.

◆ wantsNonSystemEvents()

bool PlaybackSock::wantsNonSystemEvents ( void  ) const

Definition at line 54 of file playbacksock.cpp.

◆ wantsSystemEvents()

bool PlaybackSock::wantsSystemEvents ( void  ) const

Definition at line 60 of file playbacksock.cpp.

◆ wantsOnlySystemEvents()

bool PlaybackSock::wantsOnlySystemEvents ( void  ) const

Definition at line 66 of file playbacksock.cpp.

◆ eventsMode()

PlaybackSockEventsMode PlaybackSock::eventsMode ( void  ) const

Definition at line 71 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 140 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 150 of file playbacksock.cpp.

Referenced by EncoderLink::GetDiskSpace().

◆ DeleteFile()

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

Definition at line 171 of file playbacksock.cpp.

◆ StopRecording()

int PlaybackSock::StopRecording ( const ProgramInfo pginfo)

Definition at line 183 of file playbacksock.cpp.

Referenced by MainServer::DoHandleStopRecording().

◆ CheckRecordingActive()

int PlaybackSock::CheckRecordingActive ( const ProgramInfo pginfo)

Definition at line 160 of file playbacksock.cpp.

Referenced by MainServer::HandleCheckRecordingActive().

◆ DeleteRecording()

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

Definition at line 194 of file playbacksock.cpp.

Referenced by MainServer::DoHandleDeleteRecording().

◆ FillProgramInfo()

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

Definition at line 212 of file playbacksock.cpp.

Referenced by MainServer::HandleQueryRecordings().

◆ GetSGFileList()

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

Definition at line 232 of file playbacksock.cpp.

Referenced by MainServer::HandleSGGetFileList().

◆ GetSGFileQuery()

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

Definition at line 246 of file playbacksock.cpp.

Referenced by MainServer::HandleSGFileQuery().

◆ GetFileHash()

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

Definition at line 259 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 269 of file playbacksock.cpp.

Referenced by MainServer::HandleQueryFindFile().

◆ GenPreviewPixmap() [1/2]

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

Definition at line 283 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 295 of file playbacksock.cpp.

◆ PixmapLastModified()

QDateTime PlaybackSock::PixmapLastModified ( const ProgramInfo pginfo)

Definition at line 316 of file playbacksock.cpp.

Referenced by MainServer::HandlePixmapLastModified().

◆ CheckFile()

bool PlaybackSock::CheckFile ( ProgramInfo pginfo)

Definition at line 333 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 348 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 391 of file playbacksock.cpp.

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

◆ GetMaxBitrate()

long long PlaybackSock::GetMaxBitrate ( int  capturecardnum)

Definition at line 408 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 423 of file playbacksock.cpp.

Referenced by EncoderLink::GetRecording().

◆ EncoderIsRecording()

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

Definition at line 441 of file playbacksock.cpp.

Referenced by EncoderLink::MatchesRecording().

◆ StartRecording()

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

Definition at line 454 of file playbacksock.cpp.

Referenced by EncoderLink::StartRecording().

◆ GetRecordingStatus()

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

Definition at line 477 of file playbacksock.cpp.

Referenced by EncoderLink::GetRecordingStatus().

◆ RecordPending()

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

Definition at line 494 of file playbacksock.cpp.

Referenced by EncoderLink::RecordPending().

◆ SetSignalMonitoringRate()

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

Definition at line 506 of file playbacksock.cpp.

Referenced by EncoderLink::SetSignalMonitoringRate().

◆ SetNextLiveTVDir()

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

Definition at line 520 of file playbacksock.cpp.

Referenced by EncoderLink::SetNextLiveTVDir().

◆ CancelNextRecording()

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

Definition at line 529 of file playbacksock.cpp.

Referenced by EncoderLink::CancelNextRecording().

◆ ForwardRequest()

QStringList PlaybackSock::ForwardRequest ( const QStringList &  slist)

◆ ReadStringList()

bool PlaybackSock::ReadStringList ( QStringList &  list)

Definition at line 76 of file playbacksock.cpp.

◆ AddChildInput()

bool PlaybackSock::AddChildInput ( uint  childid)

Tells a slave to add a child input.

Definition at line 552 of file playbacksock.cpp.

Referenced by EncoderLink::AddChildInput().

◆ SendReceiveStringList()

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

Member Data Documentation

◆ sock

MythSocket* PlaybackSock::sock
private

Definition at line 118 of file playbacksock.h.

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

◆ hostname

QString PlaybackSock::hostname
private

Definition at line 119 of file playbacksock.h.

Referenced by PlaybackSock().

◆ ip

QString PlaybackSock::ip
private

Definition at line 120 of file playbacksock.h.

Referenced by PlaybackSock().

◆ local

bool PlaybackSock::local
private

Definition at line 122 of file playbacksock.h.

Referenced by PlaybackSock().

◆ m_eventsMode

PlaybackSockEventsMode PlaybackSock::m_eventsMode
private

◆ blockshutdown

bool PlaybackSock::blockshutdown
private

Definition at line 124 of file playbacksock.h.

Referenced by PlaybackSock().

◆ backend

bool PlaybackSock::backend
private

Definition at line 125 of file playbacksock.h.

Referenced by PlaybackSock().

◆ mediaserver

bool PlaybackSock::mediaserver
private

Definition at line 126 of file playbacksock.h.

Referenced by PlaybackSock().

◆ m_frontend

bool PlaybackSock::m_frontend
private

Definition at line 127 of file playbacksock.h.

Referenced by PlaybackSock().

◆ sockLock

QMutex PlaybackSock::sockLock
private

Definition at line 129 of file playbacksock.h.

Referenced by ReadStringList(), and SendReceiveStringList().

◆ disconnected

bool PlaybackSock::disconnected
private

Definition at line 131 of file playbacksock.h.

Referenced by PlaybackSock().

◆ m_parent

MainServer* PlaybackSock::m_parent
private

Definition at line 133 of file playbacksock.h.

Referenced by PlaybackSock().


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