MythTV  0.26-pre
Public Member Functions | Private Member Functions | Private Attributes
MythCoreContext Class Reference

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

#include <mythcorecontext.h>

Inheritance diagram for MythCoreContext:
MythObservable MythSocketCBs

List of all members.

Public Member Functions

 MythCoreContext (const QString &binversion, QObject *eventHandler)
virtual ~MythCoreContext ()
bool Init (void)
void SetLocalHostname (const QString &hostname)
void SetServerSocket (MythSocket *serverSock)
void SetEventSocket (MythSocket *eventSock)
void SetScheduler (MythScheduler *sched)
bool ConnectToMasterServer (bool blockingClient=true, bool openEventSocket=true)
MythSocketConnectCommandSocket (const QString &hostname, int port, const QString &announcement, bool *proto_mismatch=NULL, bool gui=true, int maxConnTry=-1, int setup_timeout=-1)
MythSocketConnectEventSocket (const QString &hostname, int port)
bool SetupCommandSocket (MythSocket *serverSock, const QString &announcement, uint timeout_in_ms, bool &proto_mismatch)
bool CheckProtoVersion (MythSocket *socket, uint timeout_ms=kMythSocketLongTimeout, bool error_dialog_desired=false)
QString GenMythURL (QString host=QString(), QString port=QString(), QString path=QString(), QString storageGroup=QString())
QString GenMythURL (QString host=QString(), int port=0, QString path=QString(), QString storageGroup=QString())
QString GetMasterHostPrefix (const QString &storageGroup=QString(), const QString &path=QString())
QString GetMasterHostName (void)
QString GetHostName (void)
QString GetFilePrefix (void)
bool IsConnectedToMaster (void)
void SetBackend (bool backend)
bool IsBackend (void) const
 is this process a backend process
bool IsFrontendOnly (void)
 is there a frontend, but no backend, running on this host
bool IsMasterHost (void)
 is this the same host as the master
bool IsMasterHost (const QString &host)
bool IsMasterBackend (void)
 is this the actual MBE process
bool BackendIsRunning (void)
 a backend process is running on this host
bool IsThisHost (const QString &addr)
bool IsThisHost (const QString &addr, const QString &host)
void BlockShutdown (void)
void AllowShutdown (void)
bool IsBlockingClient (void) const
 is this client blocking shutdown
bool SendReceiveStringList (QStringList &strlist, bool quickTimeout=false, bool block=true)
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)
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.
DatabaseParams GetDatabaseParams (void)
void SaveSetting (const QString &key, int newValue)
void SaveSetting (const QString &key, const QString &newValue)
QString GetSetting (const QString &key, const QString &defaultval="")
bool SaveSettingOnHost (const QString &key, const QString &newValue, const QString &host)
int GetNumSetting (const QString &key, int defaultval=0)
double GetFloatSetting (const QString &key, double defaultval=0.0)
void GetResolutionSetting (const QString &type, int &width, int &height, double &forced_aspect, double &refreshrate, 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="")
int GetNumSettingOnHost (const QString &key, const QString &host, int defaultval=0)
double GetFloatSettingOnHost (const QString &key, const QString &host, double defaultval=0.0)
QString GetBackendServerIP (void)
QString GetBackendServerIP (const QString &host)
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)
 Dispatch an event to all listeners.
void dispatchNow (const MythEvent &event)
 Dispatch an event to all listeners.
void InitLocale (void)
void ReInitLocale (void)
MythLocaleGetLocale (void) const
const QLocale GetQLocale (void)
void SaveLocaleDefaults (void)
QString GetLanguage (void)
 Returns two character ISO-639 language descriptor for UI language.
QString GetLanguageAndVariant (void)
 Returns the user-set language and variant.
void ResetLanguage (void)

Private Member Functions

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

Private Attributes

MythCoreContextPrivated

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 47 of file mythcorecontext.h.


Constructor & Destructor Documentation

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

Definition at line 175 of file mythcorecontext.cpp.

Definition at line 240 of file mythcorecontext.cpp.


Member Function Documentation

Definition at line 182 of file mythcorecontext.cpp.

Referenced by MythContext::MythContext().

void MythCoreContext::SetLocalHostname ( const QString &  hostname)

Definition at line 1202 of file mythcorecontext.cpp.

Referenced by MythContextPrivate::LoadDatabaseSettings().

Definition at line 1313 of file mythcorecontext.cpp.

Referenced by cleanup(), and run_backend().

bool MythCoreContext::ConnectToMasterServer ( bool  blockingClient = true,
bool  openEventSocket = true 
)
MythSocket * MythCoreContext::ConnectCommandSocket ( const QString &  hostname,
int  port,
const QString &  announcement,
bool proto_mismatch = NULL,
bool  gui = true,
int  maxConnTry = -1,
int  setup_timeout = -1 
)
MythSocket * MythCoreContext::ConnectEventSocket ( const QString &  hostname,
int  port 
)

Definition at line 452 of file mythcorecontext.cpp.

Referenced by ConnectToMasterServer().

bool MythCoreContext::SetupCommandSocket ( MythSocket serverSock,
const QString &  announcement,
uint  timeout_in_ms,
bool proto_mismatch 
)

Definition at line 246 of file mythcorecontext.cpp.

Referenced by ConnectCommandSocket().

bool MythCoreContext::CheckProtoVersion ( MythSocket socket,
uint  timeout_ms = kMythSocketLongTimeout,
bool  error_dialog_desired = false 
)
QString MythCoreContext::GenMythURL ( QString  host = QString(),
QString  port = QString(),
QString  path = QString(),
QString  storageGroup = QString() 
)
QString MythCoreContext::GenMythURL ( QString  host = QString(),
int  port = 0,
QString  path = QString(),
QString  storageGroup = QString() 
)

Definition at line 648 of file mythcorecontext.cpp.

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

Definition at line 754 of file mythcorecontext.cpp.

Referenced by Content::AddLiveStream(), Content::AddRecordingLiveStream(), HTTPLiveStream::AddStream(), Content::AddVideoLiveStream(), ControlRequestHandler::AnnounceSocket(), MainServer::BackendQueryDiskSpace(), BackendSettings::BackendSettings(), PlaybackProfileConfigs::btnPress(), StorageGroup::CheckAllStorageGroupDirs(), ChannelBase::CheckChannel(), checkImageStoragePaths(), checkStoragePaths(), CleanupMyOldInUsePrograms(), HouseKeeper::CleanupMyOldRecordings(), clearAllKeys(), MythControls::Create(), MythSystemEventHandler::customEvent(), BrowserApi::customEvent(), MythWebView::customEvent(), MainServer::customEvent(), NetworkControl::customEvent(), MusicPlayer::customEvent(), MainServer::DeleteRecordedFiles(), ProgramInfo::DiscoverRecordingDirectory(), StorageGroupEditor::doDelete(), StorageGroupListEditor::doDelete(), MainServer::DoHandleDeleteRecording(), MainServer::DoHandleStopRecording(), Content::DownloadFile(), CaptureCardEditor::edit(), ExpertSettingsEditor::ExpertSettingsEditor(), AutoExpire::ExpireRecordings(), Scheduler::FillRecordingDir(), CaptureCard::fillSelections(), HttpStatus::FillStatusXML(), findAllDBSearchGrabbers(), findAllDBTreeGrabbersByHost(), SourceManager::findScripts(), SourceManager::findScriptsDB(), findSearchGrabberByCommand(), findSearchGrabberInDB(), findTreeGrabberByCommand(), findTreeGrabberInDB(), get_cardtype(), MainServer::GetActiveBackends(), DBUtil::GetBackupDirectory(), CardUtil::GetCardIDs(), getDBParamters(), Dvr::GetEncoderList(), Content::GetHash(), Myth::GetHostName(), BrowserApi::GetMetadata(), MetadataDownload::getMXMLPath(), Scheduler::GetNextLiveTVDir(), MetadataDownload::getNFOPath(), ProgramInfo::GetPlaybackURL(), Content::GetPreviewImage(), TVRec::GetProgramRingBufferForLiveTV(), Content::GetRecording(), LogViewer::getSetting(), CardUtil::GetVideoDevices(), BrowserApi::GetVolume(), handle_command(), FileServerHandler::HandleAnnounce(), MainServer::HandleAnnounce(), MainServer::HandleCheckRecordingActive(), FileServerHandler::HandleDownloadFile(), MainServer::HandleDownloadFile(), FileServerHandler::HandleFileQuery(), MainServer::HandleFillProgramInfo(), MainServer::HandleGenPreviewPixmap(), FileServerHandler::HandleGetFileList(), MainServer::HandleGetFreeRecorder(), MainServer::HandleIsActiveBackendQuery(), MainServer::HandleLockTuner(), MainServer::HandlePixmapGetIfModified(), MainServer::HandlePixmapLastModified(), MainServer::HandleQueryCheckFile(), FileServerHandler::HandleQueryFileExists(), MainServer::HandleQueryFileExists(), FileServerHandler::HandleQueryFileHash(), MainServer::HandleQueryFileHash(), BaseRequestHandler::HandleQueryHostname(), MainServer::HandleQueryHostname(), MainServer::HandleQueryRecordings(), MainServer::HandleSGFileQuery(), MainServer::HandleSGGetFileList(), helloID(), HostnameSetting::HostnameSetting(), HTTPLiveStream::HTTPLiveStream(), NativeArchive::importRecording(), MediaServer::Init(), MythUIHelperPrivate::Init(), init_jobs(), VideoOutput::InitDisplayMeasurements(), Frontend::InitialiseActions(), insertGrabberInDB(), CardUtil::IsCardTypePresent(), IsFrontendOnly(), IsMasterHost(), IsThisHost(), StorageGroupEditor::Load(), StorageGroupListEditor::Load(), InputSelector::Load(), VideoSourceSelector::Load(), CaptureCardEditor::Load(), CardInputEditor::Load(), RecordingProfile::loadByType(), VideoSetupWizard::loadData(), ScreenSetup::loadData(), SourceSetup::loadData(), LoadFromRecorded(), loadMusic(), main(), MainServer::MainServer(), ProgramInfo::MarkAsInUse(), MythPlayer::MythPlayer(), StorageGroupEditor::open(), BrowserApi::Pause(), BrowserApi::Play(), PlaybackProfileConfig::PlaybackProfileConfig(), PlaybackProfileConfigs::PlaybackProfileConfigs(), PlaybackSock::PlaybackSock(), BrowserApi::PlayFile(), BrowserApi::PlayTrack(), BrowserApi::PlayURL(), VideoSetupWizard::playVideoTest(), DatabaseLogger::prepare(), WeatherSource::ProbeScript(), NetworkControl::processPlay(), HttpConfig::ProcessRequest(), MythFrontendStatus::ProcessRequest(), FileServerHandler::QueryFileSystems(), RebuildSeekTable(), MainServer::reconnectTimeout(), JobQueue::RecoverQueue(), RemoteGetFileList(), removeGrabberFromDB(), MythDownloadManager::run(), SystemEventThread::run(), PreviewGenerator::Run(), MetadataImageDownload::run(), HouseKeeper::RunHouseKeeping(), PreviewGenerator::RunReal(), VideoSetupWizard::save(), ScreenSetup::saveData(), SavePending(), ScanVideoDirectory(), SendMythSystemPlayEvent(), sendPlaybackEnd(), sendPlaybackStart(), SendSystemEvent(), SendSystemEvent(), PlayerContext::SetTVChain(), RemoteEncoder::Setup(), Weather::SetupScreens(), SourceManager::setupSources(), setupTVs(), BrowserApi::SetVolume(), TV::ShowOSDPromptDeleteRecording(), MythRAOPDevice::Start(), MythAirplayServer::Start(), RecordingInfo::StartedRecording(), StatusBox::StatusBox(), BrowserApi::Stop(), MythContextPrivate::TestDBconnection(), ThemeChooser::ThemeChooser(), VideoDisplayProfile::VideoDisplayProfile(), and Scheduler::WakeUpSlave().

Definition at line 762 of file mythcorecontext.cpp.

Referenced by AutoExpire::ExpireEpisodesOverMax().

Definition at line 570 of file mythcorecontext.cpp.

Referenced by main().

is there a frontend, but no backend, running on this host

Definition at line 625 of file mythcorecontext.cpp.

Referenced by IdleScreen::customEvent(), WelcomeDialog::customEvent(), ExitPrompter::handleExit(), MythWelcomeSettings::MythWelcomeSettings(), and WelcomeDialog::shutdownNow().

bool MythCoreContext::IsMasterHost ( const QString &  host)

Definition at line 586 of file mythcorecontext.cpp.

a backend process is running on this host

Definition at line 596 of file mythcorecontext.cpp.

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

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

Definition at line 617 of file mythcorecontext.cpp.

Definition at line 507 of file mythcorecontext.cpp.

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

Definition at line 536 of file mythcorecontext.cpp.

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

is this client blocking shutdown

Definition at line 565 of file mythcorecontext.cpp.

Referenced by JobQueue::ProcessQueue().

bool MythCoreContext::SendReceiveStringList ( QStringList &  strlist,
bool  quickTimeout = false,
bool  block = true 
)
void MythCoreContext::SendMessage ( const QString &  message)

Definition at line 1046 of file mythcorecontext.cpp.

Referenced by MainServer::DoDeleteInDB(), and VideoScannerThread::run().

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

Definition at line 1070 of file mythcorecontext.cpp.

void MythCoreContext::SetGUIObject ( QObject *  gui)

/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 794 of file mythcorecontext.cpp.

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

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

Definition at line 799 of file mythcorecontext.cpp.

