#include <mainserver.h>

Definition at line 24 of file mainserver.h.
typedef struct MainServer::deletestruct MainServer::DeleteStruct [private] |
| MainServer::MainServer | ( | bool | master, | |
| int | port, | |||
| QMap< int, EncoderLink * > * | tvList, | |||
| Scheduler * | sched, | |||
| AutoExpire * | expirer | |||
| ) |
Definition at line 167 of file mainserver.cpp.
| MainServer::~MainServer | ( | ) |
Definition at line 226 of file mainserver.cpp.
| void MainServer::customEvent | ( | QCustomEvent * | e | ) |
Definition at line 647 of file mainserver.cpp.
| bool MainServer::isClientConnected | ( | ) |
| void MainServer::ShutSlaveBackendsDown | ( | QString & | haltcmd | ) |
| void MainServer::ProcessRequest | ( | MythSocket * | sock | ) |
| void MainServer::MarkUnused | ( | ProcessRequestThread * | prt | ) |
| void MainServer::readyRead | ( | MythSocket * | socket | ) | [virtual] |
| void MainServer::connectionClosed | ( | MythSocket * | socket | ) | [virtual] |
| void MainServer::connectionFailed | ( | MythSocket * | socket | ) | [inline, virtual] |
| void MainServer::connected | ( | MythSocket * | socket | ) | [inline, virtual] |
| void MainServer::DeletePBS | ( | PlaybackSock * | pbs | ) |
| void MainServer::reconnectTimeout | ( | void | ) | [protected, slot] |
| void MainServer::deferredDeleteSlot | ( | void | ) | [protected, slot] |
| void MainServer::autoexpireUpdate | ( | void | ) | [protected, slot] |
| void MainServer::newConnection | ( | MythSocket * | socket | ) | [private, slot] |
| void MainServer::ProcessRequestWork | ( | MythSocket * | sock | ) | [private] |
| void MainServer::HandleAnnounce | ( | QStringList & | slist, | |
| QStringList | commands, | |||
| MythSocket * | socket | |||
| ) | [private] |
| void MainServer::HandleDone | ( | MythSocket * | socket | ) | [private] |
Definition at line 1045 of file mainserver.cpp.
Referenced by HandleVersion(), and ProcessRequestWork().
| void MainServer::HandleIsActiveBackendQuery | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleQueryRecordings | ( | QString | type, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
myth_network_protocol
Definition at line 1070 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleQueryRecording | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
myth_network_protocol
Definition at line 1384 of file mainserver.cpp.
Referenced by ProcessRequestWork().
| void MainServer::HandleStopRecording | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::DoHandleStopRecording | ( | ProgramInfo * | pginfo, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 1885 of file mainserver.cpp.
Referenced by DoHandleDeleteRecording(), and HandleStopRecording().
| void MainServer::HandleDeleteRecording | ( | QStringList & | slist, | |
| PlaybackSock * | pbs, | |||
| bool | forceMetadataDelete | |||
| ) | [private] |
| void MainServer::DoHandleDeleteRecording | ( | ProgramInfo * | pginfo, | |
| PlaybackSock * | pbs, | |||
| bool | forceMetadataDelete, | |||
| bool | expirer = false | |||
| ) | [private] |
Definition at line 1977 of file mainserver.cpp.
Referenced by customEvent(), and HandleDeleteRecording().
| void MainServer::HandleUndeleteRecording | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::DoHandleUndeleteRecording | ( | ProgramInfo * | pginfo, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleForgetRecording | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleRescheduleRecordings | ( | int | recordid, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
Definition at line 2185 of file mainserver.cpp.
Referenced by HandleGetPendingRecordings(), and ProcessRequestWork().
| void MainServer::HandleQueryFreeSpace | ( | PlaybackSock * | pbs, | |
| bool | allBackends | |||
| ) | [private] |
| void MainServer::HandleQueryFreeSpaceSummary | ( | PlaybackSock * | pbs | ) | [private] |
| void MainServer::HandleQueryCheckFile | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleQueryGuideDataThrough | ( | PlaybackSock * | pbs | ) | [private] |
| void MainServer::HandleGetPendingRecordings | ( | PlaybackSock * | pbs, | |
| QString | table = "", |
|||
| int | recordid = -1 | |||
| ) | [private] |
| void MainServer::HandleGetScheduledRecordings | ( | PlaybackSock * | pbs | ) | [private] |
| void MainServer::HandleGetConflictingRecordings | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleGetExpiringRecordings | ( | PlaybackSock * | pbs | ) | [private] |
| void MainServer::HandleGetNextFreeRecorder | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleGetFreeRecorder | ( | PlaybackSock * | pbs | ) | [private] |
Definition at line 2620 of file mainserver.cpp.
Referenced by HandleGetNextFreeRecorder(), and ProcessRequestWork().
| void MainServer::HandleGetFreeRecorderCount | ( | PlaybackSock * | pbs | ) | [private] |
| void MainServer::HandleGetFreeRecorderList | ( | PlaybackSock * | pbs | ) | [private] |
| void MainServer::HandleGetConnectedRecorderList | ( | PlaybackSock * | pbs | ) | [private] |
| void MainServer::HandleRecorderQuery | ( | QStringList & | slist, | |
| QStringList & | commands, | |||
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleSetNextLiveTVDir | ( | QStringList & | commands, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleFileTransferQuery | ( | QStringList & | slist, | |
| QStringList & | commands, | |||
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleGetRecorderNum | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleGetRecorderFromNum | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleMessage | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleGenPreviewPixmap | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandlePixmapLastModified | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleIsRecording | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleCheckRecordingActive | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleFillProgramInfo | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleSetChannelInfo | ( | QStringList & | slist, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleRemoteEncoder | ( | QStringList & | slist, | |
| QStringList & | commands, | |||
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleLockTuner | ( | PlaybackSock * | pbs | ) | [private] |
| void MainServer::HandleFreeTuner | ( | int | cardid, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleCutMapQuery | ( | const QString & | chanid, | |
| const QString & | starttime, | |||
| PlaybackSock * | pbs, | |||
| bool | commbreak | |||
| ) | [private] |
Definition at line 3380 of file mainserver.cpp.
Referenced by HandleCommBreakQuery(), and HandleCutlistQuery().
| void MainServer::HandleCommBreakQuery | ( | const QString & | chanid, | |
| const QString & | starttime, | |||
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleCutlistQuery | ( | const QString & | chanid, | |
| const QString & | starttime, | |||
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleBookmarkQuery | ( | const QString & | chanid, | |
| const QString & | starttime, | |||
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleSetBookmark | ( | QStringList & | tokens, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleSettingQuery | ( | QStringList & | tokens, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleSetSetting | ( | QStringList & | tokens, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::HandleVersion | ( | MythSocket * | socket, | |
| QString | version | |||
| ) | [private] |
| void MainServer::HandleBackendRefresh | ( | MythSocket * | socket | ) | [private] |
| void MainServer::HandleQueryLoad | ( | PlaybackSock * | pbs | ) | [private] |
| void MainServer::HandleQueryUptime | ( | PlaybackSock * | pbs | ) | [private] |
| void MainServer::HandleQueryMemStats | ( | PlaybackSock * | pbs | ) | [private] |
| void MainServer::HandleBlockShutdown | ( | bool | blockShutdown, | |
| PlaybackSock * | pbs | |||
| ) | [private] |
| void MainServer::SendResponse | ( | MythSocket * | pbs, | |
| QStringList & | commands | |||
| ) | [private] |
Definition at line 1050 of file mainserver.cpp.
Referenced by DoHandleDeleteRecording(), DoHandleStopRecording(), DoHandleUndeleteRecording(), HandleBackendRefresh(), HandleBlockShutdown(), HandleBookmarkQuery(), HandleCheckRecordingActive(), HandleCutMapQuery(), HandleFileTransferQuery(), HandleFillProgramInfo(), HandleForgetRecording(), HandleFreeTuner(), HandleGenPreviewPixmap(), HandleGetConflictingRecordings(), HandleGetExpiringRecordings(), HandleGetFreeRecorder(), HandleGetFreeRecorderCount(), HandleGetFreeRecorderList(), HandleGetNextFreeRecorder(), HandleGetPendingRecordings(), HandleGetRecorderFromNum(), HandleGetRecorderNum(), HandleGetScheduledRecordings(), HandleIsActiveBackendQuery(), HandleIsRecording(), HandleLockTuner(), HandleMessage(), HandlePixmapLastModified(), HandleQueryCheckFile(), HandleQueryFreeSpace(), HandleQueryFreeSpaceSummary(), HandleQueryGuideDataThrough(), HandleQueryLoad(), HandleQueryMemStats(), HandleQueryRecording(), HandleQueryRecordings(), HandleQueryUptime(), HandleRecorderQuery(), HandleRemoteEncoder(), HandleRescheduleRecordings(), HandleSetBookmark(), HandleSetChannelInfo(), HandleSetNextLiveTVDir(), HandleSetSetting(), HandleSettingQuery(), and ProcessRequestWork().
| void MainServer::getGuideDataThrough | ( | QDateTime & | GuideDataThrough | ) | [private] |
| PlaybackSock * MainServer::getSlaveByHostname | ( | QString & | hostname | ) | [private] |
Definition at line 4110 of file mainserver.cpp.
Referenced by DoHandleDeleteRecording(), DoHandleStopRecording(), HandleCheckRecordingActive(), HandleGenPreviewPixmap(), HandleIsActiveBackendQuery(), HandlePixmapLastModified(), HandleQueryCheckFile(), and HandleQueryRecordings().
| PlaybackSock * MainServer::getPlaybackBySock | ( | MythSocket * | socket | ) | [private] |
Definition at line 4135 of file mainserver.cpp.
Referenced by connectionClosed(), ProcessRequestWork(), readyRead(), and SendResponse().
| FileTransfer * MainServer::getFileTransferByID | ( | int | id | ) | [private] |
| FileTransfer * MainServer::getFileTransferBySock | ( | MythSocket * | socket | ) | [private] |
| QString MainServer::LocalFilePath | ( | QUrl & | url | ) | [private] |
| void * MainServer::SpawnDeleteThread | ( | void * | param | ) | [static, private] |
| void MainServer::DoDeleteThread | ( | const DeleteStruct * | ds | ) | [private] |
| void MainServer::DoDeleteInDB | ( | const DeleteStruct * | ds | ) | [private] |
| LiveTVChain * MainServer::GetExistingChain | ( | QString | id | ) | [private] |
Definition at line 4198 of file mainserver.cpp.
Referenced by connectionClosed(), customEvent(), and HandleRecorderQuery().
| LiveTVChain * MainServer::GetExistingChain | ( | MythSocket * | sock | ) | [private] |
Definition at line 4215 of file mainserver.cpp.
| LiveTVChain * MainServer::GetChainWithRecording | ( | ProgramInfo * | pginfo | ) | [private] |
| void MainServer::AddToChains | ( | LiveTVChain * | chain | ) | [private] |
| void MainServer::DeleteChain | ( | LiveTVChain * | chain | ) | [private] |
Definition at line 4254 of file mainserver.cpp.
Referenced by connectionClosed(), customEvent(), and HandleRecorderQuery().
| int MainServer::DeleteFile | ( | const QString & | filename, | |
| bool | followLinks | |||
| ) | [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 1693 of file mainserver.cpp.
Referenced by DoDeleteThread().
| 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 1744 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 aquires a lock so that only one instance of TruncateAndClose() is running at a time.
Definition at line 1773 of file mainserver.cpp.
Referenced by DoDeleteThread().
QPtrList<LiveTVChain> MainServer::liveTVChains [private] |
Definition at line 163 of file mainserver.h.
Referenced by AddToChains(), DeleteChain(), GetChainWithRecording(), and GetExistingChain().
QMutex MainServer::liveTVChainsLock [private] |
Definition at line 164 of file mainserver.h.
Referenced by DeleteChain(), GetChainWithRecording(), and GetExistingChain().
QMap<int, EncoderLink *>* MainServer::encoderList [private] |
Definition at line 166 of file mainserver.h.
Referenced by connectionClosed(), DoHandleDeleteRecording(), DoHandleStopRecording(), HandleAnnounce(), HandleCheckRecordingActive(), HandleFreeTuner(), HandleGetFreeRecorder(), HandleGetFreeRecorderCount(), HandleGetFreeRecorderList(), HandleGetNextFreeRecorder(), HandleGetPendingRecordings(), HandleGetRecorderFromNum(), HandleGetRecorderNum(), HandleIsRecording(), HandleLockTuner(), HandleQueryFreeSpace(), HandleQueryFreeSpaceSummary(), HandleRecorderQuery(), HandleRemoteEncoder(), HandleSetChannelInfo(), HandleSetNextLiveTVDir(), MainServer(), and reconnectTimeout().
MythServer* MainServer::mythserver [private] |
QMutex MainServer::sockListLock [private] |
Definition at line 170 of file mainserver.h.
Referenced by connectionClosed(), customEvent(), getFileTransferByID(), getFileTransferBySock(), getPlaybackBySock(), getSlaveByHostname(), HandleAnnounce(), isClientConnected(), reconnectTimeout(), and ShutSlaveBackendsDown().
vector<PlaybackSock *> MainServer::playbackList [private] |
Definition at line 171 of file mainserver.h.
Referenced by connectionClosed(), customEvent(), getPlaybackBySock(), getSlaveByHostname(), HandleAnnounce(), isClientConnected(), reconnectTimeout(), and ShutSlaveBackendsDown().
vector<FileTransfer *> MainServer::fileTransferList [private] |
Definition at line 172 of file mainserver.h.
Referenced by connectionClosed(), getFileTransferByID(), getFileTransferBySock(), HandleAnnounce(), and isClientConnected().
QTimer* MainServer::masterServerReconnect [private] |
Definition at line 174 of file mainserver.h.
Referenced by connectionClosed(), MainServer(), reconnectTimeout(), and ~MainServer().
PlaybackSock* MainServer::masterServer [private] |
Definition at line 175 of file mainserver.h.
Referenced by connectionClosed(), MainServer(), and reconnectTimeout().
bool MainServer::ismaster [private] |
Definition at line 177 of file mainserver.h.
Referenced by connectionClosed(), customEvent(), DoHandleDeleteRecording(), DoHandleStopRecording(), getSlaveByHostname(), HandleCheckRecordingActive(), HandleGenPreviewPixmap(), HandlePixmapLastModified(), HandleQueryCheckFile(), MainServer(), and ProcessRequestWork().
QMutex MainServer::deletelock [private] |
QMutex MainServer::threadPoolLock [private] |
QWaitCondition MainServer::threadPoolCond [private] |
vector<ProcessRequestThread *> MainServer::threadPool [private] |
Definition at line 182 of file mainserver.h.
Referenced by MainServer(), MarkUnused(), and readyRead().
bool MainServer::masterBackendOverride [private] |
Definition at line 184 of file mainserver.h.
Referenced by HandleGenPreviewPixmap(), HandlePixmapLastModified(), HandleQueryRecordings(), and MainServer().
Scheduler* MainServer::m_sched [private] |
Definition at line 186 of file mainserver.h.
Referenced by connectionClosed(), customEvent(), DoHandleDeleteRecording(), DoHandleStopRecording(), HandleAnnounce(), HandleFreeTuner(), HandleGetConflictingRecordings(), HandleGetPendingRecordings(), HandleGetScheduledRecordings(), HandleLockTuner(), HandleQueryRecordings(), HandleRescheduleRecordings(), and MainServer().
AutoExpire* MainServer::m_expirer [private] |
Definition at line 187 of file mainserver.h.
Referenced by HandleGetExpiringRecordings(), and MainServer().
QMutex MainServer::readReadyLock [private] |
QMutex MainServer::deferredDeleteLock [private] |
QTimer* MainServer::deferredDeleteTimer [private] |
QValueList<DeferredDeleteStruct> MainServer::deferredDeleteList [private] |
QTimer* MainServer::autoexpireUpdateTimer [private] |
Definition at line 201 of file mainserver.h.
Referenced by HandleAnnounce(), MainServer(), and reconnectTimeout().
QMutex MainServer::truncate_and_close_lock [static, private] |
1.5.5