int vortex_xml_rpc_method_value_get_as_int ( XmlRpcMethodValue value)

Allows to get current integer value from the given method value object (XmlRpcMethodValue).

This function not only is used to get param values for the type XML_RPC_INT_VALUE. Because the XML-RPC definition says that a boolean value is represented with the integer values 0 and 1, corresponding to axl_false and axl_true, this function is also used to get the value for a XML_RPC_BOOLEAN_VALUE.

Parameters
valueThe method value to get its value as an integer.
Returns
The Integer value or -1 if it fails. Keep in mind that, the stored value could be also -1. Check that you are not passing a method value that is NULL or it doesn't hold an integer.

References XML_RPC_BOOLEAN_VALUE, and XML_RPC_INT_VALUE.

Referenced by vortex_xml_rpc_struct_get_member_value_as_int().