Main Page   Class Hierarchy   Compound List   File List   Compound Members  

XRClient Class Reference

#include <xrclient.h>

List of all members.

Public Slots

void setUrl (const QString &u)

Signals

void methodResponse (int response_num, const QVariant &response)
void fault (int response_num, int fault_num, const QString &fault_string)

Public Methods

 XRClient (const QUrl &server_url, QObject *parent=0, const char *name=0)
 ~XRClient ()
void acceptCompressed (bool arg)
int call (const QString &method, const QValueList< QVariant > &params)
const QUrl & getUrl () const
void setUrl (const QUrl &server_url)

Protected Slots

void processHttpResponse (int http_resp, bool error)
void processHeaders (const QHttpResponseHeader &resp)

Protected Attributes

QHttp _http_client
QUrl _url
bool _is_deflated
bool _accept_compressed
QMap< int, QBuffer * > _buffer_map

Static Protected Attributes

const QString USER_AGENT = "QuteXmlRpc/0.0"


Detailed Description

Represents the client which calls the methods on the remote machine.
See also:
http://www.xmlrpc.com/spec , http://www.ietf.org/internet-drafts/draft-megacz-xmc-01.txt


Constructor & Destructor Documentation

XRClient::XRClient const QUrl &    server_url,
QObject *    parent = 0,
const char *    name = 0
 

Parameters:
server_url  the URL to the server for this client


Member Function Documentation

void XRClient::acceptCompressed bool    arg [inline]
 

Allow the server to send us compressed (deflate) responses. Useful to turn this off if debugging with a network sniffing tool

int XRClient::call const QString &    method,
const QValueList< QVariant > &    params
 

Parameters:
method  the method on the server to call
params  a list of the parameters
Returns:
the identifier for this response

void XRClient::fault int    response_num,
int    fault_num,
const QString &    fault_string
[signal]
 

Parameters:
response_num  the response number for this fault
fault_num  the faultCode.
fault_string  the faultString
See also:
http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php , call

const QUrl& XRClient::getUrl   const [inline]
 

Returns:
the url of the XML-RPC server

void XRClient::methodResponse int    response_num,
const QVariant &    response
[signal]
 

this signal is emitted when a NON-FAULT XML-RPC response is recieved. You must also watch for the fault signals

Parameters:
response_num  the response number for this fault
response  the deserialized response to the methodCall
See also:
call

void XRClient::processHttpResponse int    http_resp,
bool    error
[protected, slot]
 

connected to QHttp methods to handle the Http responses.

void XRClient::setUrl const QString &    u [slot]
 

this is slot which is useful for some GUI widgets


Member Data Documentation

QMap<int, QBuffer*> XRClient::_buffer_map [protected]
 

Stores the buffers for each request. These buffers are deleted after the request is handled.

const QString XRClient::USER_AGENT = "QuteXmlRpc/0.0" [static, protected]
 

This is the string passed in the User-Agent: header field.


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