MythTV  master
Classes | Typedefs | Functions | Variables
mythdb.cpp File Reference
#include <vector>
#include <QReadWriteLock>
#include <QTextStream>
#include <QSqlError>
#include <QMutex>
#include <QFile>
#include <QHash>
#include <QDir>
#include "mythdb.h"
#include "mythdbcon.h"
#include "mythlogging.h"
#include "mythdirs.h"
#include "mythcorecontext.h"
Include dependency graph for mythdb.cpp:

Go to the source code of this file.

Classes

struct  SingleSetting
 
class  MythDBPrivate
 

Typedefs

using SettingsMap = QHash< QString, QString >
 

Functions

MythDBGetMythDB (void)
 
void DestroyMythDB (void)
 
static void clear (SettingsMap &cache, SettingsMap &overrides, const QString &myKey)
 

Variables

static MythDBmythdb = nullptr
 
static QMutex dbLock
 
const char * kSentinelValue = "<settings_sentinel_value>"
 
const char * kClearSettingValue = "<clear_setting_value>"
 
static const int settings_reserve = 61
 

Typedef Documentation

◆ SettingsMap

using SettingsMap = QHash<QString,QString>

Definition at line 62 of file mythdb.cpp.

Function Documentation

◆ GetMythDB()

MythDB* GetMythDB ( void  )

Definition at line 45 of file mythdb.cpp.

Referenced by AddPaintEngine(), MSqlQuery::ChannelCon(), MythThemedMenu::checkPinCode(), DBConfiguration::ClearValue(), LCD::connectToHost(), MythPainterWindow::CreatePainters(), MythMainWindow::customEvent(), MythThemedMenu::customEvent(), RadioStreamUpdateTask::DoCheckRun(), JobQueue::DoFlagCommercialsThread(), JobQueue::DoMetadataLookupThread(), JobQueue::DoTranscodeThread(), JobQueue::DoUserJobThread(), MythMainWindow::EnterStandby(), MythMainWindow::ExitStandby(), MythDisplay::GetDesiredScreen(), MythMainWindow::GetKey(), MythUIThemeCache::GetThemeCacheDir(), DBConfiguration::GetValue(), LCD::init(), MythMainWindow::Init(), MythLocale::Init(), MSqlQuery::InitCon(), MythDisplay::Initialise(), MythDisplay::InitScreenBounds(), UPnpDeviceDesc::InternalLoad(), DatabaseLogger::isDatabaseReady(), MythUITextEdit::keyPressEvent(), main(), MythUIClock::MythUIClock(), MythUIThemeCache::MythUIThemeCache(), MSqlDatabase::OpenDatabase(), RemoteFile::openSocket(), MythThemedMenu::parseThemeButton(), MSqlQuery::prepare(), MythUIThemeCache::PruneCacheDir(), MythMainWindow::RegisterJump(), MythMainWindow::RegisterKey(), MPoolThread::run(), EditMetadataCommon::saveAll(), MythMainWindow::SaveScreenShot(), MythDB::SaveSettingOnHost(), MSqlQuery::SchedCon(), LCD::SetupLCD(), DBConfiguration::SetValue(), MythThemedMenu::ShowMenu(), EditAlbumartDialog::showMenu(), MythMainWindow::ShowMouseCursor(), MythInputDeviceHandler::Start(), MSqlQuery::testDBConnection(), MThread::ThreadCleanup(), DBPurgeHandler::timerEvent(), MainServer::TruncateAndClose(), MusicMetadata::updateStreamList(), MusicPlayer::updateVolatileMetadata(), UpgradeMusicDatabaseSchema(), UpgradeTVDatabaseSchema(), MSqlQuery::~MSqlQuery(), and MythCoreContextPrivate::~MythCoreContextPrivate().

◆ DestroyMythDB()

void DestroyMythDB ( void  )

Definition at line 50 of file mythdb.cpp.

Referenced by MythCoreContextPrivate::~MythCoreContextPrivate().

◆ clear()

static void clear ( SettingsMap cache,
SettingsMap overrides,
const QString &  myKey 
)
static

Variable Documentation

◆ mythdb

MythDB* mythdb = nullptr
static

Definition at line 17 of file mythdb.cpp.

Referenced by MythDB::destroyMythDB(), and MythDB::getMythDB().

◆ dbLock

QMutex dbLock
static

Definition at line 18 of file mythdb.cpp.

Referenced by MythDB::destroyMythDB(), and MythDB::getMythDB().

◆ kSentinelValue

const char* kSentinelValue = "<settings_sentinel_value>"

◆ kClearSettingValue

const char* kClearSettingValue = "<clear_setting_value>"

Definition at line 22 of file mythdb.cpp.

Referenced by MythDB::ClearSettingOnHost(), and MythDB::SaveSettingOnHost().

◆ settings_reserve

const int settings_reserve = 61
static

Definition at line 91 of file mythdb.cpp.

Referenced by MythDB::ClearSettingsCache(), and MythDBPrivate::MythDBPrivate().