VortexChannel * vortex_connection_get_channel_by_func ( VortexConnection connection,
VortexChannelSelector  selector,
axlPointer  user_data 

Allows to select a channel from the set of channels created on the provided connection, using a function that acts as a selector.

This function allows to provide a finer control while selecting channels already created on a connection. Similiar to the function provided by vortex_connection_get_channel_by_uri, this function allows implement more elaborated selection patters, especiall if it is found the same profile running several times (for examcple, xml-rpc with different resources).

The idea behind this function is that you provide a function which is called for each channel found on the connection until that function returns axl_true. For example:

 axl_bool  select_channel (VortexChannel * channel, axlPointer user_data)
       // implement here some selection pattern and return axl_true
       // to select
       return axl_true;

 // call to search using the function
 channel = vortex_connection_get_channel_by_func (connection,

connection The connection where the selection will be performed.
selector The function to be called for each channel found on the connection.
user_data A reference to user defined pointer to be passed to the function (func parameter).
A reference to the channel selected or NULL if it fails.