MythTV  master
Public Types | Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
MythCoreContext Class Reference

This class contains the runtime context for MythTV. More...

#include <mythcorecontext.h>

Inheritance diagram for MythCoreContext:
Inheritance graph
[legend]
Collaboration diagram for MythCoreContext:
Collaboration graph
[legend]

Public Types

enum  ResolveType { ResolveAny = -1, ResolveIPv4 = 0, ResolveIPv6 = 1 }
 
using PlaybackStartCb = void(QObject::*)(void)
 

Signals

void TVPlaybackStarted (void)
 
void TVPlaybackStopped (void)
 
void TVPlaybackSought (qint64 position)
 
void TVPlaybackSought (void)
 
void TVPlaybackPaused (void)
 
void TVPlaybackUnpaused (void)
 
void TVPlaybackAborted (void)
 
void TVPlaybackAboutToStart (void)
 
void TVPlaybackPlaying (void)
 

Public Member Functions

 MythCoreContext (const QString &binversion, QObject *guiContext)
 
 ~MythCoreContext () override
 
bool Init (void)
 
void SetLocalHostname (const QString &hostname)
 
void SetServerSocket (MythSocket *serverSock)
 
void SetEventSocket (MythSocket *eventSock)
 
void SetScheduler (MythScheduler *sched)
 
bool SafeConnectToMasterServer (bool blockingClient=true, bool openEventSocket=true)
 
bool ConnectToMasterServer (bool blockingClient=true, bool openEventSocket=true)
 
MythSocketConnectCommandSocket (const QString &hostname, int port, const QString &announcement, bool *proto_mismatch=nullptr, int maxConnTry=-1, std::chrono::milliseconds setup_timeout=-1ms)
 
MythSocketConnectEventSocket (const QString &hostname, int port)
 
bool SetupCommandSocket (MythSocket *serverSock, const QString &announcement, std::chrono::milliseconds timeout, bool &proto_mismatch)
 
bool CheckProtoVersion (MythSocket *socket, std::chrono::milliseconds timeout=kMythSocketLongTimeout, bool error_dialog_desired=false)
 
QString GetMasterHostPrefix (const QString &storageGroup=QString(), const QString &path=QString())
 
QString GetMasterHostName (void)
 
QString GetHostName (void)
 
QString GetFilePrefix (void)
 
bool IsConnectedToMaster (void)
 
void SetAsBackend (bool backend)
 
bool IsBackend (void) const
 is this process a backend process More...
 
void SetAsFrontend (bool frontend)
 
bool IsFrontend (void) const
 is this process a frontend process More...
 
bool IsFrontendOnly (void)
 is there a frontend, but no backend, running on this host More...
 
bool IsMasterHost (void)
 is this the same host as the master More...
 
bool IsMasterHost (const QString &host)
 is specified host the master More...
 
bool IsMasterBackend (void)
 is this the actual MBE process More...
 
bool IsThisBackend (const QString &addr)
 is this address mapped to this backend host More...
 
bool IsThisHost (const QString &addr)
 is this address mapped to this host More...
 
bool IsThisHost (const QString &addr, const QString &host)
 
void BlockShutdown (void)
 
void AllowShutdown (void)
 
bool IsBlockingClient (void) const
 is this client blocking shutdown More...
 
void SetWOLAllowed (bool allow)
 
bool IsWOLAllowed () const
 
bool SendReceiveStringList (QStringList &strlist, bool quickTimeout=false, bool block=true)
 Send a message to the backend and wait for a response. More...
 
void SendMessage (const QString &message)
 
void SendEvent (const MythEvent &event)
 
void SendSystemEvent (const QString &msg)
 
void SendHostSystemEvent (const QString &msg, const QString &hostname, const QString &args)
 
void SetGUIObject (QObject *gui)
 
QObject * GetGUIObject (void)
 
QObject * GetGUIContext (void)
 
bool HasGUI (void) const
 
bool IsUIThread (void)
 
MythDBGetDB (void)
 
MDBManagerGetDBManager (void)
 
MythSchedulerGetScheduler (void)
 
bool IsDatabaseIgnored (void) const
 /brief Returns true if database is being ignored. More...
 
void SaveSetting (const QString &key, int newValue)
 
void SaveSetting (const QString &key, const QString &newValue)
 
QString GetSetting (const QString &key, const QString &defaultval="")
 
template<typename T >
std::enable_if_t< std::chrono::__is_duration< T >::value, void > SaveDurSetting (const QString &key, T newValue)
 
bool SaveSettingOnHost (const QString &key, const QString &newValue, const QString &host)
 
void SaveBoolSetting (const QString &key, bool newValue)
 
bool GetBoolSetting (const QString &key, bool defaultval=false)
 
int GetNumSetting (const QString &key, int defaultval=0)
 
template<typename T >
std::enable_if_t< std::chrono::__is_duration< T >::value, T > GetDurSetting (const QString &key, T defaultval=T::zero())
 
int GetBoolSetting (const QString &key, int defaultval)=delete
 
bool GetNumSetting (const QString &key, bool defaultvalue)=delete
 
double GetFloatSetting (const QString &key, double defaultval=0.0)
 
void GetResolutionSetting (const QString &type, int &width, int &height, double &forced_aspect, double &refresh_rate, int index=-1)
 
void GetResolutionSetting (const QString &type, int &width, int &height, int index=-1)
 
QString GetSettingOnHost (const QString &key, const QString &host, const QString &defaultval="")
 
bool GetBoolSettingOnHost (const QString &key, const QString &host, bool defaultval=false)
 
int GetNumSettingOnHost (const QString &key, const QString &host, int defaultval=0)
 
int GetBoolSettingOnHost (const QString &key, const QString &host, int defaultval)=delete
 
bool GetNumSettingOnHost (const QString &key, const QString &host, bool defaultval=false)=delete
 
double GetFloatSettingOnHost (const QString &key, const QString &host, double defaultval=0.0)
 
QString GetBackendServerIP (void)
 Returns the IP address of the locally defined backend IP. More...
 
QString GetBackendServerIP (const QString &host)
 Returns the IP address of backend "host" If an IPv6 address has been defined, will use it whenever possible, unless the IPv6 address is a localhost address, in which case the IPv4 address will be used. More...
 
QString GetBackendServerIP4 (void)
 Returns the IPv4 address defined for the current host see GetBackendServerIP4(host) More...
 
QString GetBackendServerIP4 (const QString &host)
 Returns the IPv4 address defined for the backend "host". More...
 
QString GetBackendServerIP6 (void)
 Returns the IPv6 address defined for the current host see GetBackendServerIP6(host) More...
 
QString GetBackendServerIP6 (const QString &host)
 Returns the IPv6 address defined for the backend "host". More...
 
QString GetMasterServerIP (void)
 Returns the Master Backend IP address If the address is an IPv6 address, the scope Id is removed. More...
 
int GetMasterServerStatusPort (void)
 Returns the Master Backend status port If no master server status port has been defined in the database, return the default 6544. More...
 
int GetBackendServerPort (void)
 Returns the locally defined backend control port. More...
 
int GetBackendServerPort (const QString &host)
 Returns the backend "hosts"'s control port. More...
 
int GetBackendStatusPort (void)
 Returns the locally defined backend status port. More...
 
int GetBackendStatusPort (const QString &host)
 Returns the backend "hosts"'s status port. More...
 
bool GetScopeForAddress (QHostAddress &addr) const
 Return the cached scope Id for the given address. More...
 
void SetScopeForAddress (const QHostAddress &addr)
 Record the scope Id of the given IP address. More...
 
void SetScopeForAddress (const QHostAddress &addr, int scope)
 Record the scope Id of the given IP address. More...
 
QString resolveSettingAddress (const QString &name, const QString &host=QString(), ResolveType type=ResolveAny, bool keepscope=false)
 Retrieve IP setting "name" for "host". More...
 
bool CheckSubnet (const QAbstractSocket *socket)
 Check if a socket is connected to an approved peer. More...
 
bool CheckSubnet (const QHostAddress &peer)
 Check if aa ip address is approved. More...
 
void ClearSettingsCache (const QString &myKey=QString(""))
 
void ActivateSettingsCache (bool activate=true)
 
void OverrideSettingForSession (const QString &key, const QString &value)
 
void ClearOverrideSettingForSession (const QString &key)
 
void dispatch (const MythEvent &event)
 
void InitPower (bool Create=true)
 
void InitLocale (void)
 
void ReInitLocale (void)
 
MythLocaleGetLocale (void) const
 
QLocale GetQLocale (void)
 
void SaveLocaleDefaults (void)
 
QString GetLanguage (void)
 Returns two character ISO-639 language descriptor for UI language. More...
 
QString GetLanguageAndVariant (void)
 Returns the user-set language and variant. More...
 
void ResetLanguage (void)
 
QString GetAudioLanguage (void)
 Returns two character ISO-639 language descriptor for audio language. More...
 
QString GetAudioLanguageAndVariant (void)
 Returns the user-set audio language and variant. More...
 
void ResetAudioLanguage (void)
 
void ResetSockets (void)
 
void RegisterForPlayback (QObject *sender, PlaybackStartCb method)
 
template<class OBJ , typename SLOT >
std::enable_if_t< std::is_member_function_pointer_v< SLOT >, void > RegisterForPlayback (OBJ *sender, SLOT method)
 
void UnregisterForPlayback (QObject *sender)
 
void WantingPlayback (QObject *sender)
 All the objects that have registered using MythCoreContext::RegisterForPlayback but sender will be called. More...
 
bool InWantingPlayback (void)
 Returns true if a client has requested playback. More...
 
void TVInWantingPlayback (bool b)
 Let the TV class tell us if we was interrupted following a call to WantingPlayback(). More...
 
MythSessionManagerGetSessionManager (void)
 
void SetPluginManager (MythPluginManager *pmanager)
 
MythPluginManagerGetPluginManager (void)
 
void SetExiting (bool exiting=true)
 
bool IsExiting (void)
 
void RegisterFileForWrite (const QString &file, uint64_t size=0LL)
 
void UnregisterFileForWrite (const QString &file)
 
bool IsRegisteredFileForWrite (const QString &file)
 
void setTestIntSettings (QMap< QString, int > &overrides)
 
void setTestFloatSettings (QMap< QString, double > &overrides)
 
void setTestStringSettings (QMap< QString, QString > &overrides)
 
void WaitUntilSignals (std::vector< CoreWaitInfo > &sigs) const
 Wait until any of the provided signals have been received. More...
 
void emitTVPlaybackStarted (void)
 
void emitTVPlaybackStopped (void)
 
void emitTVPlaybackSought (qint64 position)
 
void emitTVPlaybackPaused (void)
 
void emitTVPlaybackUnpaused (void)
 
void emitTVPlaybackAborted (void)
 
void emitTVPlaybackPlaying (void)
 
void SetDVBv3 (bool dvbv3)
 
bool GetDVBv3 (void) const
 
- Public Member Functions inherited from MythObservable
 MythObservable ()
 
