Allows to create a new XmlRpcMethodValue object from the given type and the given value.
You can use this function to create parameters to be added to method objects (XmlRpcMethodCall) using:
You can also skip this function and go directly to add the value being created by this function to the method call using:
This function returns a new XmlRpcMethodValue reference which should be unrefered using vortex_xml_rpc_method_value_free.
This function will not perform a local copy for the given value unless XML_RPC_STRING_VALUE is provided. In that case a local copy is maded and the caller could unref the value provided just returing from this function.
This particular behavior is explained from the fact the other types like bool or int doesn't required to perform a local copy, and array and struct values are allocated through the provided interface creating a copy. But, there is no way to figure out if the string value received was allocated on the heap or it is an stack activated value or simple an static string.
|type ||The type to be created. |
|value ||The value associated with the type being created|
- A new reference to XmlRpcMethodValue object or NULL if it fails. The function could only fail if the given value is NULL or the type provided is not a valid value found in the enumeration, not including XML_RPC_UNKNOWN_VALUE.