PlaybackSock Class Reference

#include <playbacksock.h>

List of all members.


Detailed Description

Definition at line 26 of file playbacksock.h.


Public Member Functions

 PlaybackSock (MainServer *parent, MythSocket *lsock, QString lhostname, PlaybackSockEventsMode eventsMode)
virtual ~PlaybackSock ()
void UpRef (void)
bool DownRef (void)
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 isSlaveBackend (void) const
void setAsSlaveBackend (void)
bool isExpectingReply (void) const
void setIP (QString &lip)
QString getIP (void) const
bool GoToSleep (void)
 Tells a slave to go to sleep.
void GetDiskSpace (QStringList &o_strlist)
 Appends host's dir's total and used space in kilobytes.
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)
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=NULL, int time_buffer=5)
int GetEncoderState (int capturecardnum)
 Returns the maximum bits per second the recorder can produce.
long long GetMaxBitrate (int capturecardnum)
ProgramInfoGetRecording (uint cardid)
 Returns the ProgramInfo being used by any current recording.
bool EncoderIsRecording (int capturecardnum, const ProgramInfo *pginfo)
RecStatusType StartRecording (int capturecardnum, const ProgramInfo *pginfo)
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)
vector< InputInfoGetFreeInputs (int capturecardnum, const vector< uint > &excluded_cardids)
void CancelNextRecording (int capturecardnum, bool cancel)
QStringList ForwardRequest (const QStringList &)

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
QMutex refLock
QMutex sockLock
bool expectingreply
bool disconnected
int refCount
MainServerm_parent

Constructor & Destructor Documentation

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

Definition at line 17 of file playbacksock.cpp.

PlaybackSock::~PlaybackSock (  )  [virtual]

Definition at line 41 of file playbacksock.cpp.


Member Function Documentation

void PlaybackSock::UpRef ( void   ) 

bool PlaybackSock::DownRef ( void   ) 

void PlaybackSock::SetDisconnected ( void   )  [inline]

Definition at line 36 of file playbacksock.h.

Referenced by MainServer::connectionClosed().

bool PlaybackSock::IsDisconnected ( void   )  const [inline]

Definition at line 37 of file playbacksock.h.

Referenced by MainServer::BackendQueryDiskSpace(), and MainServer::customEvent().

MythSocket* PlaybackSock::getSocket ( void   )  const [inline]

Definition at line 39 of file playbacksock.h.

Referenced by MainServer::connectionClosed(), MainServer::customEvent(), MainServer::DoHandleDeleteRecording(), MainServer::DoHandleStopRecording(), MainServer::DoHandleUndeleteRecording(), MainServer::HandleAnnounce(), MainServer::HandleBlockShutdown(), MainServer::HandleBookmarkQuery(), MainServer::HandleCheckRecordingActive(), MainServer::HandleCutMapQuery(), MainServer::HandleDeleteFile(), MainServer::HandleDeleteRecording(), MainServer::HandleDownloadFile(), MainServer::HandleFileTransferQuery(), MainServer::HandleFillProgramInfo(), MainServer::HandleForgetRecording(), MainServer::HandleFreeTuner(), MainServer::HandleGenPreviewPixmap(), MainServer::HandleGetConflictingRecordings(), MainServer::HandleGetExpiringRecordings(), MainServer::HandleGetFreeRecorder(), MainServer::HandleGetFreeRecorderCount(), MainServer::HandleGetFreeRecorderList(), MainServer::HandleGetNextFreeRecorder(), MainServer::HandleGetPendingRecordings(), MainServer::HandleGetRecorderFromNum(), MainServer::HandleGetRecorderNum(), MainServer::HandleGetScheduledRecordings(), MainServer::HandleGoToSleep(), MainServer::HandleIsActiveBackendQuery(), MainServer::HandleIsRecording(), MainServer::HandleLockTuner(), MainServer::HandleMessage(), MainServer::HandlePixmapGetIfModified(), MainServer::HandlePixmapLastModified(), MainServer::HandleQueryCheckFile(), MainServer::HandleQueryFileExists(), MainServer::HandleQueryFileHash(), MainServer::HandleQueryFreeSpace(), MainServer::HandleQueryFreeSpaceSummary(), MainServer::HandleQueryGuideDataThrough(), MainServer::HandleQueryHostname(), MainServer::HandleQueryLoad(), MainServer::HandleQueryMemStats(), MainServer::HandleQueryRecording(), MainServer::HandleQueryRecordings(), MainServer::HandleQueryTimeZone(), MainServer::HandleQueryUptime(), MainServer::HandleRecorderQuery(), MainServer::HandleRemoteEncoder(), MainServer::HandleRescheduleRecordings(), MainServer::HandleSetBookmark(), MainServer::HandleSetChannelInfo(), MainServer::HandleSetNextLiveTVDir(), MainServer::HandleSetSetting(), MainServer::HandleSettingQuery(), MainServer::HandleSetVerbose(), MainServer::HandleSGFileQuery(), MainServer::HandleSGGetFileList(), and MainServer::ProcessRequestWork().