virtual ~MythObservable ()
 
void addListener (QObject *listener)
 Add a listener to the observable. More...
 
void removeListener (QObject *listener)
 Remove a listener to the observable. More...
 
void dispatch (const MythEvent &event)
 Dispatch an event to all listeners. More...
 
bool hasListeners (void)
 
- Public Member Functions inherited from MythSocketCBs
virtual ~MythSocketCBs ()=default
 
virtual void error (MythSocket *, int)
 

Static Public Member Functions

static QString GenMythURL (const QString &host=QString(), int port=0, QString path=QString(), const QString &storageGroup=QString())
 
static bool BackendIsRunning (void)
 a backend process is running on this host More...
 
static int GetMasterServerPort (void)
 Returns the Master Backend control port If no master server port has been defined in the database, return the default 6543. More...
 
static void ClearBackendServerPortCache ()
 
static QString resolveAddress (const QString &host, ResolveType type=ResolveAny, bool keepscope=false)
 if host is an IP address, it will be returned or resolved otherwise. More...
 
static bool TestPluginVersion (const QString &name, const QString &libversion, const QString &pluginversion)
 

Static Public Attributes

static QHash< QString, int > s_serverPortCache
 

Private Member Functions

void connected (MythSocket *sock) override
 
void connectionFailed (MythSocket *sock) override
 
void connectionClosed (MythSocket *sock) override
 
void readyRead (MythSocket *sock) override
 

Private Attributes

MythCoreContextPrivated {nullptr}
 
QMap< QString, int > m_testOverrideInts {}
 
QMap< QString, double > m_testOverrideFloats {}
 
QMap< QString, QString > m_testOverrideStrings {}
 
bool m_dvbv3 {false}
 

Additional Inherited Members

- Protected Attributes inherited from MythObservable
QMutex * m_lock {nullptr}
 
QSet< QObject * > m_listeners
 

Detailed Description

This class contains the runtime context for MythTV.

This class can be used to query for and set global and host settings, and is used to communicate between the frontends and backends. It also contains helper functions for theming and for getting system defaults, parsing the command line, etc. It also contains support for database error printing, and database message logging.

Definition at line 62 of file mythcorecontext.h.

Member Typedef Documentation

◆ PlaybackStartCb

using MythCoreContext::PlaybackStartCb = void (QObject::*)(void)

Definition at line 243 of file mythcorecontext.h.

Member Enumeration Documentation

◆ ResolveType

Enumerator
ResolveAny 
ResolveIPv4 
ResolveIPv6 

Definition at line 211 of file mythcorecontext.h.

Constructor & Destructor Documentation

◆ MythCoreContext()

MythCoreContext::MythCoreContext ( const QString &  binversion,
QObject *  guiContext 
)

Definition at line 214 of file mythcorecontext.cpp.

◆ ~MythCoreContext()

MythCoreContext::~MythCoreContext ( )
override

Definition at line 281 of file mythcorecontext.cpp.

Member Function Documentation

◆ Init()

bool MythCoreContext::Init ( void  )

Definition at line 220 of file mythcorecontext.cpp.

Referenced by MythContext::MythContext().

◆ SetLocalHostname()

void MythCoreContext::SetLocalHostname ( const QString &  hostname)

Definition at line 1726 of file mythcorecontext.cpp.

Referenced by MythContextPrivate::LoadDatabaseSettings().

◆ SetServerSocket()

void MythCoreContext::SetServerSocket ( MythSocket serverSock)

◆ SetEventSocket()

void MythCoreContext::SetEventSocket ( MythSocket eventSock)

◆ SetScheduler()

void MythCoreContext::SetScheduler ( MythScheduler sched)

Definition at line 1900 of file mythcorecontext.cpp.

Referenced by cleanup(), and run_backend().

◆ SafeConnectToMasterServer()

bool MythCoreContext::SafeConnectToMasterServer ( bool  blockingClient = true,
bool  openEventSocket = true 
)

◆ ConnectToMasterServer()

bool MythCoreContext::ConnectToMasterServer ( bool  blockingClient = true,
bool  openEventSocket = true 
)

◆ ConnectCommandSocket()

MythSocket * MythCoreContext::ConnectCommandSocket ( const QString &  hostname,
int  port,
const QString &  announcement,
bool proto_mismatch = nullptr,
int  maxConnTry = -1,
std::chrono::milliseconds  setup_timeout = -1ms 
)

◆ ConnectEventSocket()

MythSocket * MythCoreContext::ConnectEventSocket ( const QString &  hostname,
int  port 
)

Definition at line 545 of file mythcorecontext.cpp.

Referenced by ConnectToMasterServer().

◆ SetupCommandSocket()

bool MythCoreContext::SetupCommandSocket ( MythSocket serverSock,
const QString &  announcement,
std::chrono::milliseconds  timeout,
bool proto_mismatch 
)

Definition at line 302 of file mythcorecontext.cpp.

Referenced by ConnectCommandSocket().

◆ CheckProtoVersion()

bool MythCoreContext::CheckProtoVersion ( MythSocket socket,
std::chrono::milliseconds  timeout = kMythSocketLongTimeout,
bool  error_dialog_desired = false 
)

◆ GenMythURL()

QString MythCoreContext::GenMythURL ( const QString &  host = QString(),
int  port = 0,
QString  path = QString(),
const QString &  storageGroup = QString() 
)
static

◆ GetMasterHostPrefix()

QString MythCoreContext::GetMasterHostPrefix ( const QString &  storageGroup = QString(),
const QString &  path = QString() 
)

◆ GetMasterHostName()

QString MythCoreContext::GetMasterHostName ( void  )

◆ GetHostName()

QString MythCoreContext::GetHostName ( void  )

Definition at line 838 of file mythcorecontext.cpp.

Referenced by MusicFileScanner::AddFileToDB(), Content::AddLiveStream(), Content::AddRecordingLiveStream(), HTTPLiveStream::AddStream(), Content::AddVideoLiveStream(), ControlRequestHandler::AnnounceSocket(), MainServer::BackendQueryDiskSpace(), Playlist::changed(), check_cardsource(), StorageGroup::CheckAllStorageGroupDirs(), ChannelBase::CheckChannel(), checkImageStoragePaths(), checkStoragePaths(), CleanupMyOldInUsePrograms(), CleanupTask::CleanupOldRecordings(), clearAllKeys(), connect_to_master(), MythControls::Create(), PlaybackSettings::CreateNewPlaybackProfileSlot(), MythSessionManager::CreateUserSession(), CurrentPlaybackProfile(), StorageGroupEditor::customEvent(), GalleryThumbView::customEvent(), MythSystemEventHandler::customEvent(), BrowserApi::customEvent(), MythWebView::customEvent(), NetworkControl::customEvent(), MainServer::customEvent(), HouseKeeper::customEvent(), MusicPlayer::customEvent(), CaptureCardEditor::DeleteAllCaptureCardsOnHost(), ProgramInfo::DiscoverRecordingDirectory(), InfoList::Display(), RadioStreamUpdateTask::DoCheckRun(), StorageGroupEditor::DoDeleteSlot(), StorageGroupDirSetting::DoDeleteSlot(), MainServer::DoHandleDeleteRecording(), MainServer::DoHandleStopRecording(), StatusBox::doMachineStatus(), doUpgradeTVDatabaseSchema(), Content::DownloadFile(), V2Content::DownloadFile(), RemoteFile::Exists(), ExpertSettingsEditor::ExpertSettingsEditor(), AutoExpire::ExpireRecordings(), ExtractImage(), FillEncoderList(), Scheduler::FillRecordingDir(), CaptureCard::fillSelections(), HttpStatus::FillStatusXML(), V2Status::FillStatusXML(), findAllDBSearchGrabbers(), findAllDBTreeGrabbersByHost(), RemoteFile::FindFileList(), SourceManager::findScripts(), SourceManager::findScriptsDB(), findSearchGrabberByCommand(), findSearchGrabberInDB(), findTreeGrabberByCommand(), findTreeGrabberInDB(), FrontendActions::FrontendActions(), get_cardtype(), MainServer::GetActiveBackends(), MetaIOFLACVorbis::getAlbumArtList(), MythDisplay::GetAspectRatio(), V2Status::GetBackendStatus(), DBUtil::GetBackupDirectory(), CardUtil::GetConfiguredDVBInputs(), getDBParamters(), Dvr::GetEncoderList(), Content::GetHash(), V2Content::GetHash(), Myth::GetHostName(), V2Myth::GetHostName(), CardUtil::GetInputIDs(), MusicMetadata::getLocalFilename(), BrowserApi::GetMetadata(), Scheduler::GetNextLiveTVDir(), ProgramInfo::GetPlaybackURL(), Content::GetPreviewImage(), V2Content::GetPreviewImage(), TVRec::GetProgramRingBufferForLiveTV(), Content::GetRecording(), V2Content::GetRecording(), LogViewer::getSetting(), Myth::GetSetting(), V2Myth::GetSetting(), Frontend::GetStatus(), MythFrontendService::GetStatus(), V2Config::GetSystemEvents(), CardUtil::GetVideoDevices(), VideoSelector::getVideoListFromDB(), BrowserApi::GetVolume(), StorageGroupDirStorage::GetWhereClause(), MainServer::HandleAddChildInput(), FileServerHandler::HandleAnnounce(), MainServer::HandleAnnounce(), MainServer::HandleCheckRecordingActive(), FileServerHandler::HandleDownloadFile(), MainServer::HandleDownloadFile(), FileServerHandler::HandleFileQuery(), MainServer::HandleFillProgramInfo(), MainServer::HandleGenPreviewPixmap(), FileServerHandler::HandleGetFileList(), MainServer::HandleIsActiveBackendQuery(), MainServer::HandleLockTuner(), MainServer::HandleMusicFindAlbumArt(), MainServer::HandleMusicTagAddImage(), MainServer::HandleMusicTagChangeImage(), MainServer::HandlePixmapGetIfModified(), MainServer::HandlePixmapLastModified(), MainServer::HandleQueryCheckFile(), FileServerHandler::HandleQueryFileExists(), MainServer::HandleQueryFileExists(), FileServerHandler::HandleQueryFileHash(), MainServer::HandleQueryFileHash(), MainServer::HandleQueryFindFile(), BaseRequestHandler::HandleQueryHostname(), MainServer::HandleQueryHostname(), MainServer::HandleQueryRecordings(), MainServer::HandleScanMusic(), MainServer::HandleSGFileQuery(), MainServer::HandleSGGetFileList(), HardwareProfile::HardwareProfile(), CaptureCard::Hostname::Hostname(), HTTPLiveStream::HTTPLiveStream(), MediaServer::Init(), init_jobs(), Frontend::InitialiseActions(), MythUIThemeHelper::InitThemeHelper(), JobQueue::InJobRunWindow(), insertGrabberInDB(), IsFrontendOnly(), CardUtil::IsInputTypePresent(), IsMasterHost(), IsThisHost(), BackendSettings::Load(), StorageGroupEditor::Load(), StorageGroupListEditor::Load(), InputSelector::Load(), VideoSourceSelector::Load(), DiSEqCDevTree::Load(), VideoSourceShow::Load(), CaptureCardEditor::Load(), CardInputEditor::Load(), RecordingProfile::loadByType(), VideoSetupWizard::loadData(), ScreenSetup::loadData(), SourceSetup::loadData(), LoadFromRecorded(), main(), MainServer::MainServer(), Dvr::ManageJobQueue(), V2Dvr::ManageJobQueue(), ProgramInfo::MarkAsInUse(), BackendSettings::masterBackendChanged(), MythVideoProfile::MythVideoProfile(), ImageAdapterLocal::Notify(), BrowserApi::Pause(), BrowserApi::Play(), PlaybackProfileConfig::PlaybackProfileConfig(), PlaybackSock::PlaybackSock(), BrowserApi::PlayFile(), BrowserApi::PlayTrack(), BrowserApi::PlayURL(), VideoSetupWizard::playVideoTest(), WeatherSource::ProbeScript(), NetworkControl::processPlay(), HttpConfig::ProcessRequest(), FileServerHandler::QueryFileSystems(), HouseKeeperTask::QueryLast(), MetaIOID3::readAlbumArt(), RebuildSeekTable(), MainServer::reconnectTimeout(), JobQueue::RecoverQueue(), MythRAOPDevice::RegisterForBonjour(), RemoteGetFileList(), RemoteSendReceiveStringList(), removeGrabberFromDB(), SystemEventThread::run(), MythDownloadManager::run(), PreviewGenerator::Run(), NAMThread::run(), ReadMetaThread::run(), PreviewGenerator::RunReal(), VideoSetupWizard::save(), PlaybackProfileConfig::Save(), CaptureCard::Save(), ScreenSetup::saveData(), MusicFileScanner::ScanArtwork(), MusicFileScanner::ScanMusic(), ScanMusic(), ScanVideoDirectory(), MusicFileScanner::SearchDirs(), SendMythSystemPlayEvent(), SendSystemEvent(), SendSystemEvent(), PlayerContext::SetTVChain(), RemoteEncoder::Setup(), Weather::SetupScreens(), SourceManager::setupSources(), setupTVs(), BrowserApi::SetVolume(), CaptureCardEditor::ShowDeleteAllCaptureCardsDialogOnHost(), TV::ShowOSDPromptDeleteRecording(), TVRec::SpawnLiveTV(), MythAirplayServer::Start(), HouseKeeper::Start(), RecordingInfo::StartedRecording(), startTVNormal(), StatusBox::StatusBox(), BrowserApi::Stop(), DiSEqCDevTree::Store(), ThemeChooser::ThemeChooser(), MusicFileScanner::UpdateFileInDB(), HouseKeeperTask::UpdateLastRun(), Scheduler::WakeUpSlave(), and WasAutomaticStart().

