XmlRpcMethodResponse * vortex_xml_rpc_method_response_new XmlRpcResponseStatus  status,
gint  fault_code,
gchar *  fault_string,
XmlRpcMethodValue value
 

Allows to create a new XmlRpcMethodResponse object, representing a request reply having either a XmlRpcMethodValue or a error code with a fault string.

Usually this function is not called directly by API consumers. This function is used by the Vortex XML-RPC implementation to create XmlRpcMethodResponse object from data received as a reply or due to a failure to report.

Parameters:
status The status code to be used for this method response. If the the status value used is XML_RPC_OK, then the object returned will be a positive reply containing the given XmlRpcMethodValue reference received. In the case the status is not XML_RPC_OK, then the object generated will be a negative reply containing an status code with an error message.
fault_code The status code to be used according to the value of the status value received.
fault_string The status message to be set according to the value of the status value received. This value, in the case it is provided, will be copied. Caller could deallocate the string provided just after returning this function.
value The XmlRpcMethodValue to be set if the given status value is XML_RPC_OK. The reference provided to this function will not be duplicated and the XmlRpcMethodResponse object should be the unique owner of the reference received. Keep in mind that the value received will be deallocated once called to vortex_xml_rpc_method_response_free.
Returns:
A new XmlRpcMethodResponse object that must be deallocated by using vortex_xml_rpc_method_response_free. The function could fail, returning NULL if either a XML_RPC_OK status is used and the value reference is null or the status value is not XML_RPC_OK and the fault_string is null.