#define CREATE_OK_REPLY (   ctx,
  type,
  value 
)    vortex_xml_rpc_method_response_create (ctx, type, value);

Helper function to create positive XmlRpcMethodResponse objects by providing a reference to the XmlRpcMethodValue.

Because an XmlRpcMethodResponse could contain a positive or a negative reply, this macro definition is provided to allow creating positive replies that only needs to be defined the XmlRpcMethodValue to be replied.

Here is an example:

1 XmlRpcMethodValue * value;
2 XmlRpcMethodResponse * response;
3 
4 // create a positive reply using direct API (supposing we receive
5 // an XmlRpcMethodValue reference.
6 value = method_value_new (XML_RPC_INT_VALUE, INT_TO_PTR(1));
7 response = method_response_new (XML_RPC_OK, -1, NULL, value);
8 
9 // but you can write previous code as follows
10 response = CREATE_OK_REPLY (XML_RPC_INT_VALUE, 1);

See also CREATE_FAULT_REPLY to create a new XmlRpcMethodResponse but containing a negative reply.

Parameters
ctxThe context where the method reply is being created.
typeThe XmlRpcMethodValue type to be used while creating the XmlRpcMethodResponse reply.
valueThe XmlRpcMethodValue instance to be used for the XmlRpcMethodResponse to be created.
Returns
A newly created XmlRpcMethodResponse