#include <libmythbase/configuration.h>
|
| | XmlConfiguration () |
| |
| | XmlConfiguration (QString fileName) |
| |
| bool | Load () |
| |
| bool | Save () |
| |
| bool | FileExists () |
| |
| bool | GetValue (const QString &setting, const bool defaultValue) |
| |
| int | GetValue (const QString &setting, const int defaultValue) |
| |
| QString | GetValue (const QString &setting, const QString &defaultValue) |
| |
| QString | GetValue (const QString &setting, const char *defaultValue) |
| | get the string value stored as setting with a default C string. More...
|
| |
| void | SetValue (const QString &setting, bool value) |
| |
| void | SetValue (const QString &setting, int value) |
| |
| void | SetValue (const QString &setting, const char *value) |
| | set value to a C string; just in case, for overload resolution More...
|
| |
| void | SetValue (const QString &setting, const QString &value) |
| |
| void | ClearValue (const QString &setting) |
| |
| template<typename T > |
| std::enable_if_t< std::chrono::__is_duration< T >::value, T > | GetDuration (const QString &setting, T defaultValue=T::zero()) |
| |
| template<typename T > |
| std::enable_if_t< std::chrono::__is_duration< T >::value > | SetDuration (const QString &setting, T value) |
| |
|
| QDomNode | FindNode (const QString &setting, bool create) |
| |
| QDomNode | FindNode (QStringList &path, QDomNode ¤t, bool create) |
| |
| QString | GetValue (const QString &setting) |
| |
Definition at line 40 of file configuration.h.
◆ XmlConfiguration() [1/2]
| XmlConfiguration::XmlConfiguration |
( |
| ) |
|
|
inline |
◆ XmlConfiguration() [2/2]
| XmlConfiguration::XmlConfiguration |
( |
QString |
fileName | ) |
|
|
inlineexplicit |
◆ ClearValue()
| void XmlConfiguration::ClearValue |
( |
const QString & |
setting | ) |
|
◆ FileExists()
| bool XmlConfiguration::FileExists |
( |
| ) |
|
◆ FindNode() [1/2]
| QDomNode XmlConfiguration::FindNode |
( |
const QString & |
setting, |
|
|
bool |
create |
|
) |
| |
|
protected |
◆ FindNode() [2/2]
| QDomNode XmlConfiguration::FindNode |
( |
QStringList & |
path, |
|
|
QDomNode & |
current, |
|
|
bool |
create |
|
) |
| |
|
protected |
◆ GetDuration()
template<typename T >
| std::enable_if_t< std::chrono::__is_duration< T >::value, T > XmlConfiguration::GetDuration |
( |
const QString & |
setting, |
|
|
T |
defaultValue = T::zero() |
|
) |
| |
|
inline |
◆ GetValue() [1/5]
| QString XmlConfiguration::GetValue |
( |
const QString & |
setting | ) |
|
|
protected |
Definition at line 202 of file configuration.cpp.
Referenced by UPnpDeviceDesc::GetHostName(), MythHTTPServer::Init(), HTTPRequest::IsUrlProtected(), MediaRenderer::MediaRenderer(), MMulticastSocketDevice::MMulticastSocketDevice(), MythFEXML::MythFEXML(), UPnpDeviceDesc::OutputDevice(), anonymous_namespace{mythcontext.cpp}::GUISettingsCache::save(), SSDPExtension::SSDPExtension(), UPnpCDS::UPnpCDS(), UPnpCMGR::UPnpCMGR(), and UPnpMSRR::UPnpMSRR().
◆ GetValue() [2/5]
| bool XmlConfiguration::GetValue |
( |
const QString & |
setting, |
|
|
const bool |
defaultValue |
|
) |
| |
|
inline |
◆ GetValue() [3/5]
| QString XmlConfiguration::GetValue |
( |
const QString & |
setting, |
|
|
const char * |
defaultValue |
|
) |
| |
|
inline |
get the string value stored as setting with a default C string.
This fixes overload resolution, making it choose this instead of the bool one.
Definition at line 95 of file configuration.h.
◆ GetValue() [4/5]
| int XmlConfiguration::GetValue |
( |
const QString & |
setting, |
|
|
const int |
defaultValue |
|
) |
| |
|
inline |
◆ GetValue() [5/5]
| QString XmlConfiguration::GetValue |
( |
const QString & |
setting, |
|
|
const QString & |
defaultValue |
|
) |
| |
|
inline |
◆ Load()
| bool XmlConfiguration::Load |
( |
void |
| ) |
|
◆ Save()
| bool XmlConfiguration::Save |
( |
| ) |
|
◆ SetDuration()
template<typename T >
| std::enable_if_t< std::chrono::__is_duration< T >::value > XmlConfiguration::SetDuration |
( |
const QString & |
setting, |
|
|
T |
value |
|
) |
| |
|
inline |
◆ SetValue() [1/4]
| void XmlConfiguration::SetValue |
( |
const QString & |
setting, |
|
|
bool |
value |
|
) |
| |
|
inline |
◆ SetValue() [2/4]
| void XmlConfiguration::SetValue |
( |
const QString & |
setting, |
|
|
const char * |
value |
|
) |
| |
|
inline |
set value to a C string; just in case, for overload resolution
- Note
- : This should probably never be used since the C string should have already been converted to a QString.
Definition at line 113 of file configuration.h.
◆ SetValue() [3/4]
| void XmlConfiguration::SetValue |
( |
const QString & |
setting, |
|
|
const QString & |
value |
|
) |
| |
◆ SetValue() [4/4]
| void XmlConfiguration::SetValue |
( |
const QString & |
setting, |
|
|
int |
value |
|
) |
| |
|
inline |
◆ kDefaultDB
| const QString XmlConfiguration::kDefaultDB {"Database/"} |
|
inlinestatic |
◆ kDefaultFilename
| constexpr auto XmlConfiguration::kDefaultFilename = "config.xml" |
|
staticconstexpr |
◆ kDefaultMFE
| const QString XmlConfiguration::kDefaultMFE {"UPnP/MythFrontend/DefaultBackend/"} |
|
inlinestatic |
◆ kDefaultPIN
| const QString XmlConfiguration::kDefaultPIN {kDefaultMFE + "SecurityPin"} |
|
inlinestatic |
◆ kDefaultUSN
| const QString XmlConfiguration::kDefaultUSN {kDefaultMFE + "USN"} |
|
inlinestatic |
◆ kDefaultWOL
| const QString XmlConfiguration::kDefaultWOL {"WakeOnLAN/"} |
|
inlinestatic |
◆ m_config
| QDomDocument XmlConfiguration::m_config |
|
protected |
◆ m_fileName
◆ m_path
◆ m_rootNode
| QDomNode XmlConfiguration::m_rootNode |
|
protected |
The documentation for this class was generated from the following files: