Go to the documentation of this file.
16 #include "libmythbase/mythversion.h"
26 "urn:schemas-mythtv-org:service:MythTV:1",
37 if (pParams ==
nullptr)
46 list.insert(
"Pin", sPin );
49 "GetConnectionInfo", list, nErrCode, sErrDesc);
55 QDomNode oNode = xmlResults.namedItem(
"GetConnectionInfoResult" );
59 QDomNode dbNode = oNode.namedItem(
"Database" );
68 QDomNode wolNode = oNode.namedItem(
"WOL" );
75 QDomNode verNode = oNode.namedItem(
"Version" );
87 LOG(VB_GENERAL, LOG_ERR,
88 QString(
"MythXMLClient::GetConnectionInfo Failed - "
89 "Version Mismatch (%1,%2) != (%3,%4)")
93 MYTH_DATABASE_VERSION));
94 sMsg = QObject::tr(
"Version Mismatch",
"UPNP Errors");
103 LOG(VB_GENERAL, LOG_ERR,
104 QString(
"MythXMLClient::GetConnectionInfo Failed - (%1) %2")
105 .arg(nErrCode) .arg(sErrDesc));
110 ( nErrCode == 501 ) )
114 sMsg = QObject::tr(
"Not Authorized",
"UPNP Errors");
118 sMsg = QObject::tr(
"Unknown Error",
"UPNP Errors");
QString m_dbHostName
database server
@ UPnPResult_ActionFailed
Structure containing the basic Database parameters.
Subclass SOAPClient to perform actions using the command URL.
int GetNodeValue(const QDomNode &node, const QString &sName, int nDefault) const
Gets the named value using QDomNode as the baseNode in the search, returns default if it is not found...
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
QString m_dbType
database type (MySQL, Postgres, etc.)
QString m_verBranch
git branch
MythXMLClient(const QUrl &url)
std::chrono::seconds m_wolReconnect
seconds to wait for reconnect
int m_dbPort
database port
QString m_verVersion
git version string
QMap< QString, QString > QStringMap
QString m_verSchema
core schema version
QString m_dbPassword
DB password.
int m_wolRetry
times to retry to reconnect
QString m_dbName
database name
@ UPnPResult_ActionNotAuthorized
QString m_verProtocol
backend protocol
QString m_wolCommand
command to use for wake-on-lan
QString m_verBinary
binary library version
QString m_dbUserName
DB user name.
UPnPResultCode GetConnectionInfo(const QString &sPin, DatabaseParams *pParams, QString &sMsg)
@ UPnPResult_HumanInterventionRequired
QDomDocument SendSOAPRequest(const QString &sMethod, QStringMap &list, int &nErrCode, QString &sErrDesc)
Actually sends the sMethod action to the command URL specified in the constructor (url+[/]+sControlPa...
bool m_wolEnabled
true if wake-on-lan params are used
@ UPnPResult_MythTV_XmlParseError