void vortex_connection_set_data_full VortexConnection connection,
gchar *  key,
gpointer  value,
GDestroyNotify  key_destroy,
GDestroyNotify  value_destroy
 

Allows to store user space data into the connection like vortex_connection_set_data does but configuring functions to be used while unreferring data stored.

While storing user defined data into the connection it could be necessary to also define destroy functions for the value stored and the key stored. This allows to not worry about to free those data (including the key) once the connection is dropped.

This function allows to store data into the given connection defining destroy functions for the key and the value stored, per item.

 [...]
 void destroy_data_1 (gpointer data) 
 {
     // perform a memory deallocation for data1
 }
 
 void destroy_data_2 (gpointer data) 
 {
     // perform a memory deallocation for data2
 }
 [...]
 // store data 1 providing a destroy value function
 vortex_connection_set_data_full (connection, "some:data:1", 
                                  data_1, NULL, destroy_data_1);

 // store data 2 providing a destroy value function
 vortex_connection_set_data_full (connection, "some:data:2",
                                  data_2, NULL, destroy_data_2);
 [...]

Parameters:
connection The connection where the data will be stored.
key The unique string key value.
value The value to be stored associated to the given key.
key_destroy An optional key destroy function used to destroy (deallocate) memory used by the key.
value_destroy An optional value destroy function used to destroy (deallocate) memory used by the value.