XmlRpcMethodCall * vortex_xml_rpc_method_call_new ( VortexCtx ctx,
const char *  methodName,
int  parameters 

Creates a new method call object, representing a remote procedure invocation.

The object created by this function could be understood as a object invocator, or a closure, that is, an high level object that represents an method to be invoked.

Once the object is created by this function, it is needed (if necessary) to add parameter values to it. This is done by using the following functions:

Once the method object is completely built, then a call to the following function is required to actually perform the invocation:

Once the XmlRpcMethodCall is created and used with the invocation API (vortex_xml_rpc_invoke_sync and vortex_xml_rpc_invoke), it will be deallocated automatically. This is done to avoid the problem caused to deallocate this object mainly for asynchronous invocation that makes really difficult to know when to done this operation.

However, this behaviour could be configured. See vortex_xml_rpc_method_call_must_release. Keep in mind that the invocator created by this function could be reused several times, maybe to implement a kind of cache. But, if configured the automatic release mechanism to not happen, you will responsible for calling to vortex_xml_rpc_method_call_free, when no longer needed the reference.

ctxContext where the method call was created.
methodNameThe method name to invoke. This value must be not NULL. The function will perform a local copy, so methodName passed in value could be unrefered once this function finish.
parametersThe number of parameters this method invocator object will contain. This value must be greater or equal to 0.
A new XmlRpcMethodCall object, or NULL if it fails. The function could only fail if it receive wrong parameters values according to parameter description.