QXmlRPC
1.1
|
The xmlrpc::Response class contains XmlRPC response information. More...
#include <response.h>
Public Member Functions | |
Response () | |
Response (const Variant &returnValue) | |
Response (int faultCode, const QString &faultString) | |
bool | isNull () const |
bool | isFault () const |
int | faultCode () const |
QString | faultString () const |
Variant | returnValue () const |
bool | setContent (const QByteArray &requestData, QString *errorMessage=0) |
QByteArray | composeResponse () const |
The xmlrpc::Response class contains XmlRPC response information.
xmlrpc::Response class is usually not intended to be used directly but from the xmlrpc::Server and xmlrpc::Client, except of building custom server implementation.
Response::Response | ( | ) |
Construct an emty XmlRPC request.
Response::Response | ( | const Variant & | returnValue | ) |
Construct XmlRPC successful response with returnValue value
References returnValue().
Response::Response | ( | int | faultCode, |
const QString & | faultString | ||
) |
Construct XmlRPC failed response with faultCode and faultString values
References faultCode(), and faultString().
QByteArray Response::composeResponse | ( | ) | const |
Compose XmlRPC response data.
References faultCode(), faultString(), isFault(), and isNull().
Referenced by xmlrpc::Server::sendReturnValue().
int Response::faultCode | ( | ) | const |
Returns fault code assotiated with this response.
It is valid only for fault responses.
References isFault().
Referenced by composeResponse(), and Response().
QString Response::faultString | ( | ) | const |
Returns fault string assotiated with this response.
It is valid only for fault responses.
References isFault().
Referenced by composeResponse(), and Response().
bool Response::isFault | ( | ) | const |
Returns true is this response is fault response.
Referenced by composeResponse(), faultCode(), faultString(), and returnValue().
bool Response::isNull | ( | ) | const |
Returns true if the response is null ( not initialised ); otherwise returns false.
Referenced by composeResponse().
Variant Response::returnValue | ( | ) | const |
Returns return value assotiated with this response.
It is valid only for not fault responses.
References isFault().
Referenced by Response().
bool Response::setContent | ( | const QByteArray & | responseData, |
QString * | errorMessage = 0 |
||
) |
This function parses the XML-RPC response from the byte array requestData. If a parse error occurs, this function returns false and the error message is placed in * errorMessage.