QString PlaybackSock::getHostname ( void   )  const [inline]

bool PlaybackSock::isLocal ( void   )  const [inline]

Definition at line 42 of file playbacksock.h.

Referenced by MainServer::BackendQueryDiskSpace().

bool PlaybackSock::wantsEvents ( void   )  const

Definition at line 65 of file playbacksock.cpp.

Referenced by MainServer::customEvent().

bool PlaybackSock::wantsNonSystemEvents ( void   )  const

Definition at line 70 of file playbacksock.cpp.

bool PlaybackSock::wantsSystemEvents ( void   )  const

Definition at line 76 of file playbacksock.cpp.

Referenced by MainServer::customEvent().

bool PlaybackSock::wantsOnlySystemEvents ( void   )  const

Definition at line 82 of file playbacksock.cpp.

Referenced by MainServer::customEvent().

PlaybackSockEventsMode PlaybackSock::eventsMode ( void   )  const

Definition at line 87 of file playbacksock.cpp.

bool PlaybackSock::getBlockShutdown ( void   )  const [inline]

Definition at line 49 of file playbacksock.h.

void PlaybackSock::setBlockShutdown ( bool  value  )  [inline]

Definition at line 50 of file playbacksock.h.

Referenced by MainServer::HandleAnnounce(), and MainServer::HandleBlockShutdown().

bool PlaybackSock::isSlaveBackend ( void   )  const [inline]

void PlaybackSock::setAsSlaveBackend ( void   )  [inline]

Definition at line 54 of file playbacksock.h.

Referenced by MainServer::HandleAnnounce().

bool PlaybackSock::isExpectingReply ( void   )  const [inline]

Definition at line 56 of file playbacksock.h.

Referenced by MainServer::readyRead().

void PlaybackSock::setIP ( QString &  lip  )  [inline]

Definition at line 58 of file playbacksock.h.

Referenced by MainServer::HandleAnnounce().

QString PlaybackSock::getIP ( void   )  const [inline]

Definition at line 59 of file playbacksock.h.

Referenced by MainServer::GetSlaveByHostname().

bool PlaybackSock::GoToSleep ( void   ) 

Tells a slave to go to sleep.

Definition at line 147 of file playbacksock.cpp.

Referenced by EncoderLink::GoToSleep().

void PlaybackSock::GetDiskSpace ( QStringList &  o_strlist  ) 

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

Definition at line 157 of file playbacksock.cpp.

Referenced by MainServer::BackendQueryDiskSpace(), and EncoderLink::GetDiskSpace().

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

Definition at line 178 of file playbacksock.cpp.

int PlaybackSock::StopRecording ( const ProgramInfo pginfo  ) 

Definition at line 190 of file playbacksock.cpp.

Referenced by MainServer::DoHandleStopRecording().

int PlaybackSock::CheckRecordingActive ( const ProgramInfo pginfo  ) 

Definition at line 167 of file playbacksock.cpp.

Referenced by MainServer::HandleCheckRecordingActive().

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

Definition at line 201 of file playbacksock.cpp.

Referenced by MainServer::DoHandleDeleteRecording().

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

Definition at line 218 of file playbacksock.cpp.

Referenced by MainServer::HandleQueryRecordings().

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

Definition at line 238 of file playbacksock.cpp.