◆ GetFilePrefix()

QString MythCoreContext::GetFilePrefix ( void  )

Definition at line 844 of file mythcorecontext.cpp.

◆ IsConnectedToMaster()

bool MythCoreContext::IsConnectedToMaster ( void  )

◆ SetAsBackend()

void MythCoreContext::SetAsBackend ( bool  backend)

Definition at line 639 of file mythcorecontext.cpp.

Referenced by main().

◆ IsBackend()

bool MythCoreContext::IsBackend ( void  ) const

◆ SetAsFrontend()

void MythCoreContext::SetAsFrontend ( bool  frontend)

Definition at line 649 of file mythcorecontext.cpp.

Referenced by main().

◆ IsFrontend()

bool MythCoreContext::IsFrontend ( void  ) const

is this process a frontend process

Definition at line 654 of file mythcorecontext.cpp.

Referenced by ConnectToMasterServer(), MythHTTPServer::Init(), and MythContextPrivate::Init().

◆ IsFrontendOnly()

bool MythCoreContext::IsFrontendOnly ( void  )

◆ IsMasterHost() [1/2]

bool MythCoreContext::IsMasterHost ( void  )

◆ IsMasterHost() [2/2]

bool MythCoreContext::IsMasterHost ( const QString &  host)

is specified host the master

Definition at line 665 of file mythcorecontext.cpp.

◆ IsMasterBackend()

bool MythCoreContext::IsMasterBackend ( void  )

◆ BackendIsRunning()

bool MythCoreContext::BackendIsRunning ( void  )
static

a backend process is running on this host

Definition at line 700 of file mythcorecontext.cpp.

Referenced by StartPrompter::handleStart(), ExitPrompter::quit(), RawSettingsEditor::Save(), and WasAutomaticStart().

◆ IsThisBackend()

bool MythCoreContext::IsThisBackend ( const QString &  addr)

is this address mapped to this backend host

Definition at line 716 of file mythcorecontext.cpp.

Referenced by RemoteFile::Exists(), and RemoteFile::FindFileList().

◆ IsThisHost() [1/2]

bool MythCoreContext::IsThisHost ( const QString &  addr)

◆ IsThisHost() [2/2]

bool MythCoreContext::IsThisHost ( const QString &  addr,
const QString &  host 
)

Definition at line 726 of file mythcorecontext.cpp.

◆ BlockShutdown()

void MythCoreContext::BlockShutdown ( void  )

Definition at line 596 of file mythcorecontext.cpp.

Referenced by MythMainWindow::ExitStandby(), and JobQueue::ProcessQueue().

◆ AllowShutdown()

void MythCoreContext::AllowShutdown ( void  )

◆ IsBlockingClient()

bool MythCoreContext::IsBlockingClient ( void  ) const

is this client blocking shutdown

Definition at line 624 of file mythcorecontext.cpp.

Referenced by JobQueue::ProcessQueue(), and Reconnect::run().

◆ SetWOLAllowed()

void MythCoreContext::SetWOLAllowed ( bool  allow)

◆ IsWOLAllowed()

bool MythCoreContext::IsWOLAllowed ( ) const

◆ SendReceiveStringList()

bool MythCoreContext::SendReceiveStringList ( QStringList &  strlist,
bool  quickTimeout = false,
bool  block = true 
)

Send a message to the backend and wait for a response.

Parameters
strlistA QStringList used for both sending commands to the backend and receiving responses from the backend.
quickTimeoutIf true, the short timeout is used while waiting for a response. If false (the default) then the long timeout is used.
blockIf true (the default) and the request sent to the backend times out, this function will attempt to reconnect and reissue the request. If false, this function will not attempt to reconnect to the backend.
See also
kShortTimeout
kLongTimeout

Definition at line 1371 of file mythcorecontext.cpp.

Referenced by MainGeneralSettings::applyChange(), ImageManagerFe::ChangeOrientation(), ImageManagerFe::ClearStorageGroup(), LyricsView::createFindLyricsMenu(), ImageManagerFe::CreateImages(), EditAlbumartDialog::customEvent(), RemoteFile::DeleteFile(), ImageManagerFe::DeleteFiles(), EditAlbumartDialog::doRemoveImageFromTag(), StatusBox::doTunerStatus(), downloadRemoteFile(), exec_program_tv_cb(), RemoteFile::FindFileList(), LyricsData::findLyrics(), MusicMetadata::getAlbumArtFile(), GetMasterHostName(), MythUIFileBrowser::GetRemoteFileList(), ImageManagerFe::HideFiles(), ImageManagerFe::IgnoreDirs(), IsFrontendOnly(), RemoteFile::LastModified(), ProgramInfo::LoadFromScheduler(), ImageManagerFe::MakeDir(), ImageManagerFe::MoveDbImages(), RemoteFile::MoveFile(), MythDirOpen(), RawSendEvent(), RemoteCancelNextRecording(), RemoteCheckFile(), RemoteCheckForRecording(), RemoteDeleteRecording(), RemoteFillProgramInfo(), RemoteGetActiveBackends(), RemoteGetExistingRecorder(), RemoteGetFileList(), RemoteGetFlags(), FileSystemInfo::RemoteGetInfo(), RemoteGetLoad(), RemoteGetMemStats(), RemoteGetPreviewIfModified(), RemoteGetPreviewLastModified(), RemoteGetRecordingList(), RemoteGetRecordingMask(), RemoteGetRecordingStatus(), RemoteGetState(), RemoteGetUptime(), VideoDialog::RemoteImageCheck(), RemoteIsBusy(), PreviewGenerator::RemotePreviewRun(), RemoteRecordings(), RemoteRecordPending(), RemoteRequestFreeInputInfo(), RemoteSendReceiveStringList(), RemoteStopLiveTV(), RemoteStopRecording(), RemoteUndeleteRecording(), ImageManagerFe::RenameFile(), SendStringListThread::run(), AlbumArtScannerThread::run(), CopyImageThread::run(), SendAsyncMessage::run(), LyricsData::save(), ImageManagerFe::ScanImagesAction(), ImageManagerFe::ScanQuery(), ScanVideos(), ScheduledRecording::SendReschedule(), ImageManagerFe::SetCover(), and StatusBox::StatusBox().

◆ SendMessage()

void MythCoreContext::SendMessage ( const QString &  message)

◆ SendEvent()

void MythCoreContext::SendEvent ( const MythEvent event)

◆ SendSystemEvent()

void MythCoreContext::SendSystemEvent ( const QString &  msg)

◆ SendHostSystemEvent()

void MythCoreContext::SendHostSystemEvent ( const QString &  msg,
const QString &  hostname,
const QString &  args 
)

Definition at line 1553 of file mythcorecontext.cpp.

◆ SetGUIObject()

void MythCoreContext::SetGUIObject ( QObject *  gui)

◆ GetGUIObject()

QObject * MythCoreContext::GetGUIObject ( void  )

◆ GetGUIContext()

QObject * MythCoreContext::GetGUIContext ( void  )

Definition at line 1748 of file mythcorecontext.cpp.

Referenced by MythSocket::Validate().

◆ HasGUI()

bool MythCoreContext::HasGUI ( void  ) const

◆ IsUIThread()

bool MythCoreContext::IsUIThread ( void  )

◆ GetDB()

MythDB * MythCoreContext::GetDB ( void  )

◆ GetDBManager()

MDBManager * MythCoreContext::GetDBManager ( void  )

Definition at line 865 of file mythcorecontext.cpp.

Referenced by MythContextPrivate::ResetDatabase().

◆ GetScheduler()

MythScheduler * MythCoreContext::GetScheduler ( void  )

◆ IsDatabaseIgnored()

bool MythCoreContext::IsDatabaseIgnored ( void  ) const

/brief Returns true if database is being ignored.

This was created for some command line only programs which still need MythTV libraries, such as channel scanners, channel change programs, and the off-line commercial flagger.

Definition at line 876 of file mythcorecontext.cpp.

Referenced by MythDVDPlayer::GetBookmark(), MythBDPlayer::GetBookmark(), MythPlayer::GetBookmark(), PlayerContext::GetFilters(), DeleteMap::IsSaved(), DeleteMap::LoadAutoSaveMap(), DeleteMap::LoadMap(), MythPlayer::OpenFile(), ProgramInfo::ProgramInfo(), ProgramInfo::QueryTotalDuration(), run_backend(), DeleteMap::SaveMap(), and PlayerContext::SetPlayingInfo().

◆ SaveSetting() [1/2]

void MythCoreContext::SaveSetting ( const QString &  key,
int  newValue 
)

Definition at line 881 of file mythcorecontext.cpp.

Referenced by AirPlayHardwareId(), ThemeUpdateChecker::checkForUpdate(), ThemeChooser::customEvent(), GalleryThumbView::customEvent(), EditAlbumartDialog::customEvent(), HardwareProfile::DeleteProfile(), doBurnDVD(), ParentalLevelChangeCheckerPrivate::DoCheck(), doNativeArchive(), GalleryThumbView::DoRepeat(), GalleryThumbView::DoShowType(), doUpgradeMusicDatabaseSchema(), MythUIThemeHelper::FindMenuThemeDir(), getTempDirectory(), Spectrogram::handleKeyPress(), handleMedia(), TV::HandleOSDClosed(), ProgramRecPriority::keyPressEvent(), ThemeChooser::LoadVersion(), main(), mythplugin_init(), ParentalLevelChangeCheckerPrivate::OnPasswordEntered(), MythPlayer::OpenFile(), PlaybackBox::PlaybackBox(), PlaylistEditorView::PlaylistEditorView(), ManualSchedule::recordClicked(), ThemeChooser::refreshDownloadableThemes(), GallerySlideView::RepeatOn(), MythBurn::runScript(), AudioSetupWizard::save(), RawSettingsEditor::Save(), ThemeChooser::saveAndReload(), VideoFilterSettings::saveAsDefault(), MythVideoBounds::SaveBottomLine(), DVDThemeSelector::saveConfiguration(), SelectDestination::saveConfiguration(), GlobalSetup::saveData(), ZMClient::saveNotificationMonitors(), MusicPlayer::savePosition(), VideoDialog::SavePosition(), PlaylistEditorView::saveTreePosition(), MythVideoColourSpace::SaveValue(), PlaybackBox::saveViewChanges(), GalleryThumbView::SelectZoomWidget(), PlaybackBox::setGroupFilter(), ImportMusicDialog::setSaveHost(), Ripper::setSaveHost(), AudioOutputBase::SetSWVolume(), MythFontProperties::SetZoom(), MythUIWebBrowser::SetZoom(), SubtitleScreen::SetZoom(), ScreenWizard::slotResetSettings(), VisualizationSettings::slotSave(), RatingSettings::slotSave(), GeneralSettings::slotSave(), ImportSettings::slotSave(), MetadataSettings::slotSave(), PlayerSettings::slotSave(), GrabberSettings::slotSave(), BrowserConfig::slotSave(), ScreenWizard::slotSaveSettings(), HardwareProfile::SubmitProfile(), VideoDialog::SwitchLayout(), NetTree::SwitchView(), ThemeUpdateChecker::ThemeUpdateChecker(), VideoDialog::ToggleBrowseMode(), VideoDialog::ToggleFlatView(), TV::UpdateChannelList(), MusicFileScanner::updateLastRunEnd(), MusicFileScanner::updateLastRunStart(), MusicFileScanner::updateLastRunStatus(), ArchiveFileSelector::~ArchiveFileSelector(), ChannelRecPriority::~ChannelRecPriority(), GuideGrid::~GuideGrid(), ImportMusicDialog::~ImportMusicDialog(), LogViewer::~LogViewer(), MainVisual::~MainVisual(), MusicPlayer::~MusicPlayer(), PrevRecordedList::~PrevRecordedList(), StatusBox::~StatusBox(), VideoDialogPrivate::~VideoDialogPrivate(), ZMEvents::~ZMEvents(), and ZMLivePlayer::~ZMLivePlayer().

◆ SaveSetting() [2/2]

void MythCoreContext::SaveSetting ( const QString &  key,
const QString &  newValue 
)

Definition at line 886 of file mythcorecontext.cpp.

◆ GetSetting()

QString MythCoreContext::GetSetting ( const QString &  key,
const QString &  defaultval = "" 
)

Definition at line 898 of file mythcorecontext.cpp.

Referenced by HTTPRequest::AddCORSHeaders(), MusicFileScanner::AddFileToDB(), AirPlayHardwareId(), VideoPlayerCommandPrivate::AltPlayerFor(), ArchiveFileSelector::ArchiveFileSelector(), AudioDeviceComboBox::AudioDeviceComboBox(), AudioLanguage(), StartPrompter::backendRunningPrompt(), DBUtil::BackupDB(), MythHTTPServer::BuildOrigins(), GameUI::BuildTree(), burnISOImage(), DiSEqCDevRotor::CalculateAzimuth(), LogViewer::cancelClicked(), CDRipperThread::CDRipperThread(), ThemeUpdateChecker::checkForUpdate(), Scheduler::CheckShutdownServer(), ClassicLogoDetector::ClassicLogoDetector(), SchemaUpgradeWizard::Compare(), RecordingProfile::CompleteLoad(), ConnectCommandSocket(), ImageScanThread< ImageDbSg >::CountFiles(), ImportSettings::Create(), GeneralSettings::Create(), PlayerSettings::Create(), ManualSchedule::Create(), BrowserConfig::Create(), ImportMusicDialog::Create(), PlaylistEditorView::Create(), createISOImage(), PlaybackBox::createJobMenu(), PlaybackBox::createPlaylistJobMenu(), IdleScreen::customEvent(), WelcomeDialog::customEvent(), GalleryThumbView::customEvent(), MythSystemEventHandler::customEvent(), MusicCommon::customEvent(), MediaMonitor::defaultDevice(), DBUtil::DoBackup(), BurnMenu::doBurn(), ParentalLevelChangeCheckerPrivate::DoCheck(), RadioStreamUpdateTask::DoCheckRun(), MythFillDatabaseTask::DoCheckRun(), ZMClient::doGetMonitorList(), NativeArchive::doImportArchive(), StatusBox::doListingsStatus(), StatusBox::doMachineStatus(), MythFillDatabaseTask::DoRun(), doUpgradeMusicDatabaseSchema(), doUpgradeTVDatabaseSchema(), doUpgradeVideoDatabaseSchema(), ScheduleCommon::EditRecording(), MythMainWindow::EnterStandby(), NativeArchive::exportRecording(), NativeArchive::exportVideo(), filenameFromMetadata(), Scheduler::FillRecordingDir(), HttpStatus::FillStatusXML(), V2Status::FillStatusXML(), EditMetadataDialog::FindBanner(), EditRomInfoDialog::FindBoxart(), EditMetadataDialog::FindCoverArt(), EditRomInfoDialog::FindFanart(), EditMetadataDialog::FindFanart(), StorageGroup::FindFileDir(), EditRomInfoDialog::FindScreenshot(), EditMetadataDialog::FindScreenshot(), EditMetadataDialog::FindTrailer(), ImportNative::finishedPressed(), HardwareProfile::GetAdminPasswordFromFile(), GetAudioLanguageAndVariant(), V2Status::GetBackendStatus(), V2Video::GetBluray(), Video::GetBluray(), Myth::GetConnectionInfo(), V2Myth::GetConnectionInfo(), ZMEvents::getDateList(), MythBurn::getDefaultProfile(), MythDisplay::GetDesiredScreen(), getFileDetails(), GetFilePrefix(), ChannelInfo::GetFormatted(), ImageManagerFe::getInstance(), JobQueue::GetJobCommand(), JobQueue::GetJobDescription(), GetLanguageAndVariant(), getLocalWritePath(), GetMasterServerIP(), GetMasterServerPort(), MythVAAPIContext::GetProfiles(), HardwareProfile::GetProfileURL(), MythFEXML::GetScreenShot(), getTempDirectory(), MetaGrabberScript::GetType(), GetVideoDirsByHost(), GuiVidModeResolution(), MythBurn::handleAddFile(), MainServer::HandleGoToSleep(), Scheduler::HandleIdleShutdown(), MainServer::HandleMusicFindAlbumArt(), MythAirplayServer::HandleResponse(), Scheduler::HandleRunSchedulerStartup(), HardwareProfile::HardwareProfile(), MythVAAPIContext::HaveVAAPI(), MythNVDECContext::HwDecoderInit(), GalleryThumbView::Import(), ImportMusicDialog::ImportMusicDialog(), NativeArchive::importVideo(), StorageGroup::Init(), MythTranslationPrivate::Init(), GrabberSettings::Init(), AudioSetupWizard::Init(), ThemeChooser::Init(), V4LChannel::Init(), LCDProcClient::init(), TVRec::Init(), MythVAAPIContext::InitialiseContext2(), InitializeDatabase(), ChannelBase::InitializeInput(), V4LChannel::InitializeInputs(), EditPowerSearchPopup::initLists(), MythHTTPS::InitSSLServer(), MythUIThemeHelper::InitThemeHelper(), JobQueue::InJobRunWindow(), MusicFileScanner::IsArtFile(), DBUtil::IsBackupInProgress(), IsMasterHost(), ISO639_fill_selections(), iso639_get_language_list(), MusicFileScanner::IsRunning(), JobAllowUserJob(), JobQueue::JobText(), WelcomeDialog::keyPressEvent(), MusicCommon::keyPressEvent(), MythTranslation::LanguageChanged(), RawSettingsEditor::Load(), AudioConfigSettings::Load(), PostProcMixin::Load(), TransFreqTableSelector::Load(), DVDThemeSelector::loadConfiguration(), SelectDestination::loadConfiguration(), ExportNative::loadConfiguration(), MythBurn::loadConfiguration(), VideoDialog::loadData(), MythBurn::loadEncoderProfiles(), LoadFromProgram(), LCDProcClient::loadSettings(), HttpServer::LoadSSLConfig(), TextSubtitleParser::LoadSubtitles(), ThemeUpdateTask::LoadVersion(), ThemeChooser::LoadVersion(), main(), Dvr::ManageJobQueue(), V2Dvr::ManageJobQueue(), MediaMonitor::MediaMonitor(), GalleryThumbView::MenuAction(), MusicPlayer::MusicPlayer(), MythLanguage(), MythPlayer::MythPlayer(), MythPlayerVisualiserUI::MythPlayerVisualiserUI(), mythplugin_init(), MythSortHelper::MythSortHelper(), MythVAAPIInteropDRM::MythVAAPIInteropDRM(), MythVideoColourSpace::MythVideoColourSpace(), MythCECAdapter::Open(), MythRAOPConnection::OpenAudioDevice(), AudioOutputCA::OpenDevice(), MythBDBuffer::OpenFile(), MythDVDBuffer::OpenFile(), AudioOutputALSA::OpenMixer(), MusicPlayer::openOutputDevice(), ParentalLevelChangeCheckerPrivate::ParentalLevelChangeCheckerPrivate(), PlaybackBox::PlaybackBox(), playDisc(), VideoPlayerCommandPrivate::PlayerFor(), HttpStatus::PrintMachineInfo(), V2Status::PrintMachineInfo(), MythRAOPConnection::ProcessRequest(), Myth::ProfileUpdated(), V2Myth::ProfileUpdated(), ProgramInfo::ProgramInfo(), LanguageSelection::prompt(), DBUtil::QueryDBMSVersion(), ExitPrompter::quit(), AudioOutputBase::Reconfigure(), RecordingInfo::RecordingInfo(), reloadTheme(), MusicFileScanner::RemoveFileFromDB(), NetStream::Request(), resolveSettingAddress(), Ripper::Ripper(), CDRipperThread::ripTrack(), CDRipperThread::run(), WelcomeDialog::runMythFillDatabase(), runTestDVD(), TransFreqTableSelector::Save(), ThemeChooser::saveAndReload(), ImportCoverArtDialog::scanDirectory(), MusicFileScanner::SearchDirs(), MusicMetadata::setArtistAndTrackFormats(), ZMLivePlayer::setMonitorLayout(), MpegRecorder::SetOptionsFromProfile(), ImportRecorder::SetOptionsFromProfile(), DTVRecorder::SetOptionsFromProfile(), V4L2encRecorder::SetOptionsFromProfile(), ASIRecorder::SetOptionsFromProfile(), NuppelVideoRecorder::SetOptionsFromProfile(), HTTPLiveStream::SetOutputVars(), ScanWizard::SetPaneDefaults(), StartingChannel::SetSourceID(), setting_to_localtime(), setting_to_qdatetime(), MythPlayerAudioUI::SetupAudioOutput(), LCDProcClient::SetupLCD(), ZMClient::setupZMClient(), AudioOutputPulseAudio::SetVolumeChannel(), ProgFinder::ShowGuide(), VideoDialog::ShowHomepage(), GalleryThumbView::ShowSettings(), ViewScheduleDiff::showStatus(), NetBase::ShowWebVideo(), shutdown(), WelcomeDialog::shutdownNow(), Scheduler::ShutdownServer(), BookmarkManager::slotBookmarkClicked(), GeneralSetupWizard::slotDelete(), BookmarkManager::slotShowMarked(), GeneralSetupWizard::slotView(), MythDisplay::SpanAllScreens(), BurnMenu::start(), EditAlbumartDialog::startCopyImageToTag(), startDatabaseTree(), MythDVDBuffer::StartFromBeginning(), WelcomeDialog::startFrontend(), startGuide(), StartPrompter::stopBackend(), MythContextPrivate::TestDBconnection(), ProgramInfo::ToMap(), MythDate::toString(), Transcode::TranscodeFile(), GameHandler::UpdateGameDB(), MythPlayerOverlayUI::UpdateSliderInfo(), MusicMetadata::updateStreamList(), PlaybackBox::UpdateUILists(), UpgradeArchiveDatabaseSchema(), UpgradeBrowserDatabaseSchema(), UpgradeGameDatabaseSchema(), UpgradeNewsDatabaseSchema(), VAAPIDevice(), VideoDialogPrivate::VideoDialogPrivate(), VolumeBase::VolumeBase(), AudioOutputOSS::VolumeInit(), AudioOutputJACK::VolumeInit(), WasAutomaticStart(), and Scheduler::WasStartedAutomatically().

