void vortex_channel_set_data_full ( VortexChannel channel,
axlPointer  key,
axlPointer  value,
axlDestroyFunc  key_destroy,
axlDestroyFunc  value_destroy 
)

Allows to store a pair key/value associated to the channel, with optional destroy handlers.

This allows to associate application data to the channel which can be easily retrieved later using vortex_channel_get_data.

The function allows to configure the set of destroy handlers to be called to dealloc key and value stored.

In the case a NULL reference is passed to the function as the value parameter, the pair key/value is removed from the channel, calling to associated destroy functions.

Parameters
channelChannel where data will be stored.
keyThe key index to look up for the data stored. Though the API expects an axlPointer, the hash storing values is configured to receive string keys.
valueThe data to be stored. NULL to remove previous data stored under the provided key.
key_destroyThe optional key destroy handler to be called to release the particular key provided.
value_destroyThe optional value destroy handler to be called to release the particular value provided.

See also:

NOTE: the function do not allows storing NULL value pointers.

References vortex_hash_remove(), and vortex_hash_replace_full().

Referenced by vortex_channel_set_data().