void myqttd_ctx_set_data_full ( MyQttdCtx ctx,
const char *  key,
axlPointer  data,
axlDestroyFunc  key_destroy,
axlDestroyFunc  data_destroy 

Allows to configure user defined data indexed by the provided key, associated to the MyQttdCtx, with optionals destroy handlers.

This function is quite similar to myqttd_ctx_set_data but it also provides support to configure a set of handlers to be called to terminate data associated once finished MyQttdCtx.

ctxThe MyQttdCtx to configure with the provided data.
keyThe index string key under which the data will be retreived later using myqttd_ctx_get_data. The function do not support storing NULL keys.
dataThe user defined pointer to data to be stored. If NULL is provided the function will understand it as a removal request, calling to delete previously stored data indexed by the same key.
key_destroyOptional handler to destroy key stored.
data_destroyOptional handler to destroy value stored.

References myqtt_mutex_lock(), and myqtt_mutex_unlock().