◆ SaveDurSetting()

template<typename T >
std::enable_if_t<std::chrono::__is_duration<T>::value, void> MythCoreContext::SaveDurSetting ( const QString &  key,
newValue 
)
inline

◆ SaveSettingOnHost()

bool MythCoreContext::SaveSettingOnHost ( const QString &  key,
const QString &  newValue,
const QString &  host 
)

◆ SaveBoolSetting()

void MythCoreContext::SaveBoolSetting ( const QString &  key,
bool  newValue 
)
inline

◆ GetBoolSetting() [1/2]

bool MythCoreContext::GetBoolSetting ( const QString &  key,
bool  defaultval = false 
)

Definition at line 906 of file mythcorecontext.cpp.

Referenced by Content::AddRecordingLiveStream(), JobQueue::AllowedToRun(), AudioOutputALSA::AudioOutputALSA(), AudioOutputBase::AudioOutputBase(), AudioPlayer::AudioPlayer(), DBUtil::BackupDB(), ServerPool::bind(), GameUI::BuildTree(), AudioOutputBase::CanPassthrough(), WelcomeDialog::checkAutoStart(), Scheduler::CheckShutdownServer(), CheckSubnet(), ClassicCommDetector::ClassicCommDetector(), CompleteJob(), LCDProcClient::connectToHost(), GameUI::Create(), VideoDialog::Create(), PlaybackBox::Create(), VideoDialog::CreatePlayMenu(), MainServer::customEvent(), ServerPool::DefaultBroadcast(), ThemeUpdateTask::DoCheckRun(), ArtworkTask::DoCheckRun(), MythFillDatabaseTask::DoCheckRun(), MainServer::DoDeleteThread(), PlaybackBox::doJobQueueJob(), PlaybackBox::doPlaylistJobQueueJob(), MainServer::DoTruncateThread(), doUpgradeTVDatabaseSchema(), EITHelper::EITHelper(), Ripper::ejectCD(), AutoExpire::ExpireEpisodesOverMax(), filenameFromMetadata(), AutoExpire::FillDBOrdered(), TV::FillOSDMenuJumpRec(), HttpStatus::FillStatusXML(), V2Status::FillStatusXML(), V2Status::GetBackendStatus(), ImageManagerFe::getInstance(), JobQueue::GetJobsInQueue(), AudioOutputSettings::GetMaxHDRate(), ProgramInfo::GetPlaybackURL(), MusicPlayer::getPlayNow(), Content::GetPreviewImage(), V2Content::GetPreviewImage(), Content::GetRecording(), V2Content::GetRecording(), AudioOutputSettings::GetUsers(), PrePostRollFlagger::go(), ClassicCommDetector::go(), MainServer::HandleDeleteFile(), handleGalleryMedia(), Scheduler::HandleIdleShutdown(), handleMedia(), MythAirplayServer::HandleResponse(), MythRAOPConnection::Init(), MusicCommon::init(), PlaybackBox::Init(), MythUIWebBrowser::Init(), TVRec::Init(), MPEG2fixup::InitAV(), UPnp::Initialize(), MythUIScreenBounds::InitScreenBounds(), AudioOutputBase::InitSettings(), LinuxFirewireDevice::LinuxFirewireDevice(), ServerPool::listen(), main(), MainServer::MainServer(), MediaMonitorUnix::MediaMonitorUnix(), GallerySlideView::MenuMain(), GalleryThumbView::MenuSlideshow(), MusicCommon::MusicCommon(), MythOpenGLVideo::MythOpenGLVideo(), MythPlayer::MythPlayer(), MythPlayerCaptionsUI::MythPlayerCaptionsUI(), mythplugin_init(), MythSortHelper::MythSortHelper(), MythVideoColourSpace::MythVideoColourSpace(), MythVideoGPU::MythVideoGPU(), NetTree::NetTree(), MythCECAdapter::Open(), MythRAOPConnection::OpenAudioDevice(), AvFormatDecoder::OpenFile(), MusicPlayer::openOutputDevice(), PlaybackBox::Play(), PlaybackBox::PlaybackBox(), PlaybackState::PlaybackState(), MythPlayer::PrebufferEnoughFrames(), MythRAOPConnection::ProcessRequest(), ProgramRecPriority::ProgramRecPriority(), JobQueue::QueueJobs(), JobQueue::QueueRecordingJobs(), AudioOutputBase::Reconfigure(), JobQueue::RecoverQueue(), MythRAOPDevice::RegisterForBonjour(), Ripper::RipComplete(), CDRipperThread::run(), Scheduler::run(), ServerPool::SelectDefaultListen(), MythRAOPConnection::SendNotification(), PlaybackBox::setGroupFilter(), MythPlayerAudioUI::SetupAudioOutput(), GallerySlideView::ShowNextSlide(), ThemeChooser::showPopupMenu(), Scheduler::ShutdownServer(), GallerySlideView::SlideAvailable(), MediaMonitor::StartMonitoring(), MHInteractionChannel::status(), ThemeChooser::toggleThemeUpdateNotifications(), AudioConfigSettings::UpdateCapabilities(), VideoDialog::UpdateWatchedState(), MythFillDatabaseTask::UseSuggestedTime(), MythDisplayOSX::UsingVideoModes(), MythDisplayX11::UsingVideoModes(), MythDisplayRPI::UsingVideoModes(), MythDisplayDRM::UsingVideoModes(), MythDisplayMutter::UsingVideoModes(), VideoDialogPrivate::VideoDialogPrivate(), VideoListImp::VideoListImp(), VideoDialog::VideoMenu(), VideoScannerThread::VideoScannerThread(), VolumeBase::VolumeBase(), and GuideGrid::~GuideGrid().

◆ GetNumSetting() [1/2]

int MythCoreContext::GetNumSetting ( const QString &  key,
int  defaultval = 0 
)

Definition at line 912 of file mythcorecontext.cpp.