Referenced by MythPlayer::AdjustAudioTimecodeOffset(), ThemeUpdateChecker::checkForUpdate(), ThemeChooser::customEvent(), EditAlbumartDialog::customEvent(), MusicPlayer::customEvent(), MusicPlayer::decoderHandlerReady(), HardwareProfile::DeleteProfile(), doBurnDVD(), ParentalLevelChangeCheckerPrivate::DoCheck(), doNativeArchive(), doUpgradeMusicDatabaseSchema(), getTempDirectory(), MythRAOPDevice::HardwareId(), ProgramRecPriority::keyPressEvent(), MythTranslation::load(), ThemeChooser::Load(), main(), mythplugin_init(), ParentalLevelChangeCheckerPrivate::OnPasswordEntered(), MythPlayer::OpenFile(), PlaybackBox::PlaybackBox(), ThemeChooser::refreshDownloadableThemes(), MythBurn::runScript(), AudioSetupWizard::save(), LanguageSelection::Save(), RawSettingsEditor::Save(), ThemeChooser::saveAndReload(), VideoFilterSettings::saveAsDefault(), DVDThemeSelector::saveConfiguration(), SelectDestination::saveConfiguration(), MusicPlayer::savePosition(), VideoDialog::SavePosition(), VideoColourSpace::SaveValue(), PlaybackBox::saveViewChanges(), MythPlayer::SetAllowForcedSubtitles(), VolumeBase::SetCurrentVolume(), PlaybackBox::setGroupFilter(), AudioOutputBase::SetSWVolume(), SubtitleScreen::SetZoom(), ScreenWizard::slotResetSettings(), VisualizationSettings::slotSave(), RatingSettings::slotSave(), ImportSettings::slotSave(), GeneralSettings::slotSave(), MetadataSettings::slotSave(), PlayerSettings::slotSave(), GrabberSettings::slotSave(), BrowserConfig::slotSave(), HardwareProfile::SubmitProfile(), VideoDialog::SwitchLayout(), NetTree::switchView(), ThemeUpdateChecker::ThemeUpdateChecker(), VideoDialog::ToggleBrowseMode(), VideoDialog::ToggleFlatView(), MythPlayer::ToggleNightMode(), NetTree::toggleRSSUpdates(), NetTree::toggleTreeUpdates(), TV::UpdateChannelList(), ScreenWizard::updateSettings(), ArchiveFileSelector::~ArchiveFileSelector(), ChannelRecPriority::~ChannelRecPriority(), GLSingleView::~GLSingleView(), GuideGrid::~GuideGrid(), ImportMusicDialog::~ImportMusicDialog(), LogViewer::~LogViewer(), MainVisual::~MainVisual(), MusicPlayer::~MusicPlayer(), ProgDetails::~ProgDetails(), SingleView::~SingleView(), StatusBox::~StatusBox(), VideoDialogPrivate::~VideoDialogPrivate(), ViewScheduled::~ViewScheduled(), ZMEvents::~ZMEvents(), and ZMLivePlayer::~ZMLivePlayer().

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

Definition at line 804 of file mythcorecontext.cpp.

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

Definition at line 816 of file mythcorecontext.cpp.

Referenced by FileScanner::AddFileToDB(), UPnpCDSMusic::AddItem(), UPnpCDSVideo::AddItem(), UPNPScanner::AddServer(), VideoPlayerCommandPrivate::AltPlayerFor(), ArchiveFileSelector::ArchiveFileSelector(), AudioDeviceComboBox::AudioDeviceComboBox(), AudioConfigSettings::AudioRescan(), StartPrompter::backendRunningPrompt(), DBUtil::BackupDB(), burnISOImage(), calc_eit_utc_offset(), DiSEqCDevRotor::CalculateAzimuth(), LogViewer::cancelClicked(), Myth::ChangePassword(), ThemeUpdateChecker::checkForUpdate(), AudioConfigSettings::CheckPassthrough(), Scheduler::CheckShutdownServer(), checkStoragePaths(), ClassicLogoDetector::ClassicLogoDetector(), SchemaUpgradeWizard::Compare(), RecordingProfile::CompleteLoad(), connect_to_master(), ConnectCommandSocket(), ConnectToMasterServer(), ImportSettings::Create(), GeneralSettings::Create(), ProgDetails::Create(), PlayerSettings::Create(), ManualSchedule::Create(), GameUI::Create(), BrowserConfig::Create(), ImportMusicDialog::Create(), Playlist::CreateCDMP3(), createISOImage(), PlaybackBox::createJobMenu(), PlayerContext::CreatePlayer(), PlaybackBox::createPlaylistJobMenu(), DBUtil::CreateTemporaryDBConf(), IdleScreen::customEvent(), WelcomeDialog::customEvent(), MythSystemEventHandler::customEvent(), MusicPlayer::customEvent(), DecodeVBIFormat(), MediaMonitor::defaultDevice(), DBUtil::DoBackup(), BurnMenu::doBurn(), ParentalLevelChangeCheckerPrivate::DoCheck(), OutboundRequestHandler::DoConnectToMaster(), NativeArchive::doImportArchive(), StatusBox::doListingsStatus(), doUpgradeMusicDatabaseSchema(), doUpgradeTVDatabaseSchema(), doUpgradeVideoDatabaseSchema(), expandURLString(), NativeArchive::exportRecording(), NativeArchive::exportVideo(), filenameFromMetadata(), Scheduler::FillRecordingDir(), HttpStatus::FillStatusXML(), EditMetadataDialog::FindBanner(), EditRomInfoDialog::FindBoxart(), EditMetadataDialog::FindCoverArt(), EditRomInfoDialog::FindFanart(), EditMetadataDialog::FindFanart(), StorageGroup::FindFileDir(), EditRomInfoDialog::FindScreenshot(), EditMetadataDialog::FindScreenshot(), EditMetadataDialog::FindTrailer(), ImportNative::finishedPressed(), FromProgramQuery(), GalleryFilterDialog::GalleryFilterDialog(), HardwareProfile::GetAdminPasswordFromFile(), Content::GetAlbumArt(), Video::GetBluray(), Myth::GetConnectionInfo(), ZMEvents::getDateList(), MythBurn::getDefaultProfile(), getFileDetails(), GetFilePrefix(), DBChannel::GetFormatted(), ChannelInfo::GetFormatted(), MetadataDownload::GetGameGrabber(), JobQueue::GetJobCommand(), JobQueue::GetJobDescription(), GetLanguageAndVariant(), getLocalWritePath(), GetMasterHostPrefix(), MetadataDownload::GetMovieGrabber(), Content::GetMusic(), GetMythXMLURL(), ProgramInfo::GetPlaybackURL(), HardwareProfile::GetProfileURL(), MythFEXML::GetScreenShot(), MetadataDownload::GetTelevisionGrabber(), getTempDirectory(), ThumbGenerator::getThumbcacheDir(), GetVideoDirsByHost(), GLSingleView::GLSingleView(), GuideGrid::GuideGrid(), GuiVidModeResolution(), ExitPrompter::halt(), MythBurn::handleAddFile(), MainServer::HandleFillProgramInfo(), MainServer::HandleGetFreeRecorder(), MainServer::HandleGetNextFreeRecorder(), MainServer::HandleGetRecorderFromNum(), MainServer::HandleGetRecorderNum(), MainServer::HandleGoToSleep(), handleMedia(), MainServer::HandleQueryRecordings(), Scheduler::HandleRunSchedulerStartup(), MainServer::HandleSGFileQuery(), MainServer::HandleSGGetFileList(), MythRAOPDevice::HardwareId(), HardwareProfile::HardwareProfile(), NativeArchive::importVideo(), StorageGroup::Init(), MythTranslationPrivate::Init(), GrabberSettings::Init(), AudioSetupWizard::Init(), ThemeChooser::Init(), V4LChannel::Init(), LCDProcClient::init(), TVRec::Init(), InitializeDatabase(), V4LChannel::InitializeInputs(), ChannelBase::InitializeInputs(), EditPowerSearchPopup::initLists(), JobQueue::InJobRunWindow(), DBUtil::IsBackupInProgress(), UPnpCDSTv::IsBrowseRequestForUs(), UPnpCDSVideo::IsBrowseRequestForUs(), IsMasterHost(), ISO639_fill_selections(), iso639_get_language_list(), UPnpCDSTv::IsSearchRequestForUs(), UPnpCDSVideo::IsSearchRequestForUs(), JobAllowUserJob(), JobQueue::JobText(), WelcomeDialog::keyPressEvent(), MusicCommon::keyPressEvent(), MythTranslation::LanguageChanged(), LanguageSelection::LanguageSelection(), GameUI::Load(), ThemeChooser::Load(), RawSettingsEditor::Load(), PostProcMixin::Load(), TransFreqTableSelector::Load(), DVDThemeSelector::loadConfiguration(), SelectDestination::loadConfiguration(), ExportNative::loadConfiguration(), MythBurn::loadConfiguration(), VideoDialog::loadData(), MythBurn::loadEncoderProfiles(), loadMusic(), LCDProcClient::loadSettings(), MusicPlayer::loadSettings(), TextSubtitleParser::LoadSubtitles(), XMLParse::LoadTheme(), main(), MediaMonitor::MediaMonitor(), MetaIO::MetaIO(), MusicPlayer::MusicPlayer(), MythDateToString(), MythLanguage(), MythNews::MythNews(), MythPlayer::MythPlayer(), mythplugin_init(), MythTimeToString(), CECAdapterPriv::Open(), MythRAOPConnection::OpenAudioDevice(), AudioOutputCA::OpenDevice(), BDRingBuffer::OpenFile(), AudioOutputALSA::OpenMixer(), MusicPlayer::openOutputDevice(), ParentalLevelChangeCheckerPrivate::ParentalLevelChangeCheckerPrivate(), XMLTVParser::parseFile(), PlaybackBox::PlaybackBox(), playDisc(), VideoPlayerCommandPrivate::PlayerFor(), HttpStatus::PrintEncoderStatus(), HttpStatus::PrintJobQueue(), HttpStatus::PrintMachineInfo(), HttpStatus::PrintScheduled(), HttpStatus::PrintStatus(), MythFrontendStatus::ProcessRequest(), Myth::ProfileUpdated(), ProgramInfo::ProgramInfo(), LanguageSelection::prompt(), DBUtil::QueryDBMSVersion(), ExitPrompter::reboot(), AudioOutputBase::Reconfigure(), MainServer::reconnectTimeout(), RecordingInfo::RecordingInfo(), reloadTheme(), FileScanner::RemoveFileFromDB(), GalleryUtil::Rename(), GalleryUtil::RenameDirectory(), CDRipperThread::ripTrack(), run(), CDRipperThread::run(), run_backend(), HouseKeeper::RunHouseKeeping(), HouseKeeper::RunMFD(), WelcomeDialog::runMythFillDatabase(), runScan(), runTestDVD(), TransFreqTableSelector::Save(), ThemeChooser::saveAndReload(), ImportCoverArtDialog::scanDirectory(), EditMetadataCommon::scanForImages(), AvFormatDecoder::ScanStreams(), ServerPool::SelectDefaultListen(), Metadata::setArtistAndTrackFormats(), VolumeBase::SetCurrentVolume(), Decoder::SetLocationFormatUseTags(), ZMLivePlayer::setMonitorLayout(), MpegRecorder::SetOptionsFromProfile(), ImportRecorder::SetOptionsFromProfile(), DTVRecorder::SetOptionsFromProfile(), ASIRecorder::SetOptionsFromProfile(), NuppelVideoRecorder::SetOptionsFromProfile(), HTTPLiveStream::SetOutputVars(), StartingChannel::SetSourceID(), LCDProcClient::SetupLCD(), ZMClient::setupZMClient(), AudioOutputPulseAudio::SetVolumeChannel(), ProgFinder::showGuide(), VideoDialog::ShowHomepage(), ScheduleCommon::ShowNotRecordingDialog(), ViewScheduleDiff::showStatus(), NetSearch::showWebVideo(), NetTree::showWebVideo(), shutdown(), WelcomeDialog::shutdownNow(), Scheduler::ShutdownServer(), SingleView::SingleView(), BookmarkManager::slotBookmarkClicked(), GeneralSetupWizard::slotDelete(), BookmarkManager::slotShowMarked(), GeneralSetupWizard::slotView(), TVRec::SpawnLiveTV(), UPNPScanner::Start(), BurnMenu::start(), AudioConfigSettings::StartAudioTest(), EditAlbumartDialog::startCopyImageToTag(), startDatabaseTree(), WelcomeDialog::startFrontend(), startGuide(), StartPrompter::stopBackend(), ThemeUpdateChecker::ThemeUpdateChecker(), ProgramInfo::ToMap(), Transcode::TranscodeFile(), AudioConfigSettings::UpdateCapabilities(), GameHandler::UpdateGameDB(), HouseKeeper::UpdateThemeChooserInfoCache(), PlaybackBox::UpdateUILists(), UpgradeArchiveDatabaseSchema(), UpgradeBrowserDatabaseSchema(), UpgradeGalleryDatabaseSchema(), UpgradeGameDatabaseSchema(), UpgradeNewsDatabaseSchema(), VideoDialogPrivate::VideoDialogPrivate(), VolumeBase::VolumeBase(), AudioOutputOSS::VolumeInit(), AudioOutputJACK::VolumeInit(), Scheduler::WasStartedAutomatically(), WelcomeDialog::WelcomeDialog(), and ZMConsole::ZMConsole().

bool MythCoreContext::SaveSettingOnHost ( const QString &  key,
const QString &  newValue,
const QString &  host 
)
int MythCoreContext::GetNumSetting ( const QString &  key,
int  defaultval = 0 
)

Definition at line 822 of file mythcorecontext.cpp.

Referenced by Scheduler::AddNewRecords(), JobQueue::AllowedToRun(), AudioConfigSettings::AudioAdvanced(), AudioConfigSettings::AudioConfigSettings(), AudioOutputALSA::AudioOutputALSA(), AudioOutputBase::AudioOutputBase(), AudioPlayer::AudioPlayer(), AudioTest::AudioTest(), DBUtil::BackupDB(), VoqvFullscreen::BeginPort(), BlankFrameDetector::BlankFrameDetector(), BorderDetector::BorderDetector(), burnISOImage(), AutoExpire::CalcParams(), AudioOutputBase::CanPassthrough(), CECAdapter::CECAdapter(), ChannelRecPriority::ChannelRecPriority(), WelcomeDialog::checkAutoStart(), AudioConfigSettings::CheckPassthrough(), Scheduler::CheckShutdownServer(), ClassicCommDetector::ClassicCommDetector(), ClassicLogoDetector::ClassicLogoDetector(), HouseKeeper::CleanupProgramListings(), CommBreakMap::CommBreakMap(), CompleteJob(), connect_to_master(), ConnectCommandSocket(), AudioOutputPulseAudio::ConnectPlaybackStream(), LCDProcClient::connectToHost(), ConnectToMasterServer(), RatingSettings::Create(), VisualizationSettings::Create(), ImportSettings::Create(), GeneralSettings::Create(), PlayerSettings::Create(), MetadataSettings::Create(), AudioSetupWizard::Create(), ManualSchedule::Create(), NetSearch::Create(), ZMEvents::Create(), BrowserConfig::Create(), VideoDialog::Create(), Ripper::Create(), Playlist::CreateCDMP3(), MusicCommon::CreateCommon(), PlayerContext::CreatePlayer(), VideoDialog::CreatePlayMenu(), IdleScreen::customEvent(), WelcomeDialog::customEvent(), MainServer::customEvent(), MusicPlayer::customEvent(), MusicPlayer::decoderHandlerReady(), DeleteThread::DeleteThread(), DetectLetterbox::DetectLetterbox(), ParentalLevelChangeCheckerPrivate::DoCheck(), OutboundRequestHandler::DoConnectToMaster(), MainServer::DoDeleteThread(), MainServer::DoHandleUndeleteRecording(), PlaybackBox::doJobQueueJob(), PlaybackBox::doPlaylistJobQueueJob(), MainServer::DoTruncateThread(), doUpgradeTVDatabaseSchema(), Ripper::ejectCD(), SubtitleScreen::EnableSubtitles(), VoqvFullscreen::EndPort(), MythMainWindow::ExitStandby(), filenameFromMetadata(), AutoExpire::FillDBOrdered(), AutoExpire::FillExpireList(), ProgramRecPriority::FillList(), TV::FillOSDMenuJumpRec(), TV::FillOSDMenuVideo(), Scheduler::FillRecordingDir(), Scheduler::FillRecordList(), PlayerSettings::fillRegionList(), HttpStatus::FillStatusXML(), FlagCommercials(), AutoExpire::GetAllExpiring(), JobQueue::GetJobsInQueue(), GetMasterHostPrefix(), AudioOutputSettings::GetMaxHDRate(), ProgramInfo::GetPlaybackURL(), TVRec::GetProgramRingBufferForLiveTV(), ProgramInfo::GetRecordingTypeRecPriority(), ScreenWizard::getScreenInfo(), ThumbGenerator::getThumbcacheDir(), AudioOutputSettings::GetUsers(), GLSingleView::GLSingleView(), PrePostRollFlagger::go(), ClassicCommDetector::go(), GrabberManager::GrabberManager(), PlaybackBox::groupSelectorClosed(), GuideGrid::GuideGrid(), MainServer::HandleDeleteFile(), handleDVDMedia(), ExitPrompter::handleExit(), handleMedia(), TV::HandleStateChange(), HistogramAnalyzer::HistogramAnalyzer(), HttpStatus::HttpStatus(), MythMainWindow::IdleTimeout(), ImageView::ImageView(), VideoOutputQuartz::Init(), GrabberSettings::Init(), StatusBox::Init(), AudioSetupWizard::Init(), CetonRTP::Init(), MythRAOPConnection::Init(), MythUIWebBrowser::Init(), PlaybackBox::Init(), TVRec::Init(), TV::Init(), MythRemoteLineEdit::Init(), ZMLivePlayer::initMonitorLayout(), AudioOutputBase::InitSettings(), AvFormatDecoder::InitVideoCodec(), RecordingQuality::IsDamaged(), JobQueue::JobQueue(), LinuxFirewireDevice::LinuxFirewireDevice(), PlaylistContainer::load(), ThemeChooser::Load(), SelectDestination::loadConfiguration(), LoadFromRecorded(), MusicPlayer::loadPlaylist(), MusicPlayer::loadSettings(), PreviewGenerator::LocalPreviewRun(), LogViewer::LogViewer(), main(), MainServer::MainServer(), MainVisual::MainVisual(), MediaMonitor::MediaMonitor(), MusicCommon::MusicCommon(), MythComboBox::MythComboBox(), MythLineEdit::MythLineEdit(), MythMainWindow::MythMainWindow(), MythNews::MythNews(), MythPlayer::MythPlayer(), mythplugin_init(), MythPopupBox::MythPopupBox(), MythUDPListener::MythUDPListener(), nearestName(), NetTree::NetTree(), CECAdapterPriv::Open(), MythRAOPConnection::OpenAudioDevice(), AudioOutputALSA::OpenDevice(), AudioOutputCA::OpenDevice(), BDRingBuffer::OpenFile(), AudioOutputALSA::OpenMixer(), MusicPlayer::openOutputDevice(), PlaybackBox::PlaybackBox(), VideoDialog::playVideoWithTrailers(), NetworkControl::processQuery(), JobQueue::ProcessQueue(), ProgramRecPriority::ProgramRecPriority(), Scheduler::PutInactiveSlavesToSleep(), JobQueue::QueueJobs(), JobQueue::QueueRecordingJobs(), AudioOutputBase::Reconfigure(), MainServer::reconnectTimeout(), JobQueue::RecoverQueue(), RemoteUndeleteRecording(), MusicPlayer::restorePosition(), Ripper::RipComplete(), RSSManager::RSSManager(), CDRipperThread::run(), Scheduler::run(), GrabberDownloadThread::run(), run_backend(), AutoExpire::RunExpirer(), HouseKeeper::RunHouseKeeping(), RunNetTree(), GuideGrid::RunProgramGuide(), RunVideoScreen(), PreviewGenerator::SavePreview(), SceneChangeDetector::SceneChangeDetector(), Scheduler::SchedNewRecords(), Scheduler::SchedPreserveLiveTV(), ProgramRecPriority::scheduleChanged(), SchemaUpgradeWizard::SchemaUpgradeWizard(), SendReceiveStringList(), PlaybackBox::setGroupFilter(), PlayerContext::SetInitialTVState(), Decoder::SetLocationFormatUseTags(), setScheduledWakeupTime(), DeviceReadBuffer::Setup(), LCDProcClient::SetupLCD(), ZMClient::setupZMClient(), VideoOutWindow::SetVideoScalingAllowed(), ThemeChooser::showPopupMenu(), WelcomeDialog::shutdownNow(), Scheduler::ShutdownServer(), SingleView::SingleView(), AudioConfigSettings::StartAudioTest(), StatusBox::StatusBox(), TemplateFinder::TemplateFinder(), TemplateMatcher::TemplateMatcher(), MythPlayer::ToggleNightMode(), ThemeChooser::toggleThemeUpdateNotifications(), Transcode::TranscodeFile(), AudioConfigSettings::UpdateCapabilities(), TV::UpdateOSDProgInfo(), TV::UpdateOSDStatus(), PlaybackBox::UpdateUILists(), VideoColourSpace::VideoColourSpace(), VideoDialogPrivate::VideoDialogPrivate(), VideoFilterSettings::VideoFilterSettings(), VideoListImp::VideoListImp(), VideoDialog::VideoMenu(), VideoOutput::VideoOutput(), VideoOutputOpenGL::VideoOutputOpenGL(), VideoOutputVDPAU::VideoOutputVDPAU(), VideoOutputXv::VideoOutputXv(), VideoOutWindow::VideoOutWindow(), VideoScannerThread::VideoScannerThread(), ViewScheduled::ViewScheduled(), VolumeBase::VolumeBase(), AudioOutputOSS::VolumeInit(), AudioOutputJACK::VolumeInit(), Weather::Weather(), WelcomeDialog::WelcomeDialog(), and GuideGrid::~GuideGrid().

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

Definition at line 827 of file mythcorecontext.cpp.

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

Definition at line 777 of file mythcorecontext.cpp.

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

Definition at line 839 of file mythcorecontext.cpp.

Referenced by GetMythXMLURL(), and RemoteGetFileList().

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

Definition at line 877 of file mythcorecontext.cpp.

void MythCoreContext::ClearSettingsCache ( const QString &  myKey = QString(""))
void MythCoreContext::OverrideSettingForSession ( const QString &  key,
const QString &  value 
)

Definition at line 914 of file mythcorecontext.cpp.

Referenced by MythContextPrivate::EndTempWindow().

Dispatch an event to all listeners.

Makes a copy of the event on the heap by calling MythEvent::clone() and dispatches is by calling QCoreApplication::postEvent().

Parameters:
eventMythEvent to dispatch.

Reimplemented from MythObservable.

Definition at line 1188 of file mythcorecontext.cpp.

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

Dispatch an event to all listeners.

This sends an event using the current thread, this is almost always unsafe.

Parameters:
eventa MythEvent to dispatch.
Deprecated:
Do not use in new code

Reimplemented from MythObservable.

Definition at line 1195 of file mythcorecontext.cpp.

Referenced by sendPlaybackEnd(), and sendPlaybackStart().

Definition at line 1263 of file mythcorecontext.cpp.

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

