#include <mainserver.h>
Classes | |
| struct | DeferredDeleteStruct |
Public Member Functions | |
| MainServer (bool master, int port, QMap< int, EncoderLink * > *tvList, Scheduler *sched, AutoExpire *expirer) | |
| ~MainServer () | |
| void | Stop (void) |
| void | customEvent (QEvent *e) |
| bool | isClientConnected () |
| void | ShutSlaveBackendsDown (QString &haltcmd) |
| Sends the Slavebackends the request to shut down using haltcmd. | |
| void | ProcessRequest (MythSocket *sock) |
| void | readyRead (MythSocket *socket) |
| void | connectionClosed (MythSocket *socket) |
| void | connectionFailed (MythSocket *socket) |
| void | connected (MythSocket *socket) |
| void | DeletePBS (PlaybackSock *pbs) |
| size_t | GetCurrentMaxBitrate (void) |
| void | BackendQueryDiskSpace (QStringList &strlist, bool consolidated, bool allHosts) |
| void | GetFilesystemInfos (QList< FileSystemInfo > &fsInfos) |
| int | GetExitCode () const |
Protected Slots | |
| void | reconnectTimeout (void) |
| void | deferredDeleteSlot (void) |
| void | autoexpireUpdate (void) |
Private Types | |
| typedef QHash< QString, QString > | RequestedBy |
Private Slots | |
| void | newConnection (MythSocket *) |
Private Member Functions | |
| void | ProcessRequestWork (MythSocket *sock) |
| void | HandleAnnounce (QStringList &slist, QStringList commands, MythSocket *socket) |
| void | HandleDone (MythSocket *socket) |
| void | HandleActiveBackendsQuery (PlaybackSock *pbs) |
| void | HandleIsActiveBackendQuery (QStringList &slist, PlaybackSock *pbs) |
| bool | HandleDeleteFile (QStringList &slist, PlaybackSock *pbs) |
| bool | HandleDeleteFile (QString filename, QString storagegroup, PlaybackSock *pbs=NULL) |
| void | HandleQueryRecordings (QString type, PlaybackSock *pbs) |
| void | HandleQueryRecording (QStringList &slist, PlaybackSock *pbs) |
| void | HandleStopRecording (QStringList &slist, PlaybackSock *pbs) |
| void | DoHandleStopRecording (RecordingInfo &recinfo, PlaybackSock *pbs) |
| void | HandleDeleteRecording (QString &chanid, QString &starttime, PlaybackSock *pbs, bool forceMetadataDelete, bool forgetHistory) |
| void | HandleDeleteRecording (QStringList &slist, PlaybackSock *pbs, bool forceMetadataDelete) |
| void | DoHandleDeleteRecording (RecordingInfo &recinfo, PlaybackSock *pbs, bool forceMetadataDelete, bool expirer=false, bool forgetHistory=false) |
| void | HandleUndeleteRecording (QStringList &slist, PlaybackSock *pbs) |
| void | DoHandleUndeleteRecording (RecordingInfo &recinfo, PlaybackSock *pbs) |
| void | HandleForgetRecording (QStringList &slist, PlaybackSock *pbs) |
| void | HandleRescheduleRecordings (int recordid, PlaybackSock *pbs) |
| void | HandleGoToSleep (PlaybackSock *pbs) |
| void | HandleQueryFreeSpace (PlaybackSock *pbs, bool allBackends) |
| void | HandleQueryFreeSpaceSummary (PlaybackSock *pbs) |
| void | HandleQueryCheckFile (QStringList &slist, PlaybackSock *pbs) |
| void | HandleQueryFileExists (QStringList &slist, PlaybackSock *pbs) |
| void | HandleQueryFileHash (QStringList &slist, PlaybackSock *pbs) |
| void | HandleQueryGuideDataThrough (PlaybackSock *pbs) |
| void | HandleGetPendingRecordings (PlaybackSock *pbs, QString table="", int recordid=-1) |
| void | HandleGetScheduledRecordings (PlaybackSock *pbs) |
| void | HandleGetConflictingRecordings (QStringList &slist, PlaybackSock *pbs) |
| void | HandleGetExpiringRecordings (PlaybackSock *pbs) |
| void | HandleSGGetFileList (QStringList &sList, PlaybackSock *pbs) |
| void | HandleSGFileQuery (QStringList &sList, PlaybackSock *pbs) |
| void | HandleGetNextFreeRecorder (QStringList &slist, PlaybackSock *pbs) |
| void | HandleGetFreeRecorder (PlaybackSock *pbs) |
| void | HandleGetFreeRecorderCount (PlaybackSock *pbs) |
| void | HandleGetFreeRecorderList (PlaybackSock *pbs) |
| void | HandleGetConnectedRecorderList (PlaybackSock *pbs) |
| void | HandleRecorderQuery (QStringList &slist, QStringList &commands, PlaybackSock *pbs) |
| void | HandleSetNextLiveTVDir (QStringList &commands, PlaybackSock *pbs) |
| void | HandleFileTransferQuery (QStringList &slist, QStringList &commands, PlaybackSock *pbs) |
| void | HandleGetRecorderNum (QStringList &slist, PlaybackSock *pbs) |
| void | HandleGetRecorderFromNum (QStringList &slist, PlaybackSock *pbs) |
| void | HandleMessage (QStringList &slist, PlaybackSock *pbs) |
| void | HandleSetVerbose (QStringList &slist, PlaybackSock *pbs) |
| void | HandleSetLogLevel (QStringList &slist, PlaybackSock *pbs) |
| void | HandleGenPreviewPixmap (QStringList &slist, PlaybackSock *pbs) |
| void | HandlePixmapLastModified (QStringList &slist, PlaybackSock *pbs) |
| void | HandlePixmapGetIfModified (const QStringList &slist, PlaybackSock *pbs) |
| void | HandleIsRecording (QStringList &slist, PlaybackSock *pbs) |
| void | HandleCheckRecordingActive (QStringList &slist, PlaybackSock *pbs) |
| void | HandleFillProgramInfo (QStringList &slist, PlaybackSock *pbs) |
| void | HandleSetChannelInfo (QStringList &slist, PlaybackSock *pbs) |
| void | HandleRemoteEncoder (QStringList &slist, QStringList &commands, PlaybackSock *pbs) |
| void | HandleLockTuner (PlaybackSock *pbs, int cardid=-1) |
| void | HandleFreeTuner (int cardid, PlaybackSock *pbs) |
| void | HandleCutMapQuery (const QString &chanid, const QString &starttime, PlaybackSock *pbs, bool commbreak) |
| void | HandleCommBreakQuery (const QString &chanid, const QString &starttime, PlaybackSock *pbs) |
| void | HandleCutlistQuery (const QString &chanid, const QString &starttime, PlaybackSock *pbs) |
| void | HandleBookmarkQuery (const QString &chanid, const QString &starttime, PlaybackSock *pbs) |
| void | HandleSetBookmark (QStringList &tokens, PlaybackSock *pbs) |
| void | HandleSettingQuery (QStringList &tokens, PlaybackSock *pbs) |
| void | HandleSetSetting (QStringList &tokens, PlaybackSock *pbs) |
| void | HandleScanVideos (PlaybackSock *pbs) |
| void | HandleVersion (MythSocket *socket, const QStringList &slist) |
| void | HandleBackendRefresh (MythSocket *socket) |
| void | HandleQueryLoad (PlaybackSock *pbs) |
| void | HandleQueryUptime (PlaybackSock *pbs) |
| void | HandleQueryHostname (PlaybackSock *pbs) |
| void | HandleQueryMemStats (PlaybackSock *pbs) |
| void | HandleQueryTimeZone (PlaybackSock *pbs) |
| void | HandleBlockShutdown (bool blockShutdown, PlaybackSock *pbs) |
| void | HandleDownloadFile (const QStringList &command, PlaybackSock *pbs) |
| void | HandleSlaveDisconnectedEvent (const MythEvent &event) |
| void | SendResponse (MythSocket *pbs, QStringList &commands) |
| void | SendSlaveDisconnectedEvent (const QList< uint > &offlineEncoderIDs, bool needsReschedule) |
| void | getGuideDataThrough (QDateTime &GuideDataThrough) |
| PlaybackSock * | GetSlaveByHostname (const QString &hostname) |
| PlaybackSock * | GetPlaybackBySock (MythSocket *socket) |
| Warning you must hold a sockListLock lock before calling this. | |
| FileTransfer * | GetFileTransferByID (int id) |
| Warning you must hold a sockListLock lock before calling this. | |
| FileTransfer * | GetFileTransferBySock (MythSocket *socket) |
| Warning you must hold a sockListLock lock before calling this. | |
| QString | LocalFilePath (const QUrl &url, const QString &wantgroup) |
| int | GetfsID (QList< FileSystemInfo >::iterator fsInfo) |
| void | DoTruncateThread (DeleteStruct *ds) |
| void | DoDeleteThread (DeleteStruct *ds) |
| void | DeleteRecordedFiles (DeleteStruct *ds) |
| void | DoDeleteInDB (DeleteStruct *ds) |
| LiveTVChain * | GetExistingChain (const QString &id) |
| LiveTVChain * | GetExistingChain (const MythSocket *sock) |
| LiveTVChain * | GetChainWithRecording (const ProgramInfo &pginfo) |
| void | AddToChains (LiveTVChain *chain) |
| void | DeleteChain (LiveTVChain *chain) |
| void | SetExitCode (int exitCode, bool closeApplication) |
Static Private Member Functions | |
| static int | DeleteFile (const QString &filename, bool followLinks, bool deleteBrokenSymlinks=false) |
| Deletes links and unlinks the main file and returns the descriptor. | |
| static int | OpenAndUnlink (const QString &filename) |
| Opens a file, unlinks it and returns the file descriptor. | |
| static bool | TruncateAndClose (ProgramInfo *pginfo, int fd, const QString &filename, off_t fsize) |
| Repeatedly truncate an open file in small increments. | |
Private Attributes | |
| vector< LiveTVChain * > | liveTVChains |
| QMutex | liveTVChainsLock |
| QMap< int, EncoderLink * > * | encoderList |
| MythServer * | mythserver |
| MetadataFactory * | metadatafactory |
| QReadWriteLock | sockListLock |
| vector< PlaybackSock * > | playbackList |
| vector< FileTransfer * > | fileTransferList |
| QMutex | masterFreeSpaceListLock |
| FreeSpaceUpdater *volatile | masterFreeSpaceListUpdater |
| QWaitCondition | masterFreeSpaceListWait |
| QStringList | masterFreeSpaceList |
| QTimer * | masterServerReconnect |
| PlaybackSock * | masterServer |
| bool | ismaster |
| QMutex | deletelock |
| MThreadPool | threadPool |
| bool | masterBackendOverride |
| Scheduler * | m_sched |
| AutoExpire * | m_expirer |
| QMutex | deferredDeleteLock |
| QTimer * | deferredDeleteTimer |
| MythDeque< DeferredDeleteStruct > | deferredDeleteList |
| QTimer * | autoexpireUpdateTimer |
| QMap< QString, int > | fsIDcache |
| QMutex | fsIDcacheLock |
| QMutex | m_downloadURLsLock |
| QMap< QString, QString > | m_downloadURLs |
| int | m_exitCode |
| RequestedBy | m_previewRequestedBy |
| bool | m_stopped |
Static Private Attributes | |
| static QMutex | truncate_and_close_lock |
| static const uint | kMasterServerReconnectTimeout = 1000 |
Friends | |
| class | DeleteThread |
| class | TruncateThread |
| class | FreeSpaceUpdater |
Definition at line 93 of file mainserver.h.
typedef QHash<QString,QString> MainServer::RequestedBy [private] |
Definition at line 314 of file mainserver.h.
| MainServer::MainServer | ( | bool | master, | |
| int | port, | |||
| QMap< int, EncoderLink * > * | tvList, | |||
| Scheduler * | sched, | |||
| AutoExpire * | expirer | |||
| ) |
Definition at line 212 of file mainserver.cpp.
| MainServer::~MainServer | ( | ) |
Definition at line 291 of file mainserver.cpp.
| void MainServer::Stop | ( | void | ) |
Definition at line 297 of file mainserver.cpp.
Referenced by cleanup(), and ~MainServer().
| void MainServer::customEvent | ( | QEvent * | e | ) |
Definition at line 815 of file mainserver.cpp.
| bool MainServer::isClientConnected | ( | ) |
Definition at line 6155 of file mainserver.cpp.
Referenced by Scheduler::HandleIdleShutdown().
| void MainServer::ShutSlaveBackendsDown | ( | QString & | haltcmd | ) |
Sends the Slavebackends the request to shut down using haltcmd.
Definition at line 6178 of file mainserver.cpp.
Referenced by Scheduler::ShutdownServer().
| void MainServer::ProcessRequest | ( | MythSocket * | sock | ) |
Definition at line 368 of file mainserver.cpp.
| void MainServer::readyRead | ( | MythSocket * | socket | ) | [virtual] |
Implements MythSocketCBs.
Definition at line 354 of file mainserver.cpp.
| void MainServer::connectionClosed | ( | MythSocket * | socket | ) | [virtual] |
Implements MythSocketCBs.
Definition at line 5675 of file mainserver.cpp.
| void MainServer::connectionFailed | ( | MythSocket * | socket | ) | [inline, virtual] |
Implements MythSocketCBs.
Definition at line 118 of file mainserver.h.
| void MainServer::connected | ( | MythSocket * | socket | ) | [inline, virtual] |
Implements MythSocketCBs.
Definition at line 119 of file mainserver.h.
| void MainServer::DeletePBS | ( | PlaybackSock * | pbs | ) |
Definition at line 5665 of file mainserver.cpp.
Referenced by PlaybackSock::DownRef().
| size_t MainServer::GetCurrentMaxBitrate | ( | void | ) |
Definition at line 4308 of file mainserver.cpp.
Referenced by BackendQueryDiskSpace(), and GetFilesystemInfos().
Definition at line 4336 of file mainserver.cpp.
Referenced by HttpStatus::FillStatusXML(), GetFilesystemInfos(), HandleQueryFreeSpace(), and FreeSpaceUpdater::run().
| void MainServer::GetFilesystemInfos | ( | QList< FileSystemInfo > & | fsInfos | ) |
Definition at line 4560 of file mainserver.cpp.
Referenced by AutoExpire::CalcParams(), AutoExpire::ExpireRecordings(), and Scheduler::FillDirectoryInfoCache().
| int MainServer::GetExitCode | ( | ) | const [inline] |
Definition at line 128 of file mainserver.h.
Referenced by run_backend().
| void MainServer::reconnectTimeout | ( | void | ) | [protected, slot] |
Definition at line 6062 of file mainserver.cpp.
Referenced by MainServer().
| void MainServer::deferredDeleteSlot | ( | void | ) | [protected, slot] |
Definition at line 5647 of file mainserver.cpp.
Referenced by MainServer().
| void MainServer::autoexpireUpdate | ( | void | ) | [protected, slot] |
Definition at line 344 of file mainserver.cpp.
Referenced by MainServer().
| void MainServer::newConnection | ( | MythSocket * | socket | ) | [private, slot] |
Definition at line 349 of file mainserver.cpp.
Referenced by MainServer().
| void MainServer::ProcessRequestWork | ( | MythSocket * | sock | ) | [private] |
Definition at line 380 of file mainserver.cpp.
Referenced by ProcessRequest().
| void MainServer::HandleAnnounce | ( | QStringList & | slist, | |
| QStringList | commands, | |||
| MythSocket * | socket | |||
| ) | [private] |
Definition at line 1305 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleDone | ( | MythSocket * | socket | ) | [private] |
Definition at line 1618 of file mainserver.cpp.
Referenced by HandleVersion(), and ProcessRequestWork().
| void MainServer::HandleActiveBackendsQuery | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 4251 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleIsActiveBackendQuery | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 4275 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| bool MainServer::HandleDeleteFile | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 4641 of file mainserver.cpp.
Referenced by DeleteRecordedFiles(), and ProcessRequestWork().
| bool MainServer::HandleDeleteFile | ( | QString | filename, | |
| QString | storagegroup, | |||
| PlaybackSock * | pbs = NULL | |||
| ) | [private] |
Definition at line 4646 of file mainserver.cpp.
| void MainServer::HandleQueryRecordings | ( | QString | type, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 1661 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleQueryRecording | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 1793 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleStopRecording | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 2348 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::DoHandleStopRecording | ( | RecordingInfo & | recinfo, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 2356 of file mainserver.cpp.
Referenced by DoHandleDeleteRecording(), and HandleStopRecording().
| void MainServer::HandleDeleteRecording | ( | QString & | chanid, | |
| QString & | starttime, | |||
| PlaybackSock * | pbs, | |||
| bool | forceMetadataDelete, | |||
| bool | forgetHistory | |||
| ) | [private] |
Definition at line 2437 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleDeleteRecording | ( | QStringList & | slist, | |
| PlaybackSock * | pbs, | |||
| bool | forceMetadataDelete | |||
| ) | [private] |
Definition at line 2460 of file mainserver.cpp.
| void MainServer::DoHandleDeleteRecording | ( | RecordingInfo & | recinfo, | |
| PlaybackSock * | pbs, | |||
| bool | forceMetadataDelete, | |||
| bool | expirer = false, |
|||
| bool | forgetHistory = false | |||
| ) | [private] |
Definition at line 2469 of file mainserver.cpp.
Referenced by customEvent(), and HandleDeleteRecording().
| void MainServer::HandleUndeleteRecording | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 2637 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::DoHandleUndeleteRecording | ( | RecordingInfo & | recinfo, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 2655 of file mainserver.cpp.
Referenced by HandleUndeleteRecording().
| void MainServer::HandleForgetRecording | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 2696 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleRescheduleRecordings | ( | int | recordid, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 2677 of file mainserver.cpp.
Referenced by HandleGetPendingRecordings(), and ProcessRequestWork().
| void MainServer::HandleGoToSleep | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 2718 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleQueryFreeSpace | ( | PlaybackSock * | pbs, | |
| bool | allBackends | |||
| ) | [private] |
Definition at line 2749 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleQueryFreeSpaceSummary | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 2781 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleQueryCheckFile | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 2923 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleQueryFileExists | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 3054 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleQueryFileHash | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 2974 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleQueryGuideDataThrough | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 3128 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleGetPendingRecordings | ( | PlaybackSock * | pbs, | |
| QString | table = "", |
|||
| int | recordid = -1 | |||
| ) | [private] |
Definition at line 3144 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleGetScheduledRecordings | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 3196 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleGetConflictingRecordings | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 3210 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleGetExpiringRecordings | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 3228 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleSGGetFileList | ( | QStringList & | sList, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 3242 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleSGFileQuery | ( | QStringList & | sList, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 3313 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleGetNextFreeRecorder | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 3612 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleGetFreeRecorder | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 3490 of file mainserver.cpp.
Referenced by HandleGetNextFreeRecorder(), and ProcessRequestWork().
| void MainServer::HandleGetFreeRecorderCount | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 3563 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleGetFreeRecorderList | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 3588 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleGetConnectedRecorderList | ( | PlaybackSock * | pbs | ) | [private] |
| void MainServer::HandleRecorderQuery | ( | QStringList & | slist, | |
| QStringList & | commands, | |||
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 3710 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleSetNextLiveTVDir | ( | QStringList & | commands, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 4069 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleFileTransferQuery | ( | QStringList & | slist, | |
| QStringList & | commands, | |||
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 5003 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleGetRecorderNum | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 5093 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleGetRecorderFromNum | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 5143 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleMessage | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 5182 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleSetVerbose | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 5210 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleSetLogLevel | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 5238 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleGenPreviewPixmap | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 5301 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandlePixmapLastModified | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 5443 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandlePixmapGetIfModified | ( | const QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 5506 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleIsRecording | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 5271 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleCheckRecordingActive | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 2308 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleFillProgramInfo | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 1838 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleSetChannelInfo | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 4093 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleRemoteEncoder | ( | QStringList & | slist, | |
| QStringList & | commands, | |||
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 4127 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleLockTuner | ( | PlaybackSock * | pbs, | |
| int | cardid = -1 | |||
| ) | [private] |
Definition at line 3374 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleFreeTuner | ( | int | cardid, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 3459 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleCutMapQuery | ( | const QString & | chanid, | |
| const QString & | starttime, | |||
| PlaybackSock * | pbs, | |||
| bool | commbreak | |||
| ) | [private] |
Definition at line 4722 of file mainserver.cpp.
Referenced by HandleCommBreakQuery(), and HandleCutlistQuery().
| void MainServer::HandleCommBreakQuery | ( | const QString & | chanid, | |
| const QString & | starttime, | |||
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 4766 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleCutlistQuery | ( | const QString & | chanid, | |
| const QString & | starttime, | |||
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 4781 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleBookmarkQuery | ( | const QString & | chanid, | |
| const QString & | starttime, | |||
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 4797 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleSetBookmark | ( | QStringList & | tokens, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 4827 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleSettingQuery | ( | QStringList & | tokens, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 4865 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleSetSetting | ( | QStringList & | tokens, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 4961 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleScanVideos | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 4985 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleVersion | ( | MythSocket * | socket, | |
| const QStringList & | slist | |||
| ) | [private] |
Definition at line 1252 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleBackendRefresh | ( | MythSocket * | socket | ) | [private] |
Definition at line 5632 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleQueryLoad | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 2824 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleQueryUptime | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 2849 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleQueryHostname | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 2871 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleQueryMemStats | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 2886 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleQueryTimeZone | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 2909 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleBlockShutdown | ( | bool | blockShutdown, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 5638 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleDownloadFile | ( | const QStringList & | command, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 4887 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleSlaveDisconnectedEvent | ( | const MythEvent & | event | ) | [private] |
Definition at line 6198 of file mainserver.cpp.
Referenced by customEvent().
| void MainServer::SendResponse | ( | MythSocket * | pbs, | |
| QStringList & | commands | |||
| ) | [private] |
Definition at line 1623 of file mainserver.cpp.
Referenced by DoHandleDeleteRecording(), DoHandleStopRecording(), DoHandleUndeleteRecording(), HandleActiveBackendsQuery(), HandleBackendRefresh(), HandleBlockShutdown(), HandleBookmarkQuery(), HandleCheckRecordingActive(), HandleCutMapQuery(), HandleDeleteFile(), HandleDeleteRecording(), HandleDownloadFile(), HandleFileTransferQuery(), HandleFillProgramInfo(), HandleForgetRecording(), HandleFreeTuner(), HandleGenPreviewPixmap(), HandleGetConflictingRecordings(), HandleGetExpiringRecordings(), HandleGetFreeRecorder(), HandleGetFreeRecorderCount(), HandleGetFreeRecorderList(), HandleGetNextFreeRecorder(), HandleGetPendingRecordings(), HandleGetRecorderFromNum(), HandleGetRecorderNum(), HandleGetScheduledRecordings(), HandleGoToSleep(), HandleIsActiveBackendQuery(), HandleIsRecording(), HandleLockTuner(), HandleMessage(), HandlePixmapGetIfModified(), HandlePixmapLastModified(), HandleQueryCheckFile(), HandleQueryFileExists(), HandleQueryFileHash(), HandleQueryFreeSpace(), HandleQueryFreeSpaceSummary(), HandleQueryGuideDataThrough(), HandleQueryHostname(), HandleQueryLoad(), HandleQueryMemStats(), HandleQueryRecording(), HandleQueryRecordings(), HandleQueryTimeZone(), HandleQueryUptime(), HandleRecorderQuery(), HandleRemoteEncoder(), HandleRescheduleRecordings(), HandleScanVideos(), HandleSetBookmark(), HandleSetChannelInfo(), HandleSetLogLevel(), HandleSetNextLiveTVDir(), HandleSetSetting(), HandleSettingQuery(), HandleSetVerbose(), HandleSGFileQuery(), HandleSGGetFileList(), and ProcessRequestWork().
| void MainServer::SendSlaveDisconnectedEvent | ( | const QList< uint > & | offlineEncoderIDs, | |
| bool | needsReschedule | |||
| ) | [private] |
Definition at line 6211 of file mainserver.cpp.
Referenced by connectionClosed().
| void MainServer::getGuideDataThrough | ( | QDateTime & | GuideDataThrough | ) | [private] |
Definition at line 3116 of file mainserver.cpp.
Referenced by HandleQueryGuideDataThrough().
| PlaybackSock * MainServer::GetSlaveByHostname | ( | const QString & | hostname | ) | [private] |
Definition at line 5807 of file mainserver.cpp.
Referenced by DoHandleDeleteRecording(), DoHandleStopRecording(), HandleCheckRecordingActive(), HandleGenPreviewPixmap(), HandleIsActiveBackendQuery(), HandlePixmapGetIfModified(), HandlePixmapLastModified(), HandleQueryCheckFile(), HandleQueryFileHash(), HandleQueryRecordings(), HandleSGFileQuery(), and HandleSGGetFileList().
| PlaybackSock * MainServer::GetPlaybackBySock | ( | MythSocket * | socket | ) | [private] |
Warning you must hold a sockListLock lock before calling this.
Definition at line 5834 of file mainserver.cpp.
Referenced by connectionClosed(), ProcessRequestWork(), readyRead(), and SendResponse().
| FileTransfer * MainServer::GetFileTransferByID | ( | int | id | ) | [private] |
Warning you must hold a sockListLock lock before calling this.
Definition at line 5852 of file mainserver.cpp.
Referenced by HandleFileTransferQuery().
| FileTransfer * MainServer::GetFileTransferBySock | ( | MythSocket * | socket | ) | [private] |
Warning you must hold a sockListLock lock before calling this.
Definition at line 5870 of file mainserver.cpp.
Referenced by SendResponse().
| QString MainServer::LocalFilePath | ( | const QUrl & | url, | |
| const QString & | wantgroup | |||
| ) | [private] |
Definition at line 5964 of file mainserver.cpp.
Referenced by HandleAnnounce().
| int MainServer::GetfsID | ( | QList< FileSystemInfo >::iterator | fsInfo | ) | [private] |
Definition at line 4298 of file mainserver.cpp.
Referenced by BackendQueryDiskSpace().
| void MainServer::DoTruncateThread | ( | DeleteStruct * | ds | ) | [private] |
Definition at line 4628 of file mainserver.cpp.
Referenced by TruncateThread::run().
| void MainServer::DoDeleteThread | ( | DeleteStruct * | ds | ) | [private] |
Definition at line 1876 of file mainserver.cpp.
| void MainServer::DeleteRecordedFiles | ( | DeleteStruct * | ds | ) | [private] |
Definition at line 2012 of file mainserver.cpp.
Referenced by DoDeleteThread().
| void MainServer::DoDeleteInDB | ( | DeleteStruct * | ds | ) | [private] |
Definition at line 2090 of file mainserver.cpp.
Referenced by DoDeleteThread().
| LiveTVChain * MainServer::GetExistingChain | ( | const QString & | id | ) | [private] |
Definition at line 5887 of file mainserver.cpp.
Referenced by connectionClosed(), customEvent(), and HandleRecorderQuery().
| LiveTVChain * MainServer::GetExistingChain | ( | const MythSocket * | sock | ) | [private] |
Definition at line 5901 of file mainserver.cpp.
| LiveTVChain * MainServer::GetChainWithRecording | ( | const ProgramInfo & | pginfo | ) | [private] |
Definition at line 5915 of file mainserver.cpp.
Referenced by DoDeleteThread().
| void MainServer::AddToChains | ( | LiveTVChain * | chain | ) | [private] |
Definition at line 5929 of file mainserver.cpp.
Referenced by HandleRecorderQuery().
| void MainServer::DeleteChain | ( | LiveTVChain * | chain | ) | [private] |
Definition at line 5937 of file mainserver.cpp.
Referenced by connectionClosed(), customEvent(), and HandleRecorderQuery().
| void MainServer::SetExitCode | ( | int | exitCode, | |
| bool | closeApplication | |||
| ) | [private] |
Definition at line 5957 of file mainserver.cpp.
Referenced by MainServer().
| int MainServer::DeleteFile | ( | const QString & | filename, | |
| bool | followLinks, | |||
| bool | deleteBrokenSymlinks = false | |||
| ) | [static, private] |
Deletes links and unlinks the main file and returns the descriptor.
This is meant to be used with TruncateAndClose() to slowly shrink a large file and then eventually delete the file by closing the file descriptor.
Definition at line 2153 of file mainserver.cpp.
Referenced by DeleteRecordedFiles(), DoDeleteThread(), and HandleDeleteFile().
| int MainServer::OpenAndUnlink | ( | const QString & | filename | ) | [static, private] |
Opens a file, unlinks it and returns the file descriptor.
This is used by DeleteFile(const QString&,bool) to delete recordings. In order to actually delete the file from the filesystem the user of this function must close the return file descriptor.
Definition at line 2209 of file mainserver.cpp.
Referenced by DeleteFile().
| bool MainServer::TruncateAndClose | ( | ProgramInfo * | pginfo, | |
| int | fd, | |||
| const QString & | filename, | |||
| off_t | fsize | |||
| ) | [static, private] |
Repeatedly truncate an open file in small increments.
When the file is small enough this closes the file and returns.
NOTE: This acquires a lock so that only one instance of TruncateAndClose() is running at a time.
Definition at line 2239 of file mainserver.cpp.
Referenced by DoDeleteThread(), and DoTruncateThread().
friend class DeleteThread [friend] |
Definition at line 97 of file mainserver.h.
Referenced by DoHandleDeleteRecording().
friend class TruncateThread [friend] |
Definition at line 98 of file mainserver.h.
Referenced by HandleDeleteFile().
friend class FreeSpaceUpdater [friend] |
Definition at line 99 of file mainserver.h.
Referenced by HandleQueryFreeSpace(), and HandleQueryFreeSpaceSummary().
vector<LiveTVChain*> MainServer::liveTVChains [private] |
Definition at line 263 of file mainserver.h.
Referenced by AddToChains(), DeleteChain(), GetChainWithRecording(), and GetExistingChain().
QMutex MainServer::liveTVChainsLock [private] |
Definition at line 264 of file mainserver.h.
Referenced by AddToChains(), DeleteChain(), GetChainWithRecording(), and GetExistingChain().
QMap<int, EncoderLink *>* MainServer::encoderList [private] |
Definition at line 266 of file mainserver.h.
Referenced by connectionClosed(), DoHandleDeleteRecording(), DoHandleStopRecording(), GetCurrentMaxBitrate(), HandleAnnounce(), HandleCheckRecordingActive(), HandleFreeTuner(), HandleGetFreeRecorder(), HandleGetFreeRecorderCount(), HandleGetFreeRecorderList(), HandleGetNextFreeRecorder(), HandleGetPendingRecordings(), HandleGetRecorderFromNum(), HandleGetRecorderNum(), HandleIsRecording(), HandleLockTuner(), HandleRecorderQuery(), HandleRemoteEncoder(), HandleSetChannelInfo(), HandleSetNextLiveTVDir(), and reconnectTimeout().
MythServer* MainServer::mythserver [private] |
Definition at line 268 of file mainserver.h.
Referenced by MainServer(), and Stop().
MetadataFactory* MainServer::metadatafactory [private] |
Definition at line 269 of file mainserver.h.
Referenced by HandleScanVideos(), and MainServer().
QReadWriteLock MainServer::sockListLock [private] |
Definition at line 271 of file mainserver.h.
Referenced by BackendQueryDiskSpace(), connectionClosed(), customEvent(), GetSlaveByHostname(), HandleActiveBackendsQuery(), HandleAnnounce(), HandleFileTransferQuery(), isClientConnected(), ProcessRequestWork(), readyRead(), reconnectTimeout(), SendResponse(), and ShutSlaveBackendsDown().
vector<PlaybackSock *> MainServer::playbackList [private] |
Definition at line 272 of file mainserver.h.
Referenced by BackendQueryDiskSpace(), connectionClosed(), customEvent(), GetPlaybackBySock(), GetSlaveByHostname(), HandleActiveBackendsQuery(), HandleAnnounce(), isClientConnected(), reconnectTimeout(), and ShutSlaveBackendsDown().
vector<FileTransfer *> MainServer::fileTransferList [private] |
Definition at line 273 of file mainserver.h.
Referenced by connectionClosed(), GetFileTransferByID(), GetFileTransferBySock(), HandleAnnounce(), and isClientConnected().
QMutex MainServer::masterFreeSpaceListLock [private] |
Definition at line 275 of file mainserver.h.
Referenced by HandleQueryFreeSpace(), HandleQueryFreeSpaceSummary(), FreeSpaceUpdater::run(), Stop(), and FreeSpaceUpdater::~FreeSpaceUpdater().
FreeSpaceUpdater* volatile MainServer::masterFreeSpaceListUpdater [private] |
Definition at line 276 of file mainserver.h.
Referenced by HandleQueryFreeSpace(), HandleQueryFreeSpaceSummary(), MainServer(), Stop(), and FreeSpaceUpdater::~FreeSpaceUpdater().
QWaitCondition MainServer::masterFreeSpaceListWait [private] |
Definition at line 277 of file mainserver.h.
Referenced by HandleQueryFreeSpace(), HandleQueryFreeSpaceSummary(), Stop(), and FreeSpaceUpdater::~FreeSpaceUpdater().
QStringList MainServer::masterFreeSpaceList [private] |
Definition at line 278 of file mainserver.h.
Referenced by HandleQueryFreeSpace(), HandleQueryFreeSpaceSummary(), MainServer(), and FreeSpaceUpdater::run().
QTimer* MainServer::masterServerReconnect [private] |
Definition at line 280 of file mainserver.h.
Referenced by customEvent(), MainServer(), and reconnectTimeout().
PlaybackSock* MainServer::masterServer [private] |
Definition at line 281 of file mainserver.h.
Referenced by connectionClosed(), and reconnectTimeout().
bool MainServer::ismaster [private] |
Definition at line 283 of file mainserver.h.
Referenced by connectionClosed(), customEvent(), DoHandleDeleteRecording(), DoHandleStopRecording(), GetSlaveByHostname(), HandleCheckRecordingActive(), HandleGenPreviewPixmap(), HandlePixmapGetIfModified(), HandlePixmapLastModified(), HandleQueryCheckFile(), MainServer(), and ProcessRequestWork().
QMutex MainServer::deletelock [private] |
Definition at line 285 of file mainserver.h.
Referenced by DoDeleteThread(), and DoTruncateThread().
MThreadPool MainServer::threadPool [private] |
Definition at line 286 of file mainserver.h.
Referenced by MainServer(), readyRead(), and Stop().
bool MainServer::masterBackendOverride [private] |
Definition at line 288 of file mainserver.h.
Referenced by HandleGenPreviewPixmap(), HandlePixmapLastModified(), HandleQueryRecordings(), and MainServer().
Scheduler* MainServer::m_sched [private] |
Definition at line 290 of file mainserver.h.
Referenced by connectionClosed(), customEvent(), DoHandleDeleteRecording(), DoHandleStopRecording(), HandleAnnounce(), HandleFreeTuner(), HandleGetConflictingRecordings(), HandleGetPendingRecordings(), HandleGetScheduledRecordings(), HandleLockTuner(), HandleQueryRecordings(), HandleRescheduleRecordings(), HandleSlaveDisconnectedEvent(), and Stop().
AutoExpire* MainServer::m_expirer [private] |
Definition at line 291 of file mainserver.h.
Referenced by HandleGetExpiringRecordings(), and Stop().
QMutex MainServer::deferredDeleteLock [private] |
Definition at line 299 of file mainserver.h.
Referenced by deferredDeleteSlot(), and DeletePBS().
QTimer* MainServer::deferredDeleteTimer [private] |
Definition at line 300 of file mainserver.h.
Referenced by MainServer().
Definition at line 301 of file mainserver.h.
Referenced by deferredDeleteSlot(), and DeletePBS().
QTimer* MainServer::autoexpireUpdateTimer [private] |
Definition at line 303 of file mainserver.h.
Referenced by HandleAnnounce(), MainServer(), and reconnectTimeout().
QMutex MainServer::truncate_and_close_lock [static, private] |
Definition at line 304 of file mainserver.h.
Referenced by TruncateAndClose().
QMap<QString, int> MainServer::fsIDcache [private] |
Definition at line 306 of file mainserver.h.
Referenced by GetfsID().
QMutex MainServer::fsIDcacheLock [private] |
Definition at line 307 of file mainserver.h.
Referenced by GetfsID().
QMutex MainServer::m_downloadURLsLock [private] |
Definition at line 309 of file mainserver.h.
Referenced by customEvent(), and HandleDownloadFile().
QMap<QString, QString> MainServer::m_downloadURLs [private] |
Definition at line 310 of file mainserver.h.
Referenced by customEvent(), and HandleDownloadFile().
int MainServer::m_exitCode [private] |
Definition at line 312 of file mainserver.h.
Referenced by GetExitCode(), and SetExitCode().
RequestedBy MainServer::m_previewRequestedBy [private] |
Definition at line 315 of file mainserver.h.
Referenced by customEvent(), and HandleGenPreviewPixmap().
bool MainServer::m_stopped [private] |
Definition at line 317 of file mainserver.h.
Referenced by Stop(), and ~MainServer().
const uint MainServer::kMasterServerReconnectTimeout = 1000 [static, private] |
Definition at line 319 of file mainserver.h.
Referenced by customEvent(), MainServer(), and reconnectTimeout().
1.6.3