Referenced by HTTPRequest::AddCORSHeaders(), Scheduler::AddNewRecords(), AudioOutputBase::AudioOutputBase(), AudioTest::AudioTest(), BlankFrameDetector::BlankFrameDetector(), BorderDetector::BorderDetector(), burnISOImage(), AutoExpire::CalcParams(), ChannelRecPriority::ChannelRecPriority(), ClassicCommDetector::ClassicCommDetector(), ClassicLogoDetector::ClassicLogoDetector(), CleanupTask::CleanupProgramListings(), ConnectCommandSocket(), AudioOutputPulseAudio::ConnectPlaybackStream(), VisualizationSettings::Create(), RatingSettings::Create(), ImportSettings::Create(), GeneralSettings::Create(), PlayerSettings::Create(), MetadataSettings::Create(), AudioSetupWizard::Create(), ManualSchedule::Create(), GalleryThumbView::Create(), ZMEvents::Create(), BrowserConfig::Create(), VideoDialog::Create(), ZMLivePlayer::Create(), Ripper::Create(), IdleScreen::customEvent(), WelcomeDialog::customEvent(), MainServer::customEvent(), DeleteThread::DeleteThread(), DetectLetterbox::DetectLetterbox(), ParentalLevelChangeCheckerPrivate::DoCheck(), HardwareProfileTask::DoCheckRun(), MythUDPListener::DoEnable(), MainServer::DoHandleUndeleteRecording(), doUpgradeTVDatabaseSchema(), DTVRecorder::DTVRecorder(), EITHelper::EITHelper(), SubtitleScreen::EnableSubtitles(), MythMainWindow::ExitStandby(), AutoExpire::FillDBOrdered(), AutoExpire::FillExpireList(), Scheduler::FillRecordingDir(), PlayerSettings::fillRegionList(), FlagCommercials(), AutoExpire::GetAllExpiring(), GetBoolSetting(), ImageManagerFe::getInstance(), PreviewGeneratorQueue::GetPreviewImage(), HttpServer::GetSocketTimeout(), AudioOutputSettings::GetUsers(), ClassicCommDetector::go(), Goom::Goom(), handleDVDMedia(), ExitPrompter::HandleExit(), TV::HandleStateChange(), HardwareProfile::HardwareProfile(), HistogramAnalyzer::HistogramAnalyzer(), HttpStatus::HttpStatus(), MythMainWindow::IdleTimeout(), GallerySettings::ImageSizeChanged(), GrabberSettings::Init(), AudioSetupWizard::Init(), StatusBox::Init(), MythHTTPServer::Init(), PlaybackBox::Init(), MythUIWebBrowser::Init(), TVRec::Init(), ClassicCommDetector::Init(), TV::InitKeys(), MythUIScreenBounds::InitScreenBounds(), RecordingQuality::IsDamaged(), IsMasterHost(), JobQueue::JobQueue(), LinuxFirewireDevice::LinuxFirewireDevice(), SelectDestination::loadConfiguration(), GlobalSetup::loadData(), LoadFromOldRecorded(), LoadFromRecorded(), MusicPlayer::loadPlaylist(), MusicPlayer::loadSettings(), ThemeChooser::LoadVersion(), main(), MainVisual::MainVisual(), GalleryThumbView::MenuShow(), GalleryThumbView::MenuSlideshow(), MythPlayer::MythPlayer(), MythVideoBounds::MythVideoBounds(), MythVideoColourSpace::MythVideoColourSpace(), nearestName(), NetTree::NetTree(), MythCECAdapter::Open(), AudioOutputALSA::OpenDevice(), AudioOutputCA::OpenDevice(), MythBDBuffer::OpenFile(), AudioOutputALSA::OpenMixer(), MusicPlayer::openOutputDevice(), MythDisplay::PauseForModeSwitch(), PlaybackBox::PlaybackBox(), VideoDialog::playVideoWithTrailers(), ProgDetails::PowerPriorities(), PrevRecordedList::PrevRecordedList(), NetworkControl::processQuery(), JobQueue::ProcessQueue(), ProgramRecPriority::ProgramRecPriority(), JobQueue::QueueJobs(), MetaIO::readMetadata(), AudioOutputBase::Reconfigure(), RecordingQuality::RecordingQuality(), MHIContext::Reinit(), RemoteUndeleteRecording(), MusicPlayer::restorePosition(), run_backend(), AutoExpire::RunExpirer(), RunNetTree(), GuideGrid::RunProgramGuide(), RunVideoScreen(), SceneChangeDetector::SceneChangeDetector(), Scheduler::SchedNewRecords(), SchemaUpgradeWizard::SchemaUpgradeWizard(), SendReceiveStringList(), PlayerContext::SetInitialTVState(), setScheduledWakeupTime(), DeviceReadBuffer::Setup(), MythPlayerAudioUI::SetupAudioOutput(), LCDProcClient::SetupLCD(), ZMClient::setupZMClient(), MythVideoBounds::SetVideoScalingAllowed(), GalleryThumbView::ShowSettings(), WelcomeDialog::shutdownNow(), Scheduler::ShutdownServer(), Spectrogram::Spectrogram(), GallerySlideView::Start(), startAppearWiz(), StatusBox::StatusBox(), TemplateFinder::TemplateFinder(), TemplateMatcher::TemplateMatcher(), MythContextPrivate::TestDBconnection(), MythVideoBounds::ToggleMoveBottomLine(), Transcode::TranscodeFile(), GalleryThumbView::UpdateImageItem(), UpdateRadioStreams(), MythUIScreenBounds::UpdateScreenSettings(), PlaybackBox::UpdateUILists(), V2Status::V2Status(), VideoDialogPrivate::VideoDialogPrivate(), VideoFilterSettings::VideoFilterSettings(), AudioOutputOSS::VolumeInit(), AudioOutputJACK::VolumeInit(), and MythFontProperties::Zoom().

◆ GetDurSetting()

template<typename T >
std::enable_if_t<std::chrono::__is_duration<T>::value, T> MythCoreContext::GetDurSetting ( const QString &  key,
defaultval = T::zero() 
)
inline

◆ GetBoolSetting() [2/2]

int MythCoreContext::GetBoolSetting ( const QString &  key,
int  defaultval 
)
delete

◆ GetNumSetting() [2/2]

bool MythCoreContext::GetNumSetting ( const QString &  key,
bool  defaultvalue 
)
delete

◆ GetFloatSetting()

double MythCoreContext::GetFloatSetting ( const QString &  key,
double  defaultval = 0.0 
)

Definition at line 919 of file mythcorecontext.cpp.

Referenced by MythUIWebBrowser::Init().

◆ GetResolutionSetting() [1/2]

void MythCoreContext::GetResolutionSetting ( const QString &  type,
int &  width,
int &  height,
double &  forced_aspect,
double &  refresh_rate,
int  index = -1 
)

◆ GetResolutionSetting() [2/2]

void MythCoreContext::GetResolutionSetting ( const QString &  type,
int &  width,
int &  height,
int  index = -1 
)

Definition at line 859 of file mythcorecontext.cpp.

◆ GetSettingOnHost()

QString MythCoreContext::GetSettingOnHost ( const QString &  key,
const QString &  host,
const QString &  defaultval = "" 
)

◆ GetBoolSettingOnHost() [1/2]

bool MythCoreContext::GetBoolSettingOnHost ( const QString &  key,
const QString &  host,
bool  defaultval = false 
)

Definition at line 935 of file mythcorecontext.cpp.

Referenced by Dvr::ManageJobQueue(), and V2Dvr::ManageJobQueue().

◆ GetNumSettingOnHost() [1/2]

int MythCoreContext::GetNumSettingOnHost ( const QString &  key,
const QString &  host,
int  defaultval = 0 
)

◆ GetBoolSettingOnHost() [2/2]

int MythCoreContext::GetBoolSettingOnHost ( const QString &  key,
const QString &  host,
int  defaultval 
)
delete

◆ GetNumSettingOnHost() [2/2]

bool MythCoreContext::GetNumSettingOnHost ( const QString &  key,
const QString &  host,
bool  defaultval = false 
)
delete

◆ GetFloatSettingOnHost()

double MythCoreContext::GetFloatSettingOnHost ( const QString &  key,
const QString &  host,
double  defaultval = 0.0 
)

Definition at line 952 of file mythcorecontext.cpp.

Referenced by MythDisplay::GetAspectRatio().

◆ GetBackendServerIP() [1/2]

QString MythCoreContext::GetBackendServerIP ( void  )

◆ GetBackendServerIP() [2/2]

QString MythCoreContext::GetBackendServerIP ( const QString &  host)

Returns the IP address of backend "host" If an IPv6 address has been defined, will use it whenever possible, unless the IPv6 address is a localhost address, in which case the IPv4 address will be used.

Will return an empty string if neither an IPv4 nor an IPv6 address has been defined. The address returned is free of scope Id if IPv6

Definition at line 1018 of file mythcorecontext.cpp.

◆ GetBackendServerIP4() [1/2]

QString MythCoreContext::GetBackendServerIP4 ( void  )

Returns the IPv4 address defined for the current host see GetBackendServerIP4(host)

Definition at line 1027 of file mythcorecontext.cpp.

Referenced by IsMasterHost().

◆ GetBackendServerIP4() [2/2]

QString MythCoreContext::GetBackendServerIP4 ( const QString &  host)

Returns the IPv4 address defined for the backend "host".

Parameters
hostThe name of the host to lookup
Returns
An empty string if the defined IP is invalid

Definition at line 1037 of file mythcorecontext.cpp.

◆ GetBackendServerIP6() [1/2]

QString MythCoreContext::GetBackendServerIP6 ( void  )

Returns the IPv6 address defined for the current host see GetBackendServerIP6(host)

Definition at line 1046 of file mythcorecontext.cpp.

Referenced by IsMasterHost().

◆ GetBackendServerIP6() [2/2]

QString MythCoreContext::GetBackendServerIP6 ( const QString &  host)

Returns the IPv6 address defined for the backend "host".

returns an empty string if the defined IP is invalid. The IP address returned doesn't contain a scope Id

Definition at line 1056 of file mythcorecontext.cpp.

◆ GetMasterServerIP()

QString MythCoreContext::GetMasterServerIP ( void  )

Returns the Master Backend IP address If the address is an IPv6 address, the scope Id is removed.

If no master server address has been defined in the database, return localhost

Definition at line 966 of file mythcorecontext.cpp.

Referenced by HTTPRequest::AddCORSHeaders(), UPNPScanner::AddServer(), connect_to_master(), ConnectToMasterServer(), OutboundRequestHandler::DoConnectToMaster(), HttpStatus::FillStatusXML(), V2Status::FillStatusXML(), V2Status::GetBackendStatus(), GetMythXMLURL(), MythHTTPServer::Init(), MainServer::reconnectTimeout(), HTTPLiveStream::SetOutputVars(), and UPNPScanner::Start().

◆ GetMasterServerPort()

int MythCoreContext::GetMasterServerPort ( void  )
static

◆ GetMasterServerStatusPort()

int MythCoreContext::GetMasterServerStatusPort ( void  )

Returns the Master Backend status port If no master server status port has been defined in the database, return the default 6544.

Definition at line 993 of file mythcorecontext.cpp.

Referenced by HTTPRequest::AddCORSHeaders(), UPNPScanner::AddServer(), HttpStatus::FillStatusXML(), V2Status::FillStatusXML(), GetMythXMLURL(), MythHTTPServer::Init(), HTTPLiveStream::SetOutputVars(), and UPNPScanner::Start().

◆ GetBackendServerPort() [1/2]

int MythCoreContext::GetBackendServerPort ( void  )

◆ GetBackendServerPort() [2/2]

int MythCoreContext::GetBackendServerPort ( const QString &  host)

Returns the backend "hosts"'s control port.

Definition at line 1079 of file mythcorecontext.cpp.

◆ ClearBackendServerPortCache()

void MythCoreContext::ClearBackendServerPortCache ( )
static

◆ GetBackendStatusPort() [1/2]

int MythCoreContext::GetBackendStatusPort ( void  )

◆ GetBackendStatusPort() [2/2]

int MythCoreContext::GetBackendStatusPort ( const QString &  host)

Returns the backend "hosts"'s status port.

Definition at line 1100 of file mythcorecontext.cpp.

◆ GetScopeForAddress()

bool MythCoreContext::GetScopeForAddress ( QHostAddress &  addr) const

Return the cached scope Id for the given address.

If unknown returns false, else returns true and set scope Id to given address

Definition at line 1109 of file mythcorecontext.cpp.

Referenced by PortChecker::checkPort().

◆ SetScopeForAddress() [1/2]

