mcl_custom_data.h File Reference

Custom data module interface header file. More...

Include dependency graph for mcl_custom_data.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct mcl_custom_data_t mcl_custom_data_t
 

Enumerations

enum  E_MCL_CUSTOM_DATA_PARAMETER {
  MCL_CUSTOM_DATA_PARAMETER_CONTENT_TYPE = 0, MCL_CUSTOM_DATA_PARAMETER_TYPE, MCL_CUSTOM_DATA_PARAMETER_BUFFER, MCL_CUSTOM_DATA_PARAMETER_BUFFER_SIZE,
  MCL_CUSTOM_DATA_PARAMETER_DETAILS, MCL_CUSTOM_DATA_PARAMETER_END
}
 

Functions

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

Detailed Description

Custom data module interface header file.

Definition in file mcl_custom_data.h.

Typedef Documentation

Handle for custom data.

Definition at line 35 of file mcl_custom_data.h.

Enumeration Type Documentation

Parameters for custom data.

Enumerator
MCL_CUSTOM_DATA_PARAMETER_CONTENT_TYPE 

Custom data content type parameter as char*.

MCL_CUSTOM_DATA_PARAMETER_TYPE 

Custom data type parameter as char*.

MCL_CUSTOM_DATA_PARAMETER_BUFFER 

Custom data buffer parameter as char*.

MCL_CUSTOM_DATA_PARAMETER_BUFFER_SIZE 

Custom data buffer size parameter as mcl_size_t.

MCL_CUSTOM_DATA_PARAMETER_DETAILS 

Custom data details parameter as mcl_json_t* (optional).

MCL_CUSTOM_DATA_PARAMETER_END 

Definition at line 22 of file mcl_custom_data.h.

Function Documentation

MCL_CONNECTIVITY_EXPORT 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_CONNECTIVITY_EXPORT 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_CONNECTIVITY_EXPORT 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: