typedef axl_bool(* VortexXmlRpcValidateResource)(VortexConnection *connection, int channel_number, const char *serverName, const char *resource_path, axlPointer user_data)

This async handler allows to control how is accepted XML-RPC initial boot channel based on a particular resource.

XML-RPC specificaiton states that the method invocation is considered as a two-phase invocation.

The first phase, the channel boot, is defined as a channel creation, where the XML-RPC profile is prepared and, under the same step, it is asked for a particular resource value to be supported by the server (or the listener which is actually the entity receiving the invocation).

The second step is actually the XML-RPC invocation.

This resource value, by default, is "/". This allows to group services under resources like: "/sales", "/sales/dep-a", etc. This also allows to ask to listerners if they support a particular interface. Think about grouping services, which represents a concrete interface, under the same resource. Then, listener that supports the resource are reporting that they, indeed, support a particular interface.

However, resource validation is not required at all. You can live without it safely.

As a note, you can pass a NULL handler reference to the vortex_xml_rpc_accept_negotiation, making the Vortex XML-RPC engine to accept all resources (resource validation always evaluated to true).

This function is used by:

Here is an example of a resource validation handler that accept all resources:

1 int validate_all_resources (VortexConnection * connection,
2  int channel_number,
3  char * serverName,
4  char * resource_path,
5  axlPointer user_data)
6 {
7  // This is a kind of useless validation handler because
8  // it is doing the same like passing a NULL reference.
9  //
10  // In this handler could be programmed any policy to validate a resource,
11  // maybe based on the connection source, the number of channels that the
12  // connection have, etc.
13  return true;
14 }
Parameters
connectionThe connection where the resource bootstrapping request was received.
channel_numberThe channel number to create requested.
serverNameAn optional serverName value to act as.
resource_pathThe resource path requested.
user_dataUser space data.
Returns
axl_true to accept resource requested. axl_false if not.