26 DEBUG_ENTRY(
"const char *version = <%s>, const char *type = <%s>, const char *routing = <%p>, custom_data_t **custom_data = <%p>", version, type, routing, custom_data)
44 DEBUG_ENTRY(
"mcl_custom_data_t *custom_data = <%p>, const mcl_json_t *details = <%p>", custom_data, details)
59 DEBUG_ENTRY(
"mcl_custom_data_t *custom_data = <%p>, const mcl_uint8_t *content = <%p>, mcl_size_t content_size = <%u>", custom_data, content, content_size)
65 custom_data->payload.size = content_size;
66 custom_data->payload.buffer = (
mcl_uint8_t *)content;
74 DEBUG_ENTRY(
"custom_data_t **custom_data = <%p>", custom_data)
84 json_util_destroy(&((*custom_data)->meta.payload.details.custom_details.details_json));
94 DEBUG_ENTRY(
"custom_data_t *custom_data = <%p>, const char *type = <%s>, const char *version = <%s>, const char *routing = <%p>", custom_data, type, version, routing)
struct mcl_json_t mcl_json_t
This struct is used for json handling.
item_meta_t meta
Meta of custom data.
void string_destroy(string_t **string)
Destroys the allocated resources of the string.
Memory module header file.
Json util module header file.
static E_MCL_ERROR_CODE _initialize_custom_data_meta_fields(custom_data_t *custom_data, const char *type, const char *version, const char *routing)
E_MCL_ERROR_CODE string_initialize_new(const char *value, mcl_size_t value_length, string_t **string)
Initializes a new string_t object with the given value and length.
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.
mcl_uint8_t * buffer
Binary payload buffer.
E_MCL_ERROR_CODE custom_data_initialize(const char *version, const char *type, const char *routing, custom_data_t **custom_data)
Initializes custom_data.
#define ASSERT_NOT_NULL(argument)
mcl_size_t size
Binary payload size.
Log utility module header file.
Current version of meta field.
E_MCL_ERROR_CODE
MCL Error code definitions. Every function returning an error code uses this enum values...
binary_payload_t payload
Payload of custom data.
void json_util_destroy(json_t **root)
This function destroys root.
struct mcl_custom_data_t mcl_custom_data_t
This struct is used for building the custom data type.
#define ASSERT_STATEMENT_CODE_MESSAGE(condition, statement, return_code,...)
Custom data module interface header file.
General invalid parameter fail.
#define ASSERT_CODE_MESSAGE(condition, return_code,...)
Definitions module header file.
This struct is used for building the custom data type.
string_t meta_field_values[META_FIELD_VALUES_END]
E_MCL_ERROR_CODE json_util_duplicate(const json_t *source_json, mcl_bool_t with_children, json_t **duplicated_json)
This function duplicates source_json as duplicated_json.
Custom data module header file.
E_MCL_ERROR_CODE string_initialize_static(const char *value, mcl_size_t value_length, string_t **string)
Initializes a static string_t object with the given value and length.
void custom_data_destroy(custom_data_t **custom_data)
Destroys custom_data.
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.