20 static QString GetError(
const QString &where,
const MSqlQuery &query);
21 static void DBError(
const QString &where,
const MSqlQuery &query);
22 static QString DBErrorMessage(
const QSqlError &err);
24 QString GetDatabaseName()
const;
28 void SetLocalHostname(
const QString &name);
29 QString GetHostName(
void)
const;
31 void IgnoreDatabase(
bool bIgnore);
32 bool IsDatabaseIgnored(
void)
const;
34 void SetSuppressDBMessages(
bool bUpgraded);
35 bool SuppressDBMessages(
void)
const;
38 void ActivateSettingsCache(
bool activate =
true);
39 void OverrideSettingForSession(
const QString &key,
const QString &newValue);
40 void ClearOverrideSettingForSession(
const QString &key);
42 void SaveSetting(
const QString &key,
int newValue);
43 void SaveSetting(
const QString &key,
const QString &newValue);
44 bool SaveSettingOnHost(
const QString &key,
const QString &newValue,
46 bool ClearSetting(
const QString &key);
47 bool ClearSettingOnHost(
const QString &key,
const QString &host);
49 bool GetSettings(QMap<QString,QString> &_key_value_pairs);
51 QString GetSetting(
const QString &_key,
const QString &defaultval);
52 bool GetBoolSetting(
const QString &key,
bool defaultval);
53 int GetNumSetting(
const QString &key,
int defaultval);
54 double GetFloatSetting(
const QString &key,
double defaultval);
56 QString GetSetting(
const QString &key);
57 bool GetBoolSetting(
const QString &key);
58 int GetNumSetting(
const QString &key);
59 double GetFloatSetting(
const QString &key);
61 QString GetSettingOnHost(
62 const QString &_key,
const QString &_host,
const QString &defaultval);
63 int GetNumSettingOnHost(
64 const QString &key,
const QString &host,
int defaultval);
65 double GetFloatSettingOnHost(
66 const QString &key,
const QString &host,
double defaultval);
68 QString GetSettingOnHost(
const QString &key,
const QString &host);
69 int GetNumSettingOnHost(
const QString &key,
const QString &host);
70 double GetFloatSettingOnHost(
const QString &key,
const QString &host);
72 void GetResolutionSetting(
const QString &
type,
int &width,
int &height,
73 double &forced_aspect,
double &refresh_rate,
75 void GetResolutionSetting(
const QString &
t,
int &w,
int &h,
78 void WriteDelayedSettings(
void);
80 void SetHaveDBConnection(
bool connected);
81 void SetHaveSchema(
bool schema);
82 bool HaveSchema(
void)
const;
83 bool HaveValidDatabase(
void)
const;
85 static MythDB *getMythDB();
86 static void destroyMythDB();
87 static QString
toCommaList(
const QMap<QString, QVariant> &bindings,
95 Q_DISABLE_COPY_MOVE(MythDB);