custom_data.c File Reference

Custom data module implementation file. More...

Include dependency graph for custom_data.c:

Go to the source code of this file.

Functions

mcl_error_t mcl_custom_data_initialize (const char *version, mcl_custom_data_t **custom_data)
 
mcl_error_t mcl_custom_data_set_parameter (mcl_custom_data_t *custom_data, E_MCL_CUSTOM_DATA_PARAMETER parameter, const void *value)
 
mcl_error_t custom_data_validate (custom_data_t *custom_data)
 
void mcl_custom_data_destroy (mcl_custom_data_t **custom_data)
 

Detailed Description

Custom data module implementation file.

Definition in file custom_data.c.

Function Documentation

mcl_error_t custom_data_validate ( custom_data_t custom_data)

This function checks whether all mandatory parameters of a custom data are set or not.

Parameters
[in]custom_dataCustom data to validate.
Returns

Definition at line 104 of file custom_data.c.

References custom_data_payload_t::buffer, custom_data_payload_t::content_type, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_INVALID_PARAMETER, MCL_NULL, MCL_OK, custom_data_t::payload, custom_data_payload_t::size, custom_data_payload_t::type, and custom_data_payload_t::version.

Referenced by _store_add_data(), and connectivity_processor_exchange().

Here is the caller graph for this function:

void mcl_custom_data_destroy ( mcl_custom_data_t **  custom_data)

This function destroys custom data data structure.

Parameters
[in]custom_dataCustom data handle which is going to be destroyed.

Definition at line 122 of file custom_data.c.

References MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, mcl_json_util_destroy(), and MCL_NULL.

Referenced by _item_destroy(), and mcl_custom_data_initialize().

Here is the call graph for this function:

Here is the caller graph for this function:

mcl_error_t mcl_custom_data_initialize ( const char *  version,
mcl_custom_data_t **  custom_data 
)

This function creates and initializes a data struct of mcl_custom_data_t.

Parameters
[in]versionVersion of the custom data.
[out]custom_dataCustom data handle which is going to be initialized.
Returns

Definition at line 14 of file custom_data.c.

References MCL_ASSERT_NOT_NULL, mcl_custom_data_destroy(), MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FUNCTION_LEAVE_LABEL, MCL_ITEM_PREAMBLE, MCL_ITEM_TYPE_CUSTOM_DATA, MCL_NEW, MCL_NULL, MCL_OK, MCL_OUT_OF_MEMORY, and mcl_string_util_reset().

Here is the call graph for this function:

mcl_error_t mcl_custom_data_set_parameter ( mcl_custom_data_t custom_data,
E_MCL_CUSTOM_DATA_PARAMETER  parameter,
const void *  value 
)

This function is used to set a parameter of a custom data.

Parameters
[in]custom_dataCustom data to set its parameter.
[in]parameterOne of the parameters listed in E_MCL_CUSTOM_DATA_PARAMETER.
[in]valueNew value of the parameter.
Returns

Definition at line 61 of file custom_data.c.

References MCL_ASSERT_NOT_NULL, MCL_CUSTOM_DATA_PARAMETER_BUFFER, MCL_CUSTOM_DATA_PARAMETER_BUFFER_SIZE, MCL_CUSTOM_DATA_PARAMETER_CONTENT_TYPE, MCL_CUSTOM_DATA_PARAMETER_DETAILS, MCL_CUSTOM_DATA_PARAMETER_TYPE, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FUNCTION_LEAVE_LABEL, MCL_INVALID_PARAMETER, mcl_json_util_destroy(), mcl_json_util_duplicate(), MCL_OK, and mcl_string_util_reset().

Here is the call graph for this function: