int vortex_connection_set_profile_mask ( VortexConnection connection,
VortexProfileMaskFunc  mask,
axlPointer  user_data 
)

Allows to configure a profile mask, an external handler which is executed to check if a profile must be showed in the greetings process.

This function is not thread safe in the following sense: all mask installation must take place from the same thread, ensuring no more operation is taking place at the same time, modifying current mask configuration. Then, using current mask configuration could be done from several threads at the same time.

Once you have installed all masks required, the function will use vortex_connection_is_profile_filtered to check if some profile could be used.

Parameters
connectionThe connection that will be configured with the provided mask.
maskThe mask, a user space defined function which is executed to figure out if a particular profile must be showed.
user_dataUser defined data to be provided to the mask function once executed.
Returns
A unique identifier to refer to the mask installed. The function returns -1 if the function receives a null reference for the connection and the mask function.

References vortex_mutex_lock(), and vortex_mutex_unlock().