void MythCoreContext::SetScopeForAddress ( const QHostAddress &  addr)

Record the scope Id of the given IP address.

Parameters
addrA QHostAddress that contains both the host address and the scope to record.

Definition at line 1129 of file mythcorecontext.cpp.

Referenced by PortChecker::checkPort().

◆ SetScopeForAddress() [2/2]

void MythCoreContext::SetScopeForAddress ( const QHostAddress &  addr,
int  scope 
)

Record the scope Id of the given IP address.

Parameters
addrA QHostAddress containing the host address to record.
scopeThe scope value to record.

Definition at line 1143 of file mythcorecontext.cpp.

◆ resolveSettingAddress()

QString MythCoreContext::resolveSettingAddress ( const QString &  name,
const QString &  host = QString(),
ResolveType  type = ResolveAny,
bool  keepscope = false 
)

Retrieve IP setting "name" for "host".

If host is empty retrieve for local machine. The value returned for the given setting name, will be returned if it's an IP address or resolved otherwise. If the setting's value is null, an empty string will be returned, or if the name can't be resolved, localhost will be returned. If type == 0 an IPv4 will be returned If type == 1 an IPv6 will be returned If type < 0, either IPv4 or IPv6 will be returned with a priority given to IPv6 If keepscope boolean is clear (default), the scopeId will be removed

Definition at line 1163 of file mythcorecontext.cpp.

Referenced by GetBackendServerIP(), GetBackendServerIP4(), GetBackendServerIP6(), GetMasterServerIP(), IsMasterHost(), MainServer::MainServer(), and ServerPool::SelectDefaultListen().

◆ resolveAddress()

QString MythCoreContext::resolveAddress ( const QString &  host,
ResolveType  type = ResolveAny,
bool  keepscope = false 
)
static

if host is an IP address, it will be returned or resolved otherwise.

If host is empty, an empty string will be returned, if host can't be resolved, localhost will be returned. If type == 0 an IPv4 will be returned or 127.0.0.1 If type == 1 an IPv6 will be returned or ::1 If type < 0 (default), either IPv4 or IPv6 will be returned with a priority given to IPv6 If keepscope boolean is clear (default), the scopeId will be removed

Definition at line 1192 of file mythcorecontext.cpp.

Referenced by IsMasterHost(), IsThisHost(), ping(), resolveSettingAddress(), and BackendSettings::Save().

◆ CheckSubnet() [1/2]

bool MythCoreContext::CheckSubnet ( const QAbstractSocket *  socket)

Check if a socket is connected to an approved peer.

There is a setting called AllowConnFromAll. If it is true, then no check needs to be done. If false, check that the connection comes from a subnet to which I am connected.

Parameters
socketin Socket to check.
Returns
true if the connection is allowed, false if not.

Definition at line 1268 of file mythcorecontext.cpp.

Referenced by MythHTTPSocket::MythHTTPSocket(), MythSocket::MythSocket(), ServerPool::newTcpConnection(), ServerPool::newUdpDatagram(), HttpWorker::run(), and WebSocketWorker::SetupSocket().

◆ CheckSubnet() [2/2]

bool MythCoreContext::CheckSubnet ( const QHostAddress &  peer)

Check if aa ip address is approved.

There is a setting called AllowConnFromAll. If it is true, then no check needs to be done. If false, check that the connection comes from a subnet to which I am connected.

Parameters
peerin Host Address to check.
Returns
true if the connection is allowed, false if not.

Definition at line 1285 of file mythcorecontext.cpp.

◆ ClearSettingsCache()

void MythCoreContext::ClearSettingsCache ( const QString &  myKey = QString(""))

◆ ActivateSettingsCache()

void MythCoreContext::ActivateSettingsCache ( bool  activate = true)

◆ OverrideSettingForSession()

void MythCoreContext::OverrideSettingForSession ( const QString &  key,
const QString &  value 
)

◆ ClearOverrideSettingForSession()

void MythCoreContext::ClearOverrideSettingForSession ( const QString &  key)

Definition at line 1343 of file mythcorecontext.cpp.

◆ dispatch()

void MythCoreContext::dispatch ( const MythEvent event)

Definition at line 1719 of file mythcorecontext.cpp.

Referenced by LiveTVChain::BroadcastUpdate(), MainServer::connectionClosed(), connectionClosed(), MythWebView::customEvent(), MainServer::customEvent(), MusicPlayer::customEvent(), Dvr::DeleteRecording(), V2Dvr::DeleteRecording(), MythMainWindow::ExitToMainMenu(), AutoExpire::ExpireEpisodesOverMax(), TVRec::FinishedRecording(), RecordingExtender::finishRecording(), BrowserApi::GetMetadata(), TVRec::GetProgramRingBufferForLiveTV(), BrowserApi::GetVolume(), MainServer::HandleAnnounce(), Scheduler::HandleIdleShutdown(), MessageHandler::HandleInbound(), MainServer::HandleMessage(), MessageHandler::HandleOutbound(), TVRec::HandlePendingRecordings(), Scheduler::HandleRecording(), Scheduler::HandleRecordingStatusChange(), TVRec::NotifySchedulerOfRecording(), TV::OSDDialogEvent(), BrowserApi::Pause(), JobQueue::PauseJob(), BrowserApi::Play(), BrowserApi::PlayFile(), Frontend::PlayRecording(), MythFrontendService::PlayRecording(), BrowserApi::PlayTrack(), BrowserApi::PlayURL(), TV::ProcessNetworkControlCommand(), PlaybackBox::processNetworkControlCommand(), NetworkControl::processPlay(), NetworkControl::processQuery(), MainServer::ProcessRequestWork(), readyRead(), RegisterFileForWrite(), ResetSockets(), JobQueue::RestartJob(), JobQueue::ResumeJob(), AlarmNotifyThread::run(), Reconnect::run(), Scheduler::run(), SignalMonitor::run(), TVRec::run(), SettingsHelper::RunEpilog(), AutoExpire::SendDeleteMessages(), SendEvent(), SendMessage(), PlaybackSock::SendReceiveStringList(), SendReceiveStringList(), ScheduledRecording::SendReschedule(), MainServer::SendSlaveDisconnectedEvent(), TVRec::SetLiveRecording(), RecorderBase::SetRecordingStatus(), BrowserApi::SetVolume(), Scheduler::ShutdownServer(), RatingSettings::slotSave(), VisualizationSettings::slotSave(), GeneralSettings::slotSave(), ImportSettings::slotSave(), TVRec::StartRecording(), TV::StartTV(), BrowserApi::Stop(), JobQueue::StopJob(), Dvr::StopRecording(), V2Dvr::StopRecording(), MHIContext::TuneTo(), TVRec::TuningFrequency(), TVRec::TuningNewRecorder(), TVRec::TuningSignalCheck(), Dvr::UnDeleteRecording(), V2Dvr::UnDeleteRecording(), UnregisterFileForWrite(), and Scheduler::UpdateRecStatus().

◆ InitPower()

void MythCoreContext::InitPower ( bool  Create = true)

Definition at line 1837 of file mythcorecontext.cpp.

Referenced by MythContext::Init(), and MythContext::~MythContext().

◆ InitLocale()

void MythCoreContext::InitLocale ( void  )

Definition at line 1850 of file mythcorecontext.cpp.

Referenced by GetQLocale(), MythContextPrivate::Init(), and SaveLocaleDefaults().

◆ ReInitLocale()

void MythCoreContext::ReInitLocale ( void  )

Definition at line 1861 of file mythcorecontext.cpp.

Referenced by reloadTheme(), and resetTheme().

◆ GetLocale()

MythLocale * MythCoreContext::GetLocale ( void  ) const

◆ GetQLocale()

QLocale MythCoreContext::GetQLocale ( void  )

◆ SaveLocaleDefaults()

void MythCoreContext::SaveLocaleDefaults ( void  )

Definition at line 1882 of file mythcorecontext.cpp.

Referenced by MythContextPrivate::Init().

◆ GetLanguage()

QString MythCoreContext::GetLanguage ( void  )

◆ GetLanguageAndVariant()

QString MythCoreContext::GetLanguageAndVariant ( void  )

Returns the user-set language and variant.

The string has the form ll or ll_vv, where ll is the two character ISO-639 language code, and vv (which may not exist) is the variant. Examples include en_AU, en_CA, en_GB, en_US, fr_CH, fr_DE, pt_BR, pt_PT.

Definition at line 1779 of file mythcorecontext.cpp.

Referenced by HTTPRequest::BuildResponseHeader(), MythUIVirtualKeyboard::Create(), GetAudioLanguageAndVariant(), GetLanguage(), MythHTTPServer::Init(), MythUIText::ParseElement(), and MythThemedMenu::parseThemeButton().

◆ ResetLanguage()

void MythCoreContext::ResetLanguage ( void  )

Definition at line 1787 of file mythcorecontext.cpp.

Referenced by MythMainWindow::LoadQtConfig().

◆ GetAudioLanguage()

QString MythCoreContext::GetAudioLanguage ( void  )

Returns two character ISO-639 language descriptor for audio language.

See also
iso639_get_language_list()

Definition at line 1796 of file mythcorecontext.cpp.

Referenced by AvFormatDecoder::AutoSelectAudioTrack().

◆ GetAudioLanguageAndVariant()

QString MythCoreContext::GetAudioLanguageAndVariant ( void  )

Returns the user-set audio language and variant.

The string has the form ll or ll_vv, where ll is the two character ISO-639 language code, and vv (which may not exist) is the variant. Examples include en_AU, en_CA, en_GB, en_US, fr_CH, fr_DE, pt_BR, pt_PT.

Definition at line 1808 of file mythcorecontext.cpp.

Referenced by GetAudioLanguage().

◆ ResetAudioLanguage()

void MythCoreContext::ResetAudioLanguage ( void  )

Definition at line 1821 of file mythcorecontext.cpp.

Referenced by MythMainWindow::LoadQtConfig().

◆ ResetSockets()

void MythCoreContext::ResetSockets ( void  )

Definition at line 1826 of file mythcorecontext.cpp.

Referenced by MonitorThread::run().

◆ RegisterForPlayback() [1/2]

void MythCoreContext::RegisterForPlayback ( QObject *  sender,
PlaybackStartCb  method 
)

Register sender for TVPlaybackAboutToStart signal. Method will be called upon the signal being emitted. sender must call MythCoreContext::UnregisterForPlayback upon deletion

Definition at line 1937 of file mythcorecontext.cpp.

Referenced by TV::InitFromDB(), MusicPlayer::MusicPlayer(), and MythRAOPDevice::newRaopConnection().

◆ RegisterForPlayback() [2/2]

template<class OBJ , typename SLOT >
std::enable_if_t<std::is_member_function_pointer_v<SLOT>, void> MythCoreContext::RegisterForPlayback ( OBJ *  sender,
SLOT  method 
)
inline

Definition at line 255 of file mythcorecontext.h.

◆ UnregisterForPlayback()