Definition at line 1274 of file mythcorecontext.cpp.

Referenced by reloadTheme(), and resetTheme().

const QLocale MythCoreContext::GetQLocale ( void  )

Definition at line 1295 of file mythcorecontext.cpp.

Referenced by MythContextPrivate::Init().

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 1250 of file mythcorecontext.cpp.

Referenced by MythUIVirtualKeyboard::Create(), GetLanguage(), MythUIText::ParseElement(), and MythThemedMenu::parseThemeButton().

Definition at line 1258 of file mythcorecontext.cpp.

Referenced by MythUIHelper::LoadQtConfig().

void MythCoreContext::connected ( MythSocket sock) [inline, private, virtual]

Implements MythSocketCBs.

Definition at line 173 of file mythcorecontext.h.

void MythCoreContext::connectionFailed ( MythSocket sock) [inline, private, virtual]

Implements MythSocketCBs.

Definition at line 174 of file mythcorecontext.h.

void MythCoreContext::connectionClosed ( MythSocket sock) [private, virtual]

Implements MythSocketCBs.

Definition at line 1116 of file mythcorecontext.cpp.

void MythCoreContext::readyRead ( MythSocket sock) [private, virtual]

Implements MythSocketCBs.

Definition at line 1078 of file mythcorecontext.cpp.


Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends