|
MythTV master
|
#include <mythbackend/mainserver.h>
Classes | |
| struct | DeferredDeleteStruct |
Public Member Functions | |
| MainServer (bool master, int port, QMap< int, EncoderLink * > *tvList, Scheduler *sched, AutoExpire *expirer) | |
| ~MainServer () override | |
| void | Stop (void) |
| bool | isClientConnected (bool onlyBlockingClients=false) |
| void | ShutSlaveBackendsDown (const QString &haltcmd) |
| Sends the Slavebackends the request to shut down using haltcmd. More... | |
| void | ProcessRequest (MythSocket *sock) |
| void | readyRead (MythSocket *socket) override |
| void | connectionClosed (MythSocket *socket) override |
| void | connectionFailed (MythSocket *socket) override |
| void | connected (MythSocket *socket) override |
| void | DeletePBS (PlaybackSock *sock) |
| size_t | GetCurrentMaxBitrate (void) |
| void | BackendQueryDiskSpace (QStringList &strlist, bool consolidated, bool allHosts) |
| void | GetFilesystemInfos (FileSystemInfoList &fsInfos, bool useCache=true) |
| int | GetExitCode () const |
| void | UpdateSystemdStatus (void) |
| void | GetActiveBackends (QStringList &hosts) |
| PlaybackSock * | GetMediaServerByHostname (const QString &hostname) |
Public Member Functions inherited from MythSocketCBs | |
| virtual | ~MythSocketCBs ()=default |
| virtual void | connected (MythSocket *)=0 |
| virtual void | error (MythSocket *, int) |
| virtual void | readyRead (MythSocket *)=0 |
| virtual void | connectionFailed (MythSocket *)=0 |
| virtual void | connectionClosed (MythSocket *)=0 |
Protected Slots | |
| void | reconnectTimeout (void) |
| void | deferredDeleteSlot (void) |
| static void | autoexpireUpdate (void) |
Protected Member Functions | |
| void | customEvent (QEvent *e) override |
Private Types | |
| using | RequestedBy = QHash< QString, QString > |
Private Slots | |
| void | NewConnection (qintptr socketDescriptor) |
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 (const QStringList &slist, PlaybackSock *pbs) |
| void | HandleMoveFile (PlaybackSock *pbs, const QString &storagegroup, const QString &src, const QString &dst) |
| bool | HandleDeleteFile (const QStringList &slist, PlaybackSock *pbs) |
| bool | HandleDeleteFile (const QString &filename, const QString &storagegroup, PlaybackSock *pbs=nullptr) |
| void | HandleQueryRecordings (const 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 lexpirer=false, bool forgetHistory=false) |
| void | HandleUndeleteRecording (QStringList &slist, PlaybackSock *pbs) |
| void | DoHandleUndeleteRecording (RecordingInfo &recinfo, PlaybackSock *pbs) |
| void | HandleForgetRecording (QStringList &slist, PlaybackSock *pbs) |
| void | HandleRescheduleRecordings (const QStringList &request, PlaybackSock *pbs) |
| This function processes the received network protocol message to reschedule recordings. More... | |
| bool | HandleAddChildInput (uint inputid) |
| void | HandleGoToSleep (PlaybackSock *pbs) |
| void | HandleQueryFreeSpace (PlaybackSock *pbs, bool allHosts) |
| void | HandleQueryFreeSpaceSummary (PlaybackSock *pbs) |
| void | HandleQueryCheckFile (QStringList &slist, PlaybackSock *pbs) |
| void | HandleQueryFileExists (QStringList &slist, PlaybackSock *pbs) |
| void | HandleQueryFindFile (QStringList &slist, PlaybackSock *pbs) |
| void | HandleQueryFileHash (QStringList &slist, PlaybackSock *pbs) |
| void | HandleQueryGuideDataThrough (PlaybackSock *pbs) |
| void | HandleGetPendingRecordings (PlaybackSock *pbs, const 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 | HandleGetFreeInputInfo (PlaybackSock *pbs, uint excluded_input) |
| 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 (const QStringList &slist, PlaybackSock *pbs) |
| void | HandleSetLogLevel (const 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 (const 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 (const QStringList &tokens, PlaybackSock *pbs) |
| void | HandleSetSetting (const QStringList &tokens, PlaybackSock *pbs) |
| void | HandleScanVideos (PlaybackSock *pbs) |
| void | HandleScanMusic (const QStringList &slist, PlaybackSock *pbs) |
| void | HandleMusicTagUpdateVolatile (const QStringList &slist, PlaybackSock *pbs) |
| void | HandleMusicTagUpdateMetadata (const QStringList &slist, PlaybackSock *pbs) |
| void | HandleMusicFindAlbumArt (const QStringList &slist, PlaybackSock *pbs) |
| void | HandleMusicTagGetImage (const QStringList &slist, PlaybackSock *pbs) |
| void | HandleMusicTagAddImage (const QStringList &slist, PlaybackSock *pbs) |
| void | HandleMusicTagRemoveImage (const QStringList &slist, PlaybackSock *pbs) |
| void | HandleMusicTagChangeImage (const QStringList &slist, PlaybackSock *pbs) |
| void | HandleMusicCalcTrackLen (const QStringList &slist, PlaybackSock *pbs) |
| void | HandleMusicFindLyrics (const QStringList &slist, PlaybackSock *pbs) |
| void | HandleMusicGetLyricGrabbers (const QStringList &slist, PlaybackSock *pbs) |
| This function processes the received network protocol message to get the names of all scripts the grab music lyrics. More... | |
| void | HandleMusicSaveLyrics (const QStringList &slist, 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 *sock, QStringList &commands) |
| void | SendErrorResponse (MythSocket *sock, const QString &error) |
| void | SendErrorResponse (PlaybackSock *pbs, const QString &error) |
| PlaybackSock * | GetSlaveByHostname (const QString &hostname) |
| PlaybackSock * | GetPlaybackBySock (MythSocket *socket) |
| Warning you must hold a sockListLock lock before calling this. More... | |
| BEFileTransfer * | GetFileTransferByID (int id) |
| Warning you must hold a sockListLock lock before calling this. More... | |
| BEFileTransfer * | GetFileTransferBySock (MythSocket *socket) |
| Warning you must hold a sockListLock lock before calling this. More... | |
| void | DoTruncateThread (DeleteStruct *ds) |
| void | DoDeleteThread (DeleteStruct *ds) |
| LiveTVChain * | GetExistingChain (const QString &id) |
| LiveTVChain * | GetExistingChain (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 void | SendSlaveDisconnectedEvent (const QList< uint > &offlineEncoderIDs, bool needsReschedule) |
| static void | getGuideDataThrough (QDateTime &GuideDataThrough) |
| static QString | LocalFilePath (const QString &path, const QString &wantgroup) |
| static void | DeleteRecordedFiles (DeleteStruct *ds) |
| static void | DoDeleteInDB (DeleteStruct *ds) |
| static int | DeleteFile (const QString &filename, bool followLinks, bool deleteBrokenSymlinks=false) |
| Deletes links and unlinks the main file and returns the descriptor. More... | |
| static int | OpenAndUnlink (const QString &filename) |
| Opens a file, unlinks it and returns the file descriptor. More... | |
| static bool | TruncateAndClose (ProgramInfo *pginfo, int fd, const QString &filename, off_t fsize) |
| Repeatedly truncate an open file in small increments. More... | |
Static Private Attributes | |
| static QMutex | s_truncate_and_close_lock |
| static const std::chrono::milliseconds | kMasterServerReconnectTimeout { 1s } |
Friends | |
| class | DeleteThread |
| class | TruncateThread |
| class | FreeSpaceUpdater |
| class | RenameThread |
Definition at line 116 of file mainserver.h.
|
private |
Definition at line 364 of file mainserver.h.
| MainServer::MainServer | ( | bool | master, |
| int | port, | ||
| QMap< int, EncoderLink * > * | tvList, | ||
| Scheduler * | sched, | ||
| AutoExpire * | expirer | ||
| ) |
Definition at line 239 of file mainserver.cpp.
|
override |
Definition at line 353 of file mainserver.cpp.
|
private |
Definition at line 7891 of file mainserver.cpp.
Referenced by HandleRecorderQuery().
|
staticprotectedslot |
Definition at line 429 of file mainserver.cpp.
Referenced by MainServer().
| void MainServer::BackendQueryDiskSpace | ( | QStringList & | strlist, |
| bool | consolidated, | ||
| bool | allHosts | ||
| ) |
Definition at line 5144 of file mainserver.cpp.
Referenced by V2Status::FillDriveSpace(), HttpStatus::FillStatusXML(), V2Status::FillStatusXML(), GetFilesystemInfos(), HandleQueryFreeSpace(), and FreeSpaceUpdater::run().
|
inlineoverridevirtual |
Implements MythSocketCBs.
Definition at line 141 of file mainserver.h.
|
overridevirtual |
Implements MythSocketCBs.
Definition at line 7619 of file mainserver.cpp.
|
inlineoverridevirtual |
Implements MythSocketCBs.
Definition at line 140 of file mainserver.h.
|
overrideprotected |
Definition at line 1121 of file mainserver.cpp.
|
protectedslot |
Definition at line 7589 of file mainserver.cpp.
Referenced by MainServer().
|
private |
Definition at line 7899 of file mainserver.cpp.
Referenced by connectionClosed(), customEvent(), and HandleRecorderQuery().
|
staticprivate |
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 2637 of file mainserver.cpp.
Referenced by DoDeleteThread(), and HandleDeleteFile().
| void MainServer::DeletePBS | ( | PlaybackSock * | sock | ) |
Definition at line 7607 of file mainserver.cpp.
|
staticprivate |
Definition at line 2497 of file mainserver.cpp.
Referenced by DoDeleteThread().
|
staticprivate |
Definition at line 2571 of file mainserver.cpp.
Referenced by DoDeleteThread().
|
private |
Definition at line 2350 of file mainserver.cpp.
|
private |
Definition at line 3013 of file mainserver.cpp.
Referenced by customEvent(), and HandleDeleteRecording().
|
private |
Definition at line 2881 of file mainserver.cpp.
Referenced by customEvent(), DoHandleDeleteRecording(), and HandleStopRecording().
|
private |
Definition at line 3177 of file mainserver.cpp.
Referenced by customEvent(), and HandleUndeleteRecording().
|
private |
Definition at line 5344 of file mainserver.cpp.
Referenced by TruncateThread::run().
| void MainServer::GetActiveBackends | ( | QStringList & | hosts | ) |
Definition at line 5064 of file mainserver.cpp.
Referenced by V2Status::GetBackendStatus(), HandleActiveBackendsQuery(), and HandleScanVideos().
|
private |
Definition at line 7881 of file mainserver.cpp.
Referenced by DoDeleteThread().
| size_t MainServer::GetCurrentMaxBitrate | ( | void | ) |
Definition at line 5117 of file mainserver.cpp.
Referenced by BackendQueryDiskSpace(), and GetFilesystemInfos().
|
private |
Definition at line 7861 of file mainserver.cpp.
Referenced by connectionClosed(), customEvent(), and HandleRecorderQuery().
|
private |
Definition at line 7871 of file mainserver.cpp.
|
inline |
Definition at line 151 of file mainserver.h.
Referenced by run_backend().
| void MainServer::GetFilesystemInfos | ( | FileSystemInfoList & | fsInfos, |
| bool | useCache = true |
||
| ) |
Definition at line 5191 of file mainserver.cpp.
Referenced by AutoExpire::CalcParams(), AutoExpire::ExpireRecordings(), Scheduler::FillDirectoryInfoCache(), and MainServer().
|
private |
Warning you must hold a sockListLock lock before calling this.
Definition at line 7844 of file mainserver.cpp.
Referenced by HandleFileTransferQuery().
|
private |
Warning you must hold a sockListLock lock before calling this.
Definition at line 7853 of file mainserver.cpp.
Referenced by SendResponse().
|
staticprivate |
Definition at line 3783 of file mainserver.cpp.
Referenced by HandleQueryGuideDataThrough().
| PlaybackSock * MainServer::GetMediaServerByHostname | ( | const QString & | hostname | ) |
Definition at line 7814 of file mainserver.cpp.
Referenced by V2Status::GetBackendStatus(), HandleMusicCalcTrackLen(), HandleMusicFindAlbumArt(), HandleMusicFindLyrics(), HandleMusicSaveLyrics(), HandleMusicTagAddImage(), HandleMusicTagChangeImage(), HandleMusicTagGetImage(), HandleMusicTagRemoveImage(), HandleMusicTagUpdateMetadata(), HandleMusicTagUpdateVolatile(), HandleQueryCheckFile(), HandleQueryFileHash(), HandleQueryFindFile(), HandleScanMusic(), HandleSGFileQuery(), and HandleSGGetFileList().
|
private |
Warning you must hold a sockListLock lock before calling this.
Definition at line 7835 of file mainserver.cpp.
Referenced by connectionClosed(), ProcessRequestWork(), and SendResponse().
|
private |
Definition at line 7791 of file mainserver.cpp.
Referenced by DoHandleDeleteRecording(), DoHandleStopRecording(), HandleCheckRecordingActive(), HandleGenPreviewPixmap(), HandleIsActiveBackendQuery(), HandlePixmapGetIfModified(), HandlePixmapLastModified(), and HandleQueryRecordings().
|
private |
Definition at line 5082 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3250 of file mainserver.cpp.
Referenced by customEvent(), and ProcessRequestWork().
|
private |
Definition at line 1716 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 7574 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 7580 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5512 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 2813 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5481 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5496 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5440 of file mainserver.cpp.
Referenced by HandleCommBreakQuery(), and HandleCutlistQuery().
|
private |
Definition at line 5362 of file mainserver.cpp.
|
private |
Definition at line 5357 of file mainserver.cpp.
Referenced by HandleDeleteFile(), and ProcessRequestWork().
|
private |
Definition at line 2970 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 2998 of file mainserver.cpp.
|
private |
Definition at line 2080 of file mainserver.cpp.
Referenced by HandleVersion(), and ProcessRequestWork().
|
private |
Definition at line 5595 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 6906 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 2311 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3358 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 4349 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 7205 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3878 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
|
private |
Definition at line 3896 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 4389 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 3810 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 7051 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 7003 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3864 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3380 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5090 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 7176 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 4268 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 7088 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5264 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5846 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5990 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 6646 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
This function processes the received network protocol message to get the names of all scripts the grab music lyrics.
It will check for the existence of the script directory and of scripts. All scripts found are parsed for version numbers. The names and version numbers of all found scripts are returned to the caller.
| slist | Ignored. This function doesn't parse any additional parameters. |
| pbs | The socket used to send the response. |
Definition at line 6738 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 6834 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 6365 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 6196 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 6142 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 6520 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5903 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5786 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 7435 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 7369 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3601 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3719 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3652 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3986 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3411 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3445 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3794 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3543 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3488 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3558 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 2266 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 2139 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3586 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3519 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 4509 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 4948 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
This function processes the received network protocol message to reschedule recordings.
It ignores the parameters supplied by the caller and always asks the scheduling system to reschedule all recordings.
The network message should look like this:
RESCHEDULE_RECORDINGS[]:[]MATCH 0 0 0 - MythUtilCommand
The five values after the 'MATCH' keyword control which recordings should be rescheduled. They are described in the BuildMatchRequest function.
| request | Ignored. This function doesn't parse any additional parameters. |
| pbs | The socket used to send the response. |
Definition at line 3228 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5715 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5693 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5538 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 4913 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 7143 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 4886 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5671 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 5575 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 7116 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 4195 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3910 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 8150 of file mainserver.cpp.
Referenced by customEvent().
|
private |
Definition at line 2852 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 3159 of file mainserver.cpp.
Referenced by ProcessRequestWork().
|
private |
Definition at line 1651 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| bool MainServer::isClientConnected | ( | bool | onlyBlockingClients = false | ) |
Definition at line 8102 of file mainserver.cpp.
Referenced by Scheduler::HandleIdleShutdown().
|
staticprivate |
Definition at line 7925 of file mainserver.cpp.
Referenced by HandleAnnounce().
|
privateslot |
Definition at line 434 of file mainserver.cpp.
Referenced by MainServer().
|
staticprivate |
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 2699 of file mainserver.cpp.
Referenced by DeleteFile().
| void MainServer::ProcessRequest | ( | MythSocket * | sock | ) |
Definition at line 453 of file mainserver.cpp.
Referenced by BEProcessRequestRunnable::run().
|
private |
Definition at line 462 of file mainserver.cpp.
Referenced by ProcessRequest().
|
overridevirtual |
Implements MythSocketCBs.
Definition at line 444 of file mainserver.cpp.
|
protectedslot |
Definition at line 8018 of file mainserver.cpp.
Referenced by MainServer().
|
private |
Definition at line 2091 of file mainserver.cpp.
Referenced by ProcessRequestWork(), and SendErrorResponse().
|
private |
Definition at line 2086 of file mainserver.cpp.
|
private |
Definition at line 2101 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(), HandleGetFreeInputInfo(), HandleGetPendingRecordings(), HandleGetRecorderFromNum(), HandleGetRecorderNum(), HandleGetScheduledRecordings(), HandleGoToSleep(), HandleIsActiveBackendQuery(), HandleIsRecording(), HandleLockTuner(), HandleMessage(), HandleMoveFile(), HandleMusicCalcTrackLen(), HandleMusicFindAlbumArt(), HandleMusicFindLyrics(), HandleMusicGetLyricGrabbers(), HandleMusicSaveLyrics(), HandleMusicTagAddImage(), HandleMusicTagChangeImage(), HandleMusicTagGetImage(), HandleMusicTagRemoveImage(), HandleMusicTagUpdateMetadata(), HandleMusicTagUpdateVolatile(), HandlePixmapGetIfModified(), HandlePixmapLastModified(), HandleQueryCheckFile(), HandleQueryFileExists(), HandleQueryFileHash(), HandleQueryFindFile(), HandleQueryFreeSpace(), HandleQueryFreeSpaceSummary(), HandleQueryGuideDataThrough(), HandleQueryHostname(), HandleQueryLoad(), HandleQueryMemStats(), HandleQueryRecording(), HandleQueryRecordings(), HandleQueryTimeZone(), HandleQueryUptime(), HandleRecorderQuery(), HandleRemoteEncoder(), HandleRescheduleRecordings(), HandleScanMusic(), HandleScanVideos(), HandleSetBookmark(), HandleSetChannelInfo(), HandleSetLogLevel(), HandleSetNextLiveTVDir(), HandleSetSetting(), HandleSettingQuery(), HandleSetVerbose(), HandleSGFileQuery(), HandleSGGetFileList(), ProcessRequestWork(), RenameThread::run(), and SendErrorResponse().
|
staticprivate |
Definition at line 8163 of file mainserver.cpp.
Referenced by connectionClosed().
|
private |
Definition at line 7918 of file mainserver.cpp.
Referenced by MainServer().
| void MainServer::ShutSlaveBackendsDown | ( | const QString & | haltcmd | ) |
Sends the Slavebackends the request to shut down using haltcmd.
Definition at line 8131 of file mainserver.cpp.
Referenced by Scheduler::ShutdownServer().
| void MainServer::Stop | ( | void | ) |
Definition at line 359 of file mainserver.cpp.
Referenced by cleanup(), and ~MainServer().
|
staticprivate |
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 2740 of file mainserver.cpp.
Referenced by DoDeleteThread(), and DoTruncateThread().
| void MainServer::UpdateSystemdStatus | ( | void | ) |
Definition at line 8178 of file mainserver.cpp.
Referenced by connectionClosed(), customEvent(), HandleAnnounce(), and HandleDone().
|
friend |
Definition at line 120 of file mainserver.h.
Referenced by DoHandleDeleteRecording().
|
friend |
Definition at line 122 of file mainserver.h.
Referenced by HandleQueryFreeSpace(), HandleQueryFreeSpaceSummary(), and MainServer().
|
friend |
Definition at line 123 of file mainserver.h.
Referenced by HandleMoveFile().
|
friend |
Definition at line 121 of file mainserver.h.
Referenced by HandleDeleteFile().
|
staticprivate |
Definition at line 369 of file mainserver.h.
Referenced by customEvent(), MainServer(), and reconnectTimeout().
|
private |
Definition at line 341 of file mainserver.h.
Referenced by HandleAddChildInput().
|
private |
Definition at line 353 of file mainserver.h.
Referenced by HandleAnnounce(), MainServer(), and reconnectTimeout().
|
private |
Definition at line 321 of file mainserver.h.
Referenced by connectionClosed(), HandleAnnounce(), NewConnection(), ProcessRequestWork(), Stop(), and UpdateSystemdStatus().
|
private |
Definition at line 322 of file mainserver.h.
Referenced by connectionClosed(), customEvent(), and Stop().
|
private |
Definition at line 351 of file mainserver.h.
Referenced by deferredDeleteSlot(), and DeletePBS().
|
private |
Definition at line 349 of file mainserver.h.
Referenced by deferredDeleteSlot(), and DeletePBS().
|
private |
Definition at line 350 of file mainserver.h.
Referenced by MainServer().
|
private |
Definition at line 334 of file mainserver.h.
Referenced by DoDeleteThread(), and DoTruncateThread().
|
private |
Definition at line 360 of file mainserver.h.
Referenced by customEvent(), and HandleDownloadFile().
|
private |
Definition at line 359 of file mainserver.h.
Referenced by customEvent(), and HandleDownloadFile().
|
private |
Definition at line 313 of file mainserver.h.
Referenced by connectionClosed(), DoHandleStopRecording(), GetCurrentMaxBitrate(), HandleAnnounce(), HandleCheckRecordingActive(), HandleFreeTuner(), HandleGetFreeInputInfo(), HandleGetPendingRecordings(), HandleGetRecorderFromNum(), HandleGetRecorderNum(), HandleIsRecording(), HandleLockTuner(), HandleRecorderQuery(), HandleRemoteEncoder(), HandleSetChannelInfo(), HandleSetNextLiveTVDir(), reconnectTimeout(), and UpdateSystemdStatus().
|
private |
Definition at line 362 of file mainserver.h.
Referenced by GetExitCode(), and SetExitCode().
|
private |
Definition at line 340 of file mainserver.h.
Referenced by HandleGetExpiringRecordings(), and Stop().
|
private |
Definition at line 320 of file mainserver.h.
Referenced by connectionClosed(), GetFileTransferByID(), GetFileTransferBySock(), HandleAnnounce(), isClientConnected(), Stop(), and UpdateSystemdStatus().
|
private |
Definition at line 356 of file mainserver.h.
Referenced by GetFilesystemInfos().
|
private |
Definition at line 357 of file mainserver.h.
Referenced by GetFilesystemInfos().
|
private |
Definition at line 332 of file mainserver.h.
Referenced by connectionClosed(), customEvent(), DoHandleDeleteRecording(), DoHandleStopRecording(), GetMediaServerByHostname(), GetSlaveByHostname(), HandleAddChildInput(), HandleCheckRecordingActive(), HandleGenPreviewPixmap(), HandleMusicCalcTrackLen(), HandleMusicFindAlbumArt(), HandleMusicFindLyrics(), HandleMusicSaveLyrics(), HandleMusicTagAddImage(), HandleMusicTagChangeImage(), HandleMusicTagGetImage(), HandleMusicTagRemoveImage(), HandleMusicTagUpdateMetadata(), HandleMusicTagUpdateVolatile(), HandlePixmapGetIfModified(), HandlePixmapLastModified(), HandleQueryCheckFile(), HandleQueryFindFile(), HandleScanMusic(), HandleStopRecording(), MainServer(), ProcessRequestWork(), and UpdateSystemdStatus().
|
private |
Definition at line 310 of file mainserver.h.
Referenced by AddToChains(), DeleteChain(), GetChainWithRecording(), and GetExistingChain().
|
private |
Definition at line 311 of file mainserver.h.
Referenced by AddToChains(), DeleteChain(), GetChainWithRecording(), and GetExistingChain().
|
private |
Definition at line 337 of file mainserver.h.
Referenced by HandleGenPreviewPixmap(), HandlePixmapLastModified(), HandleQueryRecordings(), and MainServer().
|
private |
Definition at line 327 of file mainserver.h.
Referenced by HandleQueryFreeSpace(), HandleQueryFreeSpaceSummary(), MainServer(), and FreeSpaceUpdater::run().
|
private |
Definition at line 324 of file mainserver.h.
Referenced by HandleQueryFreeSpace(), HandleQueryFreeSpaceSummary(), FreeSpaceUpdater::run(), Stop(), and FreeSpaceUpdater::~FreeSpaceUpdater().
|
private |
Definition at line 325 of file mainserver.h.
Referenced by HandleQueryFreeSpace(), HandleQueryFreeSpaceSummary(), MainServer(), Stop(), and FreeSpaceUpdater::~FreeSpaceUpdater().
|
private |
Definition at line 326 of file mainserver.h.
Referenced by HandleQueryFreeSpace(), HandleQueryFreeSpaceSummary(), Stop(), and FreeSpaceUpdater::~FreeSpaceUpdater().
|
private |
Definition at line 330 of file mainserver.h.
Referenced by connectionClosed(), and reconnectTimeout().
|
private |
Definition at line 329 of file mainserver.h.
Referenced by customEvent(), MainServer(), and reconnectTimeout().
|
private |
Definition at line 316 of file mainserver.h.
Referenced by HandleScanVideos(), and MainServer().
|
private |
Definition at line 315 of file mainserver.h.
Referenced by MainServer(), and Stop().
|
private |
Definition at line 319 of file mainserver.h.
Referenced by BackendQueryDiskSpace(), connectionClosed(), customEvent(), GetActiveBackends(), GetMediaServerByHostname(), GetPlaybackBySock(), GetSlaveByHostname(), HandleAnnounce(), isClientConnected(), reconnectTimeout(), ShutSlaveBackendsDown(), Stop(), and UpdateSystemdStatus().
|
private |
Definition at line 365 of file mainserver.h.
Referenced by customEvent(), and HandleGenPreviewPixmap().
|
private |
Definition at line 339 of file mainserver.h.
Referenced by connectionClosed(), customEvent(), DoHandleDeleteRecording(), DoHandleStopRecording(), DoHandleUndeleteRecording(), HandleAddChildInput(), HandleAnnounce(), HandleFreeTuner(), HandleGetConflictingRecordings(), HandleGetPendingRecordings(), HandleGetScheduledRecordings(), HandleLockTuner(), HandleQueryRecordings(), HandleRescheduleRecordings(), HandleSlaveDisconnectedEvent(), Stop(), and UpdateSystemdStatus().
|
private |
Definition at line 318 of file mainserver.h.
Referenced by BackendQueryDiskSpace(), connectionClosed(), customEvent(), GetActiveBackends(), GetMediaServerByHostname(), GetSlaveByHostname(), HandleAnnounce(), HandleFileTransferQuery(), isClientConnected(), NewConnection(), ProcessRequestWork(), reconnectTimeout(), SendResponse(), ShutSlaveBackendsDown(), Stop(), and UpdateSystemdStatus().
|
private |
Definition at line 367 of file mainserver.h.
Referenced by connectionClosed(), Stop(), and ~MainServer().
|
private |
Definition at line 335 of file mainserver.h.
Referenced by MainServer(), readyRead(), and Stop().
|
staticprivate |
Definition at line 354 of file mainserver.h.
Referenced by TruncateAndClose().