24 DEBUG_ENTRY(
"const char *version = <%p>, const char *file_path = <%p>, const char *file_name = <%p>, const char *file_type = <%p>, const char *routing = <%p>, file_t **file = <%p>",
25 version, file_path, file_name, file_type, routing, file)
35 (*file)->meta.details.routing =
MCL_NULL;
36 (*file)->meta.payload.type =
MCL_NULL;
37 (*file)->meta.payload.version =
MCL_NULL;
38 (*file)->meta.payload.details.file_details.file_name =
MCL_NULL;
39 (*file)->meta.payload.details.file_details.creation_date =
MCL_NULL;
40 (*file)->meta.payload.details.file_details.file_type =
MCL_NULL;
69 &((*file)->meta.payload.type));
100 (*file)->payload.size = file_attributes.st_size;
111 #if MCL_FILE_DOWNLOAD_ENABLED 115 DEBUG_ENTRY(
"mcl_file_t *file = <%p>, char **file_name = <%p>", file, file_name)
120 *file_name = file->meta.payload.details.file_details.file_name->buffer;
128 DEBUG_ENTRY(
"mcl_file_t *file = <%p>, mcl_size_t *file_size = <%p>", file, file_size)
133 *file_size = file->payload.size;
141 DEBUG_ENTRY(
"mcl_file_t *file = <%p>, mcl_uint8_t **buffer = <%p>", file, buffer)
146 *buffer = file->payload.buffer;
176 string_destroy(&((*file)->meta.payload.details.file_details.file_name));
177 string_destroy(&((*file)->meta.payload.details.file_details.creation_date));
178 string_destroy(&((*file)->meta.payload.details.file_details.file_type));
void string_destroy(string_t **string)
Destroys the allocated resources of the string.
Memory module header file.
void file_destroy(file_t **file)
File type of meta field payload.
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.
#define ASSERT_NOT_NULL(argument)
E_MCL_ERROR_CODE file_initialize(const char *version, const char *file_path, const char *file_name, const char *file_type, const char *routing, file_t **file)
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...
E_MCL_ERROR_CODE file_util_fopen(const char *file_name, const char *mode, void **file_descriptor)
E_MCL_STRING_TYPE type
Type of copy and destroy.
#define ASSERT_STATEMENT_CODE_MESSAGE(condition, statement, return_code,...)
This struct is used for building the complete message of file.
E_MCL_ERROR_CODE time_util_convert_to_iso_8601_format(const time_t *time_value, string_t **iso8601_formatted_time)
#define ASSERT_CODE_MESSAGE(condition, return_code,...)
Definitions module header file.
File utility module header file.
E_MCL_ERROR_CODE file_util_fclose(void *file_descriptor)
string_t meta_field_values[META_FIELD_VALUES_END]
E_MCL_ERROR_CODE file_util_fstat(void *file_descriptor, struct stat *file_attributes)
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.
mcl_bool_t file_util_check_if_regular_file(const mcl_stat_t *file_attributes)
struct mcl_file_t mcl_file_t
This struct is used for building the complete message of file.
Time utility module header file.