#include <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 |
| MythSocket * | getSocket (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) |
| QString | GetFileHash (QString filename, QString storageGroup) |
| 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) |
| ProgramInfo * | GetRecording (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) |
| RecStatusType | 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) |
| vector< InputInfo > | GetFreeInputs (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 | |
| MythSocket * | sock |
| QString | hostname |
| QString | ip |
| bool | local |
| PlaybackSockEventsMode | m_eventsMode |
| bool | blockshutdown |
| bool | backend |
| QMutex | refLock |
| QMutex | sockLock |
| bool | expectingreply |
| bool | disconnected |
| int | refCount |
| MainServer * | m_parent |
Definition at line 26 of file playbacksock.h.
| 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.
| void PlaybackSock::UpRef | ( | void | ) |
Definition at line 46 of file playbacksock.cpp.
Referenced by MainServer::BackendQueryDiskSpace(), EncoderLink::EncoderLink(), MainServer::GetSlaveByHostname(), MainServer::ProcessRequestWork(), and EncoderLink::SetSocket().
| bool PlaybackSock::DownRef | ( | void | ) |
Definition at line 52 of file playbacksock.cpp.
Referenced by MainServer::connectionClosed(), MainServer::customEvent(), MainServer::DoHandleDeleteRecording(), MainServer::DoHandleStopRecording(), MainServer::HandleCheckRecordingActive(), MainServer::HandleGenPreviewPixmap(), MainServer::HandleIsActiveBackendQuery(), MainServer::HandlePixmapGetIfModified(), MainServer::HandlePixmapLastModified(), MainServer::HandleQueryCheckFile(), MainServer::HandleQueryFileHash(), MainServer::HandleQueryRecordings(), MainServer::HandleSGFileQuery(), MainServer::HandleSGGetFileList(), MainServer::ProcessRequestWork(), and EncoderLink::SetSocket().
| 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::HandleActiveBackendsQuery(), 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::HandleScanVideos(), MainServer::HandleSetBookmark(), MainServer::HandleSetChannelInfo(), MainServer::HandleSetLogLevel(), MainServer::HandleSetNextLiveTVDir(), MainServer::HandleSetSetting(), MainServer::HandleSettingQuery(), MainServer::HandleSetVerbose(), MainServer::HandleSGFileQuery(), MainServer::HandleSGGetFileList(), and MainServer::ProcessRequestWork().
| QString PlaybackSock::getHostname | ( | void | ) | const [inline] |
Definition at line 40 of file playbacksock.h.
Referenced by MainServer::BackendQueryDiskSpace(), MainServer::connectionClosed(), MainServer::customEvent(), MainServer::GetSlaveByHostname(), MainServer::HandleFreeTuner(), MainServer::HandleGenPreviewPixmap(), MainServer::HandleGetFreeRecorder(), MainServer::HandleGetNextFreeRecorder(), MainServer::HandleLockTuner(), and MainServer::HandleQueryRecordings().
| 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] |
Definition at line 53 of file playbacksock.h.
Referenced by MainServer::BackendQueryDiskSpace(), MainServer::connectionClosed(), MainServer::customEvent(), and MainServer::GetSlaveByHostname().
| 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 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 219 of file playbacksock.cpp.
Referenced by MainServer::HandleQueryRecordings().
| QStringList PlaybackSock::GetSGFileList | ( | QString & | host, | |
| QString & | groupname, | |||
| QString & | directory, | |||
| bool | fileNamesOnly | |||
| ) |
Definition at line 239 of file playbacksock.cpp.
Referenced by MainServer::HandleSGGetFileList().
| QStringList PlaybackSock::GetSGFileQuery | ( | QString & | host, | |
| QString & | groupname, | |||
| QString & | filename | |||
| ) |
Definition at line 253 of file playbacksock.cpp.
Referenced by MainServer::HandleSGFileQuery().
| QString PlaybackSock::GetFileHash | ( | QString | filename, | |
| QString | storageGroup | |||
| ) |
Definition at line 266 of file playbacksock.cpp.
Referenced by MainServer::HandleQueryFileHash().
| QStringList PlaybackSock::GenPreviewPixmap | ( | const QString & | token, | |
| const ProgramInfo * | pginfo | |||
| ) |
Definition at line 276 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 288 of file playbacksock.cpp.
| QDateTime PlaybackSock::PixmapLastModified | ( | const ProgramInfo * | pginfo | ) |
Definition at line 309 of file playbacksock.cpp.
Referenced by MainServer::HandlePixmapLastModified().
| bool PlaybackSock::CheckFile | ( | ProgramInfo * | pginfo | ) |
Definition at line 325 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 340 of file playbacksock.cpp.
Referenced by EncoderLink::IsBusy().
| int PlaybackSock::GetEncoderState | ( | int | capturecardnum | ) |
Returns the maximum bits per second the recorder can produce.
| capturecardnum | Recorder ID in the database. |
Definition at line 383 of file playbacksock.cpp.
Referenced by EncoderLink::GetFlags(), and EncoderLink::GetState().
| long long PlaybackSock::GetMaxBitrate | ( | int | capturecardnum | ) |
Definition at line 400 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 415 of file playbacksock.cpp.
Referenced by EncoderLink::GetRecording().
| bool PlaybackSock::EncoderIsRecording | ( | int | capturecardnum, | |
| const ProgramInfo * | pginfo | |||
| ) |
Definition at line 433 of file playbacksock.cpp.
Referenced by EncoderLink::MatchesRecording().
| RecStatusType PlaybackSock::StartRecording | ( | int | capturecardnum, | |
| const ProgramInfo * | pginfo | |||
| ) |
Definition at line 446 of file playbacksock.cpp.
Referenced by EncoderLink::StartRecording().
| RecStatusType PlaybackSock::GetRecordingStatus | ( | int | capturecardnum | ) |
Definition at line 459 of file playbacksock.cpp.
Referenced by EncoderLink::GetRecordingStatus().
| void PlaybackSock::RecordPending | ( | int | capturecardnum, | |
| const ProgramInfo * | pginfo, | |||
| int | secsleft, | |||
| bool | hasLater | |||
| ) |
Definition at line 476 of file playbacksock.cpp.
Referenced by EncoderLink::RecordPending().
| int PlaybackSock::SetSignalMonitoringRate | ( | int | capturecardnum, | |
| int | rate, | |||
| int | notifyFrontend | |||
| ) |
Definition at line 488 of file playbacksock.cpp.
Referenced by EncoderLink::SetSignalMonitoringRate().
| void PlaybackSock::SetNextLiveTVDir | ( | int | capturecardnum, | |
| QString | dir | |||
| ) |
Definition at line 502 of file playbacksock.cpp.
Referenced by EncoderLink::SetNextLiveTVDir().
| vector< InputInfo > PlaybackSock::GetFreeInputs | ( | int | capturecardnum, | |
| const vector< uint > & | excluded_cardids | |||
| ) |
Definition at line 511 of file playbacksock.cpp.
Referenced by EncoderLink::GetFreeInputs().
| void PlaybackSock::CancelNextRecording | ( | int | capturecardnum, | |
| bool | cancel | |||
| ) |
Definition at line 539 of file playbacksock.cpp.
Referenced by EncoderLink::CancelNextRecording().
| QStringList PlaybackSock::ForwardRequest | ( | const QStringList & | slist | ) |
Definition at line 550 of file playbacksock.cpp.
Referenced by MainServer::HandlePixmapGetIfModified().
| bool PlaybackSock::SendReceiveStringList | ( | QStringList & | strlist, | |
| uint | min_reply_length = 0 | |||
| ) | [private] |
Definition at line 92 of file playbacksock.cpp.
Referenced by CancelNextRecording(), CheckFile(), CheckRecordingActive(), DeleteFile(), DeleteRecording(), EncoderIsRecording(), FillProgramInfo(), ForwardRequest(), GenPreviewPixmap(), GetDiskSpace(), GetEncoderState(), GetFileHash(), GetFreeInputs(), GetMaxBitrate(), GetRecording(), GetRecordingStatus(), GetSGFileList(), GetSGFileQuery(), GoToSleep(), IsBusy(), PixmapLastModified(), RecordPending(), SetNextLiveTVDir(), SetSignalMonitoringRate(), StartRecording(), and StopRecording().
MythSocket* PlaybackSock::sock [private] |
Definition at line 108 of file playbacksock.h.
Referenced by getSocket(), PlaybackSock(), SendReceiveStringList(), and ~PlaybackSock().
QString PlaybackSock::hostname [private] |
Definition at line 109 of file playbacksock.h.
Referenced by getHostname(), and PlaybackSock().
QString PlaybackSock::ip [private] |
Definition at line 110 of file playbacksock.h.
Referenced by getIP(), PlaybackSock(), and setIP().
bool PlaybackSock::local [private] |
Definition at line 112 of file playbacksock.h.
Referenced by isLocal(), and PlaybackSock().
Definition at line 113 of file playbacksock.h.
Referenced by eventsMode(), PlaybackSock(), wantsEvents(), wantsNonSystemEvents(), wantsOnlySystemEvents(), and wantsSystemEvents().
bool PlaybackSock::blockshutdown [private] |
Definition at line 114 of file playbacksock.h.
Referenced by getBlockShutdown(), PlaybackSock(), and setBlockShutdown().
bool PlaybackSock::backend [private] |
Definition at line 115 of file playbacksock.h.
Referenced by isSlaveBackend(), PlaybackSock(), and setAsSlaveBackend().
QMutex PlaybackSock::refLock [private] |
Definition at line 117 of file playbacksock.h.
QMutex PlaybackSock::sockLock [private] |
Definition at line 118 of file playbacksock.h.
Referenced by SendReceiveStringList().
bool PlaybackSock::expectingreply [private] |
Definition at line 120 of file playbacksock.h.
Referenced by isExpectingReply(), PlaybackSock(), and SendReceiveStringList().
bool PlaybackSock::disconnected [private] |
Definition at line 121 of file playbacksock.h.
Referenced by IsDisconnected(), PlaybackSock(), and SetDisconnected().
int PlaybackSock::refCount [private] |
Definition at line 123 of file playbacksock.h.
Referenced by DownRef(), PlaybackSock(), and UpRef().
MainServer* PlaybackSock::m_parent [private] |
Definition at line 125 of file playbacksock.h.
Referenced by DownRef(), and PlaybackSock().
1.6.3