Custom data module interface header file. More...
#include "mcl_common.h"
Go to the source code of this file.
Typedefs | |
typedef struct mcl_custom_data_t | mcl_custom_data_t |
This struct is used for building the custom data type. More... | |
typedef struct mcl_json_t | mcl_json_t |
This struct is used for json handling. More... | |
Functions | |
MCL_EXPORT E_MCL_ERROR_CODE | mcl_custom_data_set_meta_details (mcl_custom_data_t *custom_data, const mcl_json_t *details) |
Adds a custom details object to custom_data . More... | |
MCL_EXPORT E_MCL_ERROR_CODE | mcl_custom_data_set_payload (mcl_custom_data_t *custom_data, const mcl_uint8_t *content, mcl_size_t content_size) |
Sets payload contents. More... | |
Custom data module interface header file.
Definition in file mcl_custom_data.h.
typedef struct mcl_custom_data_t mcl_custom_data_t |
This struct is used for building the custom data type.
Definition at line 29 of file mcl_custom_data.h.
typedef struct mcl_json_t mcl_json_t |
This struct is used for json handling.
Definition at line 34 of file mcl_custom_data.h.
MCL_EXPORT E_MCL_ERROR_CODE mcl_custom_data_set_meta_details | ( | mcl_custom_data_t * | custom_data, |
const mcl_json_t * | details | ||
) |
Adds a custom details
object to custom_data
.
[in] | custom_data | All meta and payload details, content etc. stored in this data struct. |
[in] | details | A custom json object to form meta details of custom_data . New memory space will be allocated for this parameter. Ownership passed to caller. Caller must free the space. |
custom_data
or details
is NULL. Definition at line 42 of file custom_data.c.
References ASSERT_NOT_NULL, DEBUG_ENTRY, DEBUG_LEAVE, json_util_duplicate(), and MCL_TRUE.
Referenced by mcl_stream_data_set_meta_details().
MCL_EXPORT E_MCL_ERROR_CODE mcl_custom_data_set_payload | ( | mcl_custom_data_t * | custom_data, |
const mcl_uint8_t * | content, | ||
mcl_size_t | content_size | ||
) |
Sets payload contents.
[in] | custom_data | All meta and payload details, content etc. stored in this data struct. |
[in] | content | Payload content. Payload can contain binary data as well |
[in] | content_size | Payload content size. |
custom_data
or content
is NULL. content_length
is not bigger than zero. Definition at line 57 of file custom_data.c.
References ASSERT_CODE_MESSAGE, ASSERT_NOT_NULL, DEBUG_ENTRY, DEBUG_LEAVE, MCL_INVALID_PARAMETER, and MCL_OK.