Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIXmlRpcClient Interface Reference

Simple XML-RPC client interface. More...

import "nsIXmlRpcClient.idl";

Inheritance diagram for nsIXmlRpcClient:
Inheritance graph
[legend]
Collaboration diagram for nsIXmlRpcClient:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void init (in string serverURL)
 Set server URL.
void setAuthentication (in string username, in string password)
 Set authentication info if needed.
void clearAuthentication (in string username, in string password)
 Clear authentication info.
void setEncoding (in string encoding)
 Set character encoding.
void asyncCall (in nsIXmlRpcClientListener listener, in nsISupports ctxt, in string methodName,[array, size_is(count)] in nsISupports arguments, in PRUint32 count)
 Call remote method methodName asynchronously with given arguments.
void createType (in unsigned long type, out nsIIDRef uuid,[iid_is(uuid), retval] out nsQIResult result)
 Convenience: return the correct nsISupportsPrimitive for a given XML-RPC type, or nsISupportsArray or nsIDictionary.

Public Attributes

readonly attribute nsIURL serverURL
 The URL of the XML-RPC server.
readonly attribute boolean inProgress
 Whether or not a call is in progress.
readonly attribute nsIXmlRpcFault fault
 The most recent XML-RPC fault from returned from this server.
readonly attribute nsISupports result
 The most recent XML-RPC call result returned from this server.
readonly attribute unsigned long responseStatus
 The most recent HTTP status code returned from this server null if the server was unreachable or not yet contacted.
readonly attribute unsigned long responseString
const unsigned long INT = 1
const unsigned long BOOLEAN = 2
const unsigned long STRING = 3
const unsigned long DOUBLE = 4
const unsigned long DATETIME = 5
const unsigned long ARRAY = 6
const unsigned long STRUCT = 7

Detailed Description

Simple XML-RPC client interface.

Definition at line 57 of file nsIXmlRpcClient.idl.


Member Function Documentation

void nsIXmlRpcClient::asyncCall ( in nsIXmlRpcClientListener  listener,
in nsISupports  ctxt,
in string  methodName,
[array, size_is(count)] in nsISupports  arguments,
in PRUint32  count 
)

Call remote method methodName asynchronously with given arguments.

Supported arguments are: nsISupportsPRUint8, nsISupportsPRUint16, nsISupportsPRInt16, nsISupportsPRInt32: <i4> nsISupportsPRBool: <boolean> nsISupportsChar, nsISupportsCString: <string> nsISupportsFloat, nsISupportsDouble: <double> nsISupportsPRTime: <dateTime.iso8601> nsIInputStream: <base64> nsISupportsArray: <array> nsIDictionary: <struct>

Note that both nsISupportsArray and nsIDictionary can only hold any of the supported input types.

Return value will be converted as follows: <i4> or <int>: nsISupportsPRInt32 <boolean>: nsISupportsPRBool <string>: nsISupportsCString <double>: nsISupportsDouble <dateTime.iso8601>: nsISupportsPRTime <base64>: nsISupportsCString <array>: nsISupportsArray <struct>: nsIDictionary

<fault>s (server side errors) are indicated by returning NS_ERROR_FAILURE. Via nsIXPConnect::GetPendingException()->data a nsIXmlRpcFault object can be retreieved with more information on the fault.

Parameters:
listenerA nsIXmlRpcClientListener that will get notified of XML-RPC events.
contextA context to be passed on to the listener.
methodNameRemote method to call.
argumentsArray of arguments to pass to remote method.
Returns:
Return value of remote method.

Clear authentication info.

void nsIXmlRpcClient::createType ( in unsigned long  type,
out nsIIDRef  uuid,
[iid_is(uuid), retval] out nsQIResult  result 
)

Convenience: return the correct nsISupportsPrimitive for a given XML-RPC type, or nsISupportsArray or nsIDictionary.

'base64' isn't supported. No QueryInterface call is needed, the object has been QueryInterfaced to the correct interface.

Parameters:
typeOne of the listed constants.
uuidThe uuid of the returned object. No QI call needed.
nsQIResultThe apropriate XPCOM object.

Set server URL.

Call this before using this object.

Parameters:
serverURLURL of server side object on which methods should be called.
void nsIXmlRpcClient::setAuthentication ( in string  username,
in string  password 
)

Set authentication info if needed.

Both parameters must be specified for authentication to be enabled.

Parameters:
usernameusername to be used if asked to authenticate
passwordpassword to be used if asked to authenticate

Set character encoding.

The default charset if this function is not called is "UTF-8".

Parameters:
encodingencoding charset to be used

Member Data Documentation

Definition at line 178 of file nsIXmlRpcClient.idl.

Definition at line 174 of file nsIXmlRpcClient.idl.

Definition at line 177 of file nsIXmlRpcClient.idl.

Definition at line 176 of file nsIXmlRpcClient.idl.

The most recent XML-RPC fault from returned from this server.

null if the last call didn't return an XML-RPC fault.

Definition at line 145 of file nsIXmlRpcClient.idl.

Whether or not a call is in progress.

Definition at line 139 of file nsIXmlRpcClient.idl.

Definition at line 173 of file nsIXmlRpcClient.idl.

The most recent HTTP status code returned from this server null if the server was unreachable or not yet contacted.

Definition at line 157 of file nsIXmlRpcClient.idl.

Definition at line 158 of file nsIXmlRpcClient.idl.

readonly attribute nsISupports nsIXmlRpcClient::result

The most recent XML-RPC call result returned from this server.

null if the last call didn't return a valid result

Definition at line 151 of file nsIXmlRpcClient.idl.

The URL of the XML-RPC server.

Definition at line 91 of file nsIXmlRpcClient.idl.

Definition at line 175 of file nsIXmlRpcClient.idl.

Definition at line 179 of file nsIXmlRpcClient.idl.


The documentation for this interface was generated from the following file: