file.h File Reference

File module header file. More...

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

Go to the source code of this file.

Data Structures

struct  file_t
 This struct is used for building the complete message of file. More...
 

Functions

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)
 
void file_destroy (file_t **file)
 

Detailed Description

File module header file.


Date
Sep 26, 2016 Meta and payload parts of file type are initialized and filled in this module.

Definition in file file.h.

Function Documentation

void file_destroy ( file_t **  file)

This function closes the file file_t data structure refers to and destroys the file_t data structure.

Parameters
[in]fileData structure file_t to destroy.

Definition at line 163 of file file.c.

References DEBUG_ENTRY, DEBUG_LEAVE, file_util_fclose(), MCL_FREE, MCL_NULL, and string_destroy().

Referenced by _store_list_destroy_callback(), file_initialize(), http_processor_get_access_token(), and mcl_store_new_file().

Here is the call graph for this function:

Here is the caller graph for this function:

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 
)

This function creates and initializes a data structure file_t for a given file and opens it for reading.

Parameters
[in]versionVersion of the file item meta.
[in]file_pathAbsolute path of the file to transfer.
[in]file_nameName of the file. This name will be assigned to the file that is being uploaded.
[in]file_typeType of the file.
[in]routingRouting information of file_t.
[out]fileData structure file_t.
Returns

Definition at line 22 of file file.c.

References ASSERT_CODE_MESSAGE, ASSERT_NOT_NULL, ASSERT_STATEMENT_CODE_MESSAGE, DEBUG_ENTRY, DEBUG_LEAVE, file_destroy(), file_util_check_if_regular_file(), file_util_fopen(), file_util_fstat(), MCL_FILE_CANNOT_BE_OPENED, MCL_NEW, MCL_NULL, MCL_OK, MCL_OUT_OF_MEMORY, MCL_TRUE, META_FIELD_PAYLOAD_TYPE_FILE, META_FIELD_TYPE_ITEM, meta_field_values, META_FIELD_VERSION_CURRENT, string_initialize_new(), string_initialize_static(), time_util_convert_to_iso_8601_format(), and string_t::type.

Referenced by http_processor_get_access_token(), and mcl_store_new_file().

Here is the call graph for this function:

Here is the caller graph for this function: