MythTV  master
Public Member Functions | Public Attributes | List of all members
DatabaseParams Class Reference

Structure containing the basic Database parameters. More...

#include <mythdbparams.h>

Collaboration diagram for DatabaseParams:
Collaboration graph
[legend]

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 {true}
 Can we test connectivity using ping? 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...
 

Detailed Description

Structure containing the basic Database parameters.

Definition at line 10 of file mythdbparams.h.

Constructor & Destructor Documentation

◆ DatabaseParams()

DatabaseParams::DatabaseParams ( )
default

Member Function Documentation

◆ LoadDefaults()

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().

◆ IsValid()

bool DatabaseParams::IsValid ( const QString &  source = QString("Unknown")) const

Definition at line 36 of file mythdbparams.cpp.

Referenced by MythContextPrivate::LoadDatabaseSettings().

◆ operator==()

bool DatabaseParams::operator== ( const DatabaseParams other) const

Definition at line 65 of file mythdbparams.cpp.

◆ operator!=()

bool DatabaseParams::operator!= ( const DatabaseParams other) const
inline

Definition at line 19 of file mythdbparams.h.

Member Data Documentation

◆ m_dbHostName

QString DatabaseParams::m_dbHostName {"localhost"}

◆ m_dbHostPing

bool DatabaseParams::m_dbHostPing {true}

◆ m_dbPort

int DatabaseParams::m_dbPort {3306}

◆ m_dbUserName

QString DatabaseParams::m_dbUserName {"mythtv"}

◆ m_dbPassword

QString DatabaseParams::m_dbPassword {"mythtv"}

◆ m_dbName

QString DatabaseParams::m_dbName {"mythconverg"}

◆ m_dbType

QString DatabaseParams::m_dbType {"QMYSQL"}

◆ m_localEnabled

bool DatabaseParams::m_localEnabled {false}

◆ m_localHostName

QString DatabaseParams::m_localHostName {"my-unique-identifier-goes-here"}

◆ m_wolEnabled

bool DatabaseParams::m_wolEnabled {false}

◆ m_wolReconnect

std::chrono::seconds DatabaseParams::m_wolReconnect {0s}

◆ m_wolRetry

int DatabaseParams::m_wolRetry {5}

◆ m_wolCommand

QString DatabaseParams::m_wolCommand {"echo 'WOLsqlServerCommand not set'"}

◆ m_forceSave

bool DatabaseParams::m_forceSave {false}

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().

◆ m_verVersion

QString DatabaseParams::m_verVersion

git version string

Definition at line 42 of file mythdbparams.h.

Referenced by MythXMLClient::GetConnectionInfo(), and LoadDefaults().

◆ m_verBranch

QString DatabaseParams::m_verBranch

git branch

Definition at line 43 of file mythdbparams.h.

Referenced by MythXMLClient::GetConnectionInfo(), and LoadDefaults().

◆ m_verProtocol

QString DatabaseParams::m_verProtocol

backend protocol

Definition at line 44 of file mythdbparams.h.

Referenced by MythXMLClient::GetConnectionInfo(), and LoadDefaults().

◆ m_verBinary

QString DatabaseParams::m_verBinary

binary library version

Definition at line 45 of file mythdbparams.h.

Referenced by MythXMLClient::GetConnectionInfo(), and LoadDefaults().

◆ m_verSchema

QString DatabaseParams::m_verSchema

core schema version

Definition at line 46 of file mythdbparams.h.

Referenced by MythXMLClient::GetConnectionInfo(), and LoadDefaults().


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