void MythCoreContext::UnregisterForPlayback ( QObject *  sender)

Unregister sender from being called when TVPlaybackAboutToStart signal is emitted

Definition at line 1958 of file mythcorecontext.cpp.

Referenced by MusicPlayer::~MusicPlayer(), and TV::~TV().

◆ WantingPlayback()

void MythCoreContext::WantingPlayback ( QObject *  sender)

All the objects that have registered using MythCoreContext::RegisterForPlayback but sender will be called.

The object's registered method will be called in a blocking fashion, each of them being called one after the other

Definition at line 1977 of file mythcorecontext.cpp.

Referenced by VideoPlayerCommand::Play(), MusicPlayer::play(), MythRAOPConnection::ProcessRequest(), and TV::StartTV().

◆ InWantingPlayback()

bool MythCoreContext::InWantingPlayback ( void  )

Returns true if a client has requested playback.

this can be used when one of the TVPlayback* is emitted to find out if you can assume playback has stopped

Definition at line 2055 of file mythcorecontext.cpp.

Referenced by MusicPlayer::StartPlayback().

◆ TVInWantingPlayback()

void MythCoreContext::TVInWantingPlayback ( bool  b)

Let the TV class tell us if we was interrupted following a call to WantingPlayback().

TV playback will later issue a TVPlaybackStopped() signal which we want to be able to filter

Definition at line 2043 of file mythcorecontext.cpp.

Referenced by TV::Playback(), TV::StartTV(), and TV::StopPlayback().

◆ GetSessionManager()

MythSessionManager * MythCoreContext::GetSessionManager ( void  )

◆ TestPluginVersion()

bool MythCoreContext::TestPluginVersion ( const QString &  name,
const QString &  libversion,
const QString &  pluginversion 
)
static

Definition at line 2079 of file mythcorecontext.cpp.

Referenced by mythplugin_init().

◆ SetPluginManager()

void MythCoreContext::SetPluginManager ( MythPluginManager pmanager)

Definition at line 2093 of file mythcorecontext.cpp.

Referenced by main().

◆ GetPluginManager()

MythPluginManager * MythCoreContext::GetPluginManager ( void  )

Definition at line 2107 of file mythcorecontext.cpp.

Referenced by configplugin_cb(), MythThemedMenu::findDepends(), and plugin_cb().

◆ SetExiting()

void MythCoreContext::SetExiting ( bool  exiting = true)

Definition at line 2112 of file mythcorecontext.cpp.

Referenced by cleanup(), and main().

◆ IsExiting()

bool MythCoreContext::IsExiting ( void  )

Definition at line 2117 of file mythcorecontext.cpp.

Referenced by ConnectToMasterServer(), and MythSocket::DisconnectFromHost().

◆ RegisterFileForWrite()

void MythCoreContext::RegisterFileForWrite ( const QString &  file,
uint64_t  size = 0LL 
)

◆ UnregisterFileForWrite()

void MythCoreContext::UnregisterFileForWrite ( const QString &  file)

◆ IsRegisteredFileForWrite()

bool MythCoreContext::IsRegisteredFileForWrite ( const QString &  file)

◆ setTestIntSettings()

void MythCoreContext::setTestIntSettings ( QMap< QString, int > &  overrides)

Definition at line 287 of file mythcorecontext.cpp.

◆ setTestFloatSettings()

void MythCoreContext::setTestFloatSettings ( QMap< QString, double > &  overrides)

Definition at line 292 of file mythcorecontext.cpp.

◆ setTestStringSettings()

void MythCoreContext::setTestStringSettings ( QMap< QString, QString > &  overrides)

Definition at line 297 of file mythcorecontext.cpp.

◆ WaitUntilSignals()

void MythCoreContext::WaitUntilSignals ( std::vector< CoreWaitInfo > &  sigs) const

Wait until any of the provided signals have been received.

signals being declared as SIGNAL(SignalName(args,..))

Definition at line 1914 of file mythcorecontext.cpp.

Referenced by MythAirplayServer::PausePlayback(), MythAirplayServer::SeekPosition(), MythAirplayServer::StartPlayback(), MythAirplayServer::StopPlayback(), and MythAirplayServer::UnpausePlayback().

◆ emitTVPlaybackStarted()

void MythCoreContext::emitTVPlaybackStarted ( void  )
inline

Definition at line 290 of file mythcorecontext.h.

Referenced by playDisc(), and TV::StartTV().

◆ emitTVPlaybackStopped()

void MythCoreContext::emitTVPlaybackStopped ( void  )
inline

◆ emitTVPlaybackSought()

void MythCoreContext::emitTVPlaybackSought ( qint64  position)
inline

Definition at line 292 of file mythcorecontext.h.

Referenced by TV::DoSeekAbsolute().

◆ emitTVPlaybackPaused()

void MythCoreContext::emitTVPlaybackPaused ( void  )
inline

Definition at line 294 of file mythcorecontext.h.

Referenced by TV::DoTogglePause().

◆ emitTVPlaybackUnpaused()

void MythCoreContext::emitTVPlaybackUnpaused ( void  )
inline

Definition at line 295 of file mythcorecontext.h.

Referenced by TV::DoPlay(), and TV::DoTogglePause().

◆ emitTVPlaybackAborted()

void MythCoreContext::emitTVPlaybackAborted ( void  )
inline

Definition at line 296 of file mythcorecontext.h.

Referenced by TV::StartTV().

◆ emitTVPlaybackPlaying()

void MythCoreContext::emitTVPlaybackPlaying ( void  )
inline

Definition at line 297 of file mythcorecontext.h.

Referenced by TV::DoPlay().

◆ TVPlaybackStarted

void MythCoreContext::TVPlaybackStarted ( void  )
signal

◆ TVPlaybackStopped

void MythCoreContext::TVPlaybackStopped ( void  )
signal

◆ TVPlaybackSought [1/2]

void MythCoreContext::TVPlaybackSought ( qint64  position)
signal

◆ TVPlaybackSought [2/2]

void MythCoreContext::TVPlaybackSought ( void  )
signal

◆ TVPlaybackPaused

void MythCoreContext::TVPlaybackPaused ( void  )
signal

◆ TVPlaybackUnpaused

void MythCoreContext::TVPlaybackUnpaused ( void  )
signal

◆ TVPlaybackAborted

void MythCoreContext::TVPlaybackAborted ( void  )
signal

◆ TVPlaybackAboutToStart

void MythCoreContext::TVPlaybackAboutToStart ( void  )
signal

◆ TVPlaybackPlaying

void MythCoreContext::TVPlaybackPlaying ( void  )
signal

◆ connected()

void MythCoreContext::connected ( MythSocket sock)
inlineoverrideprivatevirtual

Implements MythSocketCBs.

Definition at line 317 of file mythcorecontext.h.

◆ connectionFailed()

void MythCoreContext::connectionFailed ( MythSocket sock)
inlineoverrideprivatevirtual

Implements MythSocketCBs.

Definition at line 318 of file mythcorecontext.h.

◆ connectionClosed()

void MythCoreContext::connectionClosed ( MythSocket sock)
overrideprivatevirtual

Implements MythSocketCBs.

Definition at line 1653 of file mythcorecontext.cpp.

◆ readyRead()

void MythCoreContext::readyRead ( MythSocket sock)
overrideprivatevirtual

Implements MythSocketCBs.

Definition at line 1561 of file mythcorecontext.cpp.

◆ SetDVBv3()

void MythCoreContext::SetDVBv3 ( bool  dvbv3)
inline

Definition at line 329 of file mythcorecontext.h.

Referenced by run_backend().

◆ GetDVBv3()

bool MythCoreContext::GetDVBv3 ( void  ) const
inline

Definition at line 330 of file mythcorecontext.h.

Referenced by DVBChannel::Open().

Member Data Documentation

◆ s_serverPortCache

QHash< QString, int > MythCoreContext::s_serverPortCache
static

Definition at line 206 of file mythcorecontext.h.

Referenced by ClearBackendServerPortCache(), and GetBackendServerPort().

◆ d

MythCoreContextPrivate* MythCoreContext::d {nullptr}
private

Definition at line 315 of file mythcorecontext.h.

Referenced by ActivateSettingsCache(), AllowShutdown(), BlockShutdown(), CheckProtoVersion(), CheckSubnet(), ClearOverrideSettingForSession(), ClearSettingsCache(), ConnectCommandSocket(), ConnectEventSocket(), ConnectToMasterServer(), GetAudioLanguageAndVariant(), GetBackendServerIP(), GetBackendServerIP4(), GetBackendServerIP6(), GetBackendServerPort(), GetBackendStatusPort(), GetDB(), GetDBManager(), GetFloatSetting(), GetFloatSettingOnHost(), GetGUIContext(), GetGUIObject(), GetHostName(), GetLanguageAndVariant(), GetLocale(), GetMasterHostName(), GetNumSetting(), GetNumSettingOnHost(), GetPluginManager(), GetQLocale(), GetResolutionSetting(), GetScheduler(), GetScopeForAddress(), GetSessionManager(), GetSetting(), GetSettingOnHost(), HasGUI(), Init(), InitLocale(), InitPower(), InWantingPlayback(), IsBackend(), IsBlockingClient(), IsConnectedToMaster(), IsDatabaseIgnored(), IsExiting(), IsFrontend(), IsRegisteredFileForWrite(), IsUIThread(), IsWOLAllowed(), MythCoreContext(), OverrideSettingForSession(), RegisterFileForWrite(), RegisterForPlayback(), ReInitLocale(), ResetAudioLanguage(), ResetLanguage(), ResetSockets(), SafeConnectToMasterServer(), SaveLocaleDefaults(), SaveSetting(), SaveSettingOnHost(), SendReceiveStringList(), SetAsBackend(), SetAsFrontend(), SetExiting(), SetGUIObject(), SetLocalHostname(), SetPluginManager(), SetScheduler(), SetScopeForAddress(), SetWOLAllowed(), TVInWantingPlayback(), UnregisterFileForWrite(), UnregisterForPlayback(), WantingPlayback(), and ~MythCoreContext().

◆ m_testOverrideInts

QMap<QString,int> MythCoreContext::m_testOverrideInts {}
private

Definition at line 322 of file mythcorecontext.h.

Referenced by GetNumSetting(), GetNumSettingOnHost(), and setTestIntSettings().

◆ m_testOverrideFloats

QMap<QString,double> MythCoreContext::m_testOverrideFloats {}
private

Definition at line 323 of file mythcorecontext.h.

Referenced by GetFloatSetting(), GetFloatSettingOnHost(), and setTestFloatSettings().

◆ m_testOverrideStrings

QMap<QString,QString> MythCoreContext::m_testOverrideStrings {}
private

Definition at line 324 of file mythcorecontext.h.

Referenced by GetSetting(), GetSettingOnHost(), and setTestStringSettings().

◆ m_dvbv3

bool MythCoreContext::m_dvbv3 {false}
private

Definition at line 327 of file mythcorecontext.h.


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