Main Page   Class Hierarchy   Compound List   File List   Compound Members  

XRMethodResponse Class Reference

#include <xrmethodresponse.h>

List of all members.

Public Methods

 XRMethodResponse ()
 XRMethodResponse (const QVariant &result)
 XRMethodResponse (int faultCode, const QString &faultString)
bool parseXmlRpc ()
bool getFault (int &faultCode, QString &faultString) const
const QVariant & getResponse () const

Static Protected Methods

void faultToDomDoc (int fault_code, const QString &fault_string, QDomDocument &doc)
bool fromDomDoc (const QDomDocument &doc, QVariant &result, bool &isFault)
void responseToDomDoc (const QVariant &result, QDomDocument &doc)

Protected Attributes

bool _is_fault
int _fault_code
QString _fault_string
QVariant _response


Detailed Description

Represents the XML structure for XML-RPC method responses. Handles serialization and deserialization through QDomDocument.


Constructor & Destructor Documentation

XRMethodResponse::XRMethodResponse  
 

Creates an empty XRMethodResponse. This is for use with the QDomDocument methods for initializing from XML, particularly QDomDocument::setContent.

XRMethodResponse::XRMethodResponse const QVariant &    result
 

Creates a non-fault result.

Parameters:
result  the param for this result

XRMethodResponse::XRMethodResponse int    faultCode,
const QString &    faultString
 

Create a fault result

Parameters:
faultCode  the code for the fault.
faultString  the string for the fault.
See also:
http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php


Member Function Documentation

bool XRMethodResponse::getFault int &    faultCode,
QString &    faultString
const
 

Parameters:
faultCode  gets set to the fault code if return is true
faultString  gets set to the fault string if return is true
Returns:
true if this response is a fault

const QVariant& XRMethodResponse::getResponse   const [inline]
 

Returns:
the NON-FAULT response. If this is a fault, this returns the null QVariant.

bool XRMethodResponse::parseXmlRpc  
 

This must be called after using any QDomDocument setting methods.

Returns:
true if the underlying QDomDocument is a valid xmlrpc message


The documentation for this class was generated from the following files:
Generated on Tue Feb 25 18:38:57 2003 for qutexr by doxygen1.2.15