MythTV  master
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
SOAPClient Class Reference

Subclass SOAPClient to perform actions using the command URL. More...

#include <soapclient.h>

Inheritance diagram for SOAPClient:
Inheritance graph
[legend]

Public Member Functions

 SOAPClient (const QUrl &url, const QString &sNamespace, const QString &sControlPath)
 Full SOAPClient constructor. More...
 
 SOAPClient ()=default
 Empty SOAPClient constructor. More...
 
virtual ~SOAPClient ()=default
 
bool Init (const QUrl &url, const QString &sNamespace, const QString &sControlPath)
 SOAPClient Initializer. More...
 

Protected Member Functions

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. More...
 
bool GetNodeValue (const QDomNode &node, const QString &sName, bool bDefault) const
 Gets the named value using QDomNode as the baseNode in the search, returns default if it is not found. More...
 
QString GetNodeValue (const QDomNode &node, const QString &sName, const QString &sDefault) const
 Gets the named value using QDomNode as the baseNode in the search, returns default if it is not found. More...
 
QString GetNodeValue (const QDomNode &node, const QString &sName, const char *sDefault) const
 
QDomNode FindNode (const QString &sName, const QDomNode &baseNode) const
 Used by GeNodeValue() methods to find the named node. More...
 
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+[/]+sControlPath). More...
 

Protected Attributes

QUrl m_url
 
QString m_sNamespace
 
QString m_sControlPath
 

Private Member Functions

QDomNode FindNodeInternal (QStringList &sParts, const QDomNode &curNode) const
 This is an internal function used to implement FindNode. More...
 

Detailed Description

Subclass SOAPClient to perform actions using the command URL.

Definition at line 24 of file soapclient.h.

Constructor & Destructor Documentation

◆ SOAPClient() [1/2]

SOAPClient::SOAPClient ( const QUrl &  url,
const QString &  sNamespace,
const QString &  sControlPath 
)

Full SOAPClient constructor.

After constructing the client with this constructor it is ready for SendSOAPRequest().

Parameters
urlThe host and port portion of the command URL
sNamespaceThe part of the action before the # character
sControlPathThe path portion of the command URL

Definition at line 30 of file soapclient.cpp.

◆ SOAPClient() [2/2]

SOAPClient::SOAPClient ( )
default

Empty SOAPClient constructor.

When this is used, Init() Must be called before SendSOAPRequest().

◆ ~SOAPClient()

virtual SOAPClient::~SOAPClient ( )
virtualdefault

Member Function Documentation

◆ Init()

bool SOAPClient::Init ( const QUrl &  url,
const QString &  sNamespace,
const QString &  sControlPath 
)

SOAPClient Initializer.

After constructing the client with the empty constructor call this before calling SendSOAPRequest() the first time.

Definition at line 42 of file soapclient.cpp.

◆ GetNodeValue() [1/4]

int SOAPClient::GetNodeValue ( const QDomNode &  node,
const QString &  sName,
int  nDefault 
) const
protected

Gets the named value using QDomNode as the baseNode in the search, returns default if it is not found.

Definition at line 107 of file soapclient.cpp.

Referenced by MythXMLClient::GetConnectionInfo(), GetNodeValue(), and SendSOAPRequest().

◆ GetNodeValue() [2/4]

bool SOAPClient::GetNodeValue ( const QDomNode &  node,
const QString &  sName,
bool  bDefault 
) const
protected

Gets the named value using QDomNode as the baseNode in the search, returns default if it is not found.

Definition at line 116 of file soapclient.cpp.

◆ GetNodeValue() [3/4]

QString SOAPClient::GetNodeValue ( const QDomNode &  node,
const QString &  sName,
const QString &  sDefault 
) const
protected

Gets the named value using QDomNode as the baseNode in the search, returns default if it is not found.

Definition at line 138 of file soapclient.cpp.

◆ GetNodeValue() [4/4]

QString SOAPClient::GetNodeValue ( const QDomNode &  node,
const QString &  sName,
const char *  sDefault 
) const
inlineprotected

Definition at line 49 of file soapclient.h.

◆ FindNode()

QDomNode SOAPClient::FindNode ( const QString &  sName,
const QDomNode &  baseNode 
) const
protected

Used by GeNodeValue() methods to find the named node.

Definition at line 80 of file soapclient.cpp.

Referenced by GetNodeValue(), and SendSOAPRequest().

◆ SendSOAPRequest()

QDomDocument SOAPClient::SendSOAPRequest ( const QString &  sMethod,
QStringMap list,
int &  nErrCode,
QString &  sErrDesc 
)
protected

Actually sends the sMethod action to the command URL specified in the constructor (url+[/]+sControlPath).

Parameters
sMethodmethod to be invoked. e.g. "SetChannel", "GetConnectionInfoResult"
listParsed as a series of key value pairs for the input params and then cleared and used for the output params.
nErrCodeset to zero on success, non-zero in case of error.
sErrDescreturns error description from device, when applicable.
Returns
Returns a QDomDocument containing output parameters on success.

Definition at line 178 of file soapclient.cpp.

Referenced by MythXMLClient::GetConnectionInfo().

◆ FindNodeInternal()

QDomNode SOAPClient::FindNodeInternal ( QStringList &  sParts,
const QDomNode &  curNode 
) const
private

This is an internal function used to implement FindNode.

Definition at line 88 of file soapclient.cpp.

Referenced by FindNode().

Member Data Documentation

◆ m_url

QUrl SOAPClient::m_url
protected

Definition at line 67 of file soapclient.h.

Referenced by Init(), and SendSOAPRequest().

◆ m_sNamespace

QString SOAPClient::m_sNamespace
protected

Definition at line 68 of file soapclient.h.

Referenced by Init(), and SendSOAPRequest().

◆ m_sControlPath

QString SOAPClient::m_sControlPath
protected

Definition at line 69 of file soapclient.h.

Referenced by Init(), and SendSOAPRequest().


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