Referenced by MainServer::HandleSGGetFileList().

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

Definition at line 252 of file playbacksock.cpp.

Referenced by MainServer::HandleSGFileQuery().

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

Definition at line 265 of file playbacksock.cpp.

Referenced by MainServer::HandleGenPreviewPixmap().

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

QDateTime PlaybackSock::PixmapLastModified ( const ProgramInfo pginfo  ) 

Definition at line 298 of file playbacksock.cpp.

Referenced by MainServer::HandlePixmapLastModified().

bool PlaybackSock::CheckFile ( ProgramInfo pginfo  ) 

Definition at line 314 of file playbacksock.cpp.

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

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

Definition at line 329 of file playbacksock.cpp.

Referenced by EncoderLink::IsBusy().

int PlaybackSock::GetEncoderState ( int  capturecardnum  ) 

Returns the maximum bits per second the recorder can produce.

Parameters:
capturecardnum Recorder ID in the database.

Definition at line 371 of file playbacksock.cpp.

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

long long PlaybackSock::GetMaxBitrate ( int  capturecardnum  ) 

Definition at line 388 of file playbacksock.cpp.

Referenced by EncoderLink::GetMaxBitrate().

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

Referenced by EncoderLink::GetRecording().

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

Definition at line 421 of file playbacksock.cpp.

Referenced by EncoderLink::MatchesRecording().

RecStatusType PlaybackSock::StartRecording ( int  capturecardnum,
const ProgramInfo pginfo 
)

Definition at line 433 of file playbacksock.cpp.

Referenced by EncoderLink::StartRecording().

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

Definition at line 446 of file playbacksock.cpp.

Referenced by EncoderLink::RecordPending().

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

Definition at line 458 of file playbacksock.cpp.

Referenced by EncoderLink::SetSignalMonitoringRate().

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

Definition at line 472 of file playbacksock.cpp.

Referenced by EncoderLink::SetNextLiveTVDir().

vector< InputInfo > PlaybackSock::GetFreeInputs ( int  capturecardnum,
const vector< uint > &  excluded_cardids 
)

Definition at line 481 of file playbacksock.cpp.

Referenced by EncoderLink::GetFreeInputs().

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

Definition at line 509 of file playbacksock.cpp.

Referenced by EncoderLink::CancelNextRecording().

QStringList PlaybackSock::ForwardRequest ( const QStringList &  slist  ) 

Definition at line 520 of file playbacksock.cpp.

Referenced by MainServer::HandlePixmapGetIfModified().

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


Member Data Documentation

Definition at line 106 of file playbacksock.h.

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

QString PlaybackSock::hostname [private]

Definition at line 107 of file playbacksock.h.

Referenced by getHostname(), and PlaybackSock().

QString PlaybackSock::ip [private]

Definition at line 108 of file playbacksock.h.

Referenced by getIP(), PlaybackSock(), and setIP().

Definition at line 110 of file playbacksock.h.

Referenced by isLocal(), and PlaybackSock().

Definition at line 112 of file playbacksock.h.

Referenced by getBlockShutdown(), PlaybackSock(), and setBlockShutdown().

Definition at line 113 of file playbacksock.h.

Referenced by isSlaveBackend(), PlaybackSock(), and setAsSlaveBackend().

QMutex PlaybackSock::refLock [private]

Definition at line 115 of file playbacksock.h.

Referenced by DownRef(), and UpRef().

QMutex PlaybackSock::sockLock [private]

Definition at line 116 of file playbacksock.h.

Referenced by SendReceiveStringList().

Definition at line 118 of file playbacksock.h.

Referenced by isExpectingReply(), PlaybackSock(), and SendReceiveStringList().

Definition at line 119 of file playbacksock.h.

Referenced by IsDisconnected(), PlaybackSock(), and SetDisconnected().

int PlaybackSock::refCount [private]

Definition at line 121 of file playbacksock.h.

Referenced by DownRef(), PlaybackSock(), and UpRef().

Definition at line 123 of file playbacksock.h.

Referenced by DownRef(), and PlaybackSock().


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

Generated on Thu Sep 9 06:39:48 2010 for MythTV by  doxygen 1.5.5