MythTV
master
|
Structure containing the basic Database parameters. More...
#include <libmythbase/mythdbparams.h>
Public Member Functions | |
DatabaseParams ()=default | |
void | LoadDefaults (void) |
Load sensible connection defaults. More... | |
bool | IsValid (const QString &source=QString("Unknown")) const |
bool | operator== (const DatabaseParams &other) const |
bool | operator!= (const DatabaseParams &other) const |
Public Attributes | |
QString | m_dbHostName {"localhost"} |
database server More... | |
bool | m_dbHostPing {false} |
No longer used. More... | |
int | m_dbPort {3306} |
database port More... | |
QString | m_dbUserName {"mythtv"} |
DB user name. More... | |
QString | m_dbPassword {"mythtv"} |
DB password. More... | |
QString | m_dbName {"mythconverg"} |
database name More... | |
QString | m_dbType {"QMYSQL"} |
database type (MySQL, Postgres, etc.) More... | |
bool | m_localEnabled {false} |
true if localHostName is not default More... | |
QString | m_localHostName {"my-unique-identifier-goes-here"} |
name used for loading/saving settings More... | |
bool | m_wolEnabled {false} |
true if wake-on-lan params are used More... | |
std::chrono::seconds | m_wolReconnect {0s} |
seconds to wait for reconnect More... | |
int | m_wolRetry {5} |
times to retry to reconnect More... | |
QString | m_wolCommand {"echo 'WOLsqlServerCommand not set'"} |
command to use for wake-on-lan More... | |
bool | m_forceSave {false} |
set to true to force a save of the settings file More... | |
QString | m_verVersion |
git version string More... | |
QString | m_verBranch |
git branch More... | |
QString | m_verProtocol |
backend protocol More... | |
QString | m_verBinary |
binary library version More... | |
QString | m_verSchema |
core schema version More... | |
Structure containing the basic Database parameters.
Definition at line 10 of file mythdbparams.h.
|
default |
void DatabaseParams::LoadDefaults | ( | void | ) |
Load sensible connection defaults.
This duplicates the initializer information, but is needed so that an existing object can be reset to the default values instead of creating a new object.
Definition at line 9 of file mythdbparams.cpp.
Referenced by MythContextPrivate::LoadDatabaseSettings().
bool DatabaseParams::IsValid | ( | const QString & | source = QString("Unknown") | ) | const |
Definition at line 36 of file mythdbparams.cpp.
Referenced by MythContextPrivate::LoadDatabaseSettings().
bool DatabaseParams::operator== | ( | const DatabaseParams & | other | ) | const |
Definition at line 65 of file mythdbparams.cpp.
|
inline |
Definition at line 19 of file mythdbparams.h.
QString DatabaseParams::m_dbHostName {"localhost"} |
database server
Definition at line 22 of file mythdbparams.h.
Referenced by BackendSelection::ConnectBackend(), DBUtil::DoBackup(), MythContextPrivate::EnableDBerrors(), MythXMLClient::GetConnectionInfo(), V2Myth::GetConnectionInfo(), V2Config::GetDatabaseStatus(), getDBParamters(), GetMythTestDB(), IsValid(), DatabaseSettings::Load(), MythContextPrivate::LoadDatabaseSettings(), LoadDefaults(), MSqlDatabase::OpenDatabase(), operator==(), MythContextPrivate::PromptForDatabaseParams(), SchemaUpgradeWizard::PromptForUpgrade(), DatabaseSettings::Save(), MythContextPrivate::SaveDatabaseParams(), V2Myth::SetConnectionInfo(), V2Config::SetDatabaseCredentials(), MythContextPrivate::SilenceDBerrors(), TestDatabase(), MythContextPrivate::TestDBconnection(), BackendSelection::TryDBfromURL(), and MythContextPrivate::UPnPconnect().
No longer used.
Definition at line 23 of file mythdbparams.h.
Referenced by V2Myth::GetConnectionInfo(), V2Config::GetDatabaseStatus(), MythContextPrivate::LoadDatabaseSettings(), LoadDefaults(), operator==(), MythContextPrivate::PromptForDatabaseParams(), DatabaseSettings::Save(), and MythContextPrivate::SaveDatabaseParams().
int DatabaseParams::m_dbPort {3306} |
database port
Definition at line 24 of file mythdbparams.h.
Referenced by DBUtil::DoBackup(), MythXMLClient::GetConnectionInfo(), V2Myth::GetConnectionInfo(), V2Config::GetDatabaseStatus(), DatabaseSettings::Load(), MythContextPrivate::LoadDatabaseSettings(), LoadDefaults(), MSqlDatabase::OpenDatabase(), operator==(), MythContextPrivate::PromptForDatabaseParams(), DatabaseSettings::Save(), MythContextPrivate::SaveDatabaseParams(), V2Myth::SetConnectionInfo(), V2Config::SetDatabaseCredentials(), TestDatabase(), and MythContextPrivate::TestDBconnection().
QString DatabaseParams::m_dbUserName {"mythtv"} |
DB user name.
Definition at line 25 of file mythdbparams.h.
Referenced by DBUtil::DoBackup(), MythXMLClient::GetConnectionInfo(), V2Myth::GetConnectionInfo(), V2Config::GetDatabaseStatus(), getDBParamters(), IsValid(), DatabaseSettings::Load(), MythContextPrivate::LoadDatabaseSettings(), LoadDefaults(), MSqlDatabase::OpenDatabase(), operator==(), MythContextPrivate::PromptForDatabaseParams(), DatabaseSettings::Save(), MythContextPrivate::SaveDatabaseParams(), V2Myth::SetConnectionInfo(), V2Config::SetDatabaseCredentials(), and TestDatabase().
QString DatabaseParams::m_dbPassword {"mythtv"} |
DB password.
Definition at line 26 of file mythdbparams.h.
Referenced by DBUtil::DoBackup(), MythXMLClient::GetConnectionInfo(), V2Myth::GetConnectionInfo(), V2Config::GetDatabaseStatus(), getDBParamters(), IsValid(), DatabaseSettings::Load(), MythContextPrivate::LoadDatabaseSettings(), LoadDefaults(), MSqlDatabase::OpenDatabase(), operator==(), MythContextPrivate::PromptForDatabaseParams(), DatabaseSettings::Save(), MythContextPrivate::SaveDatabaseParams(), V2Myth::SetConnectionInfo(), V2Config::SetDatabaseCredentials(), and TestDatabase().
QString DatabaseParams::m_dbName {"mythconverg"} |
database name
Definition at line 27 of file mythdbparams.h.
Referenced by DBUtil::DoBackup(), MythXMLClient::GetConnectionInfo(), V2Myth::GetConnectionInfo(), V2Config::GetDatabaseStatus(), getDBParamters(), IsValid(), DatabaseSettings::Load(), MythContextPrivate::LoadDatabaseSettings(), LoadDefaults(), MSqlDatabase::OpenDatabase(), operator==(), MythContextPrivate::PromptForDatabaseParams(), SchemaUpgradeWizard::PromptForUpgrade(), DatabaseSettings::Save(), MythContextPrivate::SaveDatabaseParams(), V2Myth::SetConnectionInfo(), V2Config::SetDatabaseCredentials(), and TestDatabase().
QString DatabaseParams::m_dbType {"QMYSQL"} |
database type (MySQL, Postgres, etc.)
Definition at line 28 of file mythdbparams.h.
Referenced by MythXMLClient::GetConnectionInfo(), V2Myth::GetConnectionInfo(), V2Config::GetDatabaseStatus(), LoadDefaults(), operator==(), MDBManager::popConnection(), and DatabaseSettings::Save().
true if localHostName is not default
Definition at line 30 of file mythdbparams.h.
Referenced by V2Myth::GetConnectionInfo(), V2Config::GetDatabaseStatus(), DatabaseSettings::Load(), MythContextPrivate::LoadDatabaseSettings(), LoadDefaults(), operator==(), MythContextPrivate::PromptForDatabaseParams(), DatabaseSettings::Save(), and V2Config::SetDatabaseCredentials().
QString DatabaseParams::m_localHostName {"my-unique-identifier-goes-here"} |
name used for loading/saving settings
Definition at line 31 of file mythdbparams.h.
Referenced by V2Myth::GetConnectionInfo(), V2Config::GetDatabaseStatus(), DatabaseSettings::Load(), MythContextPrivate::LoadDatabaseSettings(), LoadDefaults(), operator==(), MythContextPrivate::PromptForDatabaseParams(), DatabaseSettings::Save(), MythContextPrivate::SaveDatabaseParams(), and V2Config::SetDatabaseCredentials().
true if wake-on-lan params are used
Definition at line 34 of file mythdbparams.h.
Referenced by MythContextPrivate::FindDatabase(), MythXMLClient::GetConnectionInfo(), V2Myth::GetConnectionInfo(), V2Config::GetDatabaseStatus(), DatabaseSettings::Load(), MythContextPrivate::LoadDatabaseSettings(), LoadDefaults(), MSqlDatabase::OpenDatabase(), operator==(), MythContextPrivate::PromptForDatabaseParams(), DatabaseSettings::Save(), MythContextPrivate::SaveDatabaseParams(), V2Myth::SetConnectionInfo(), V2Config::SetDatabaseCredentials(), TestDatabase(), and MythContextPrivate::TestDBconnection().
std::chrono::seconds DatabaseParams::m_wolReconnect {0s} |
seconds to wait for reconnect
Definition at line 35 of file mythdbparams.h.
Referenced by MythContextPrivate::FindDatabase(), MythXMLClient::GetConnectionInfo(), V2Myth::GetConnectionInfo(), V2Config::GetDatabaseStatus(), DatabaseSettings::Load(), MythContextPrivate::LoadDatabaseSettings(), LoadDefaults(), MSqlDatabase::OpenDatabase(), operator==(), MythContextPrivate::PromptForDatabaseParams(), DatabaseSettings::Save(), MythContextPrivate::SaveDatabaseParams(), V2Myth::SetConnectionInfo(), V2Config::SetDatabaseCredentials(), TestDatabase(), and MythContextPrivate::TestDBconnection().
int DatabaseParams::m_wolRetry {5} |
times to retry to reconnect
Definition at line 36 of file mythdbparams.h.
Referenced by MythContextPrivate::FindDatabase(), MythXMLClient::GetConnectionInfo(), V2Myth::GetConnectionInfo(), V2Config::GetDatabaseStatus(), DatabaseSettings::Load(), MythContextPrivate::LoadDatabaseSettings(), LoadDefaults(), MSqlDatabase::OpenDatabase(), operator==(), MythContextPrivate::PromptForDatabaseParams(), DatabaseSettings::Save(), MythContextPrivate::SaveDatabaseParams(), V2Myth::SetConnectionInfo(), V2Config::SetDatabaseCredentials(), TestDatabase(), and MythContextPrivate::TestDBconnection().
QString DatabaseParams::m_wolCommand {"echo 'WOLsqlServerCommand not set'"} |
command to use for wake-on-lan
Definition at line 37 of file mythdbparams.h.
Referenced by MythContextPrivate::FindDatabase(), MythXMLClient::GetConnectionInfo(), V2Myth::GetConnectionInfo(), V2Config::GetDatabaseStatus(), DatabaseSettings::Load(), MythContextPrivate::LoadDatabaseSettings(), LoadDefaults(), MSqlDatabase::OpenDatabase(), operator==(), MythContextPrivate::PromptForDatabaseParams(), DatabaseSettings::Save(), MythContextPrivate::SaveDatabaseParams(), V2Myth::SetConnectionInfo(), V2Config::SetDatabaseCredentials(), TestDatabase(), and MythContextPrivate::TestDBconnection().
set to true to force a save of the settings file
Definition at line 40 of file mythdbparams.h.
Referenced by MythContextPrivate::FindDatabase(), and LoadDefaults().
QString DatabaseParams::m_verVersion |
git version string
Definition at line 42 of file mythdbparams.h.
Referenced by MythXMLClient::GetConnectionInfo(), and LoadDefaults().
QString DatabaseParams::m_verBranch |
git branch
Definition at line 43 of file mythdbparams.h.
Referenced by MythXMLClient::GetConnectionInfo(), and LoadDefaults().
QString DatabaseParams::m_verProtocol |
backend protocol
Definition at line 44 of file mythdbparams.h.
Referenced by MythXMLClient::GetConnectionInfo(), and LoadDefaults().
QString DatabaseParams::m_verBinary |
binary library version
Definition at line 45 of file mythdbparams.h.
Referenced by MythXMLClient::GetConnectionInfo(), and LoadDefaults().
QString DatabaseParams::m_verSchema |
core schema version
Definition at line 46 of file mythdbparams.h.
Referenced by MythXMLClient::GetConnectionInfo(), and LoadDefaults().