core_configuration.c File Reference

Core configuration module implementation file. More...

Include dependency graph for core_configuration.c:

Go to the source code of this file.

Macros

#define USER_AGENT_HEADER_FORMAT   "MCL/" MCL_VERSION_STRING " (%s)"
 

Functions

mcl_error_t mcl_core_configuration_initialize (mcl_core_configuration_t **configuration)
 
mcl_error_t mcl_core_configuration_set_parameter (mcl_core_configuration_t *configuration, E_MCL_CORE_CONFIGURATION_PARAMETER parameter, const void *value)
 
mcl_error_t core_configuration_validate (core_configuration_t *configuration)
 
void mcl_core_configuration_destroy (mcl_core_configuration_t **configuration)
 
void core_configuration_log (core_configuration_t *configuration)
 

Detailed Description

Core configuration module implementation file.

Definition in file core_configuration.c.

Macro Definition Documentation

#define USER_AGENT_HEADER_FORMAT   "MCL/" MCL_VERSION_STRING " (%s)"

Definition at line 17 of file core_configuration.c.

Referenced by mcl_core_configuration_set_parameter().

Function Documentation

mcl_error_t core_configuration_validate ( core_configuration_t configuration)

This function checks whether all mandatory parameters of a core configuration are set or not.

Parameters
[in]configurationCore configuration to validate.
Returns

Definition at line 196 of file core_configuration.c.

References MAXIMUM_HOST_NAME_LENGTH, MAXIMUM_PROXY_DOMAIN_LENGTH, MAXIMUM_PROXY_PASSWORD_LENGTH, MAXIMUM_PROXY_USER_NAME_LENGTH, MAXIMUM_USER_AGENT_LENGTH, MCL_ASSERT_CODE, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_INVALID_PARAMETER, MCL_NULL, MCL_OK, core_configuration_t::mindsphere_hostname, core_configuration_t::proxy_domain, core_configuration_t::proxy_hostname, core_configuration_t::proxy_password, core_configuration_t::proxy_username, string_util_strnlen(), core_configuration_t::tenant, and core_configuration_t::user_agent.

Referenced by mcl_core_initialize().

Here is the call graph for this function:

Here is the caller graph for this function:

void mcl_core_configuration_destroy ( mcl_core_configuration_t **  configuration)

This function destroys the mcl_core_configuration_t data structure.

Parameters
[in]configurationCore configuration handle which is going to be destroyed.

Definition at line 253 of file core_configuration.c.

References MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, MCL_NULL, and MCL_OK.

mcl_error_t mcl_core_configuration_initialize ( mcl_core_configuration_t **  configuration)

This function initializes a new mcl_core_configuration_t data structure with default values.

Parameters
[out]configurationData structure holding the configuration parameters.
Returns

Definition at line 19 of file core_configuration.c.

References DEFAULT_HTTP_REQUEST_TIMEOUT, MCL_ASSERT_CODE_MESSAGE, MCL_ASSERT_NOT_NULL, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FUNCTION_LEAVE_LABEL, MCL_NEW, MCL_NULL, MCL_OK, MCL_OUT_OF_MEMORY, MCL_PROXY_UNKNOWN, and MCL_SECURITY_SHARED_SECRET.

mcl_error_t mcl_core_configuration_set_parameter ( mcl_core_configuration_t configuration,
E_MCL_CORE_CONFIGURATION_PARAMETER  parameter,
const void *  value 
)

This function is used to set a parameter of a core configuration.

Parameters
[in]configurationCore configuration to set its parameter.
[in]parameterOne of the parameters listed in E_MCL_CORE_CONFIGURATION_PARAMETER.
[in]valueNew value of the parameter.
Returns

Definition at line 57 of file core_configuration.c.

References MCL_ASSERT_CODE_MESSAGE, MCL_ASSERT_NOT_NULL, MCL_CORE_CONFIGURATION_PARAMETER_CERTIFICATE, MCL_CORE_CONFIGURATION_PARAMETER_CERTIFICATE_FILE, MCL_CORE_CONFIGURATION_PARAMETER_CREDENTIALS_LOAD_CALLBACK, MCL_CORE_CONFIGURATION_PARAMETER_CREDENTIALS_SAVE_CALLBACK, MCL_CORE_CONFIGURATION_PARAMETER_CRITICAL_SECTION_ENTER_CALLBACK, MCL_CORE_CONFIGURATION_PARAMETER_CRITICAL_SECTION_LEAVE_CALLBACK, MCL_CORE_CONFIGURATION_PARAMETER_HTTP_REQUEST_TIMEOUT, MCL_CORE_CONFIGURATION_PARAMETER_IAT, MCL_CORE_CONFIGURATION_PARAMETER_MAX_HTTP_PAYLOAD_SIZE, MCL_CORE_CONFIGURATION_PARAMETER_MDSP_HOST, MCL_CORE_CONFIGURATION_PARAMETER_MDSP_PORT, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_DOMAIN, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_HOST, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_PASS, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_PORT, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_TYPE, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_USER, MCL_CORE_CONFIGURATION_PARAMETER_SECURITY_PROFILE, MCL_CORE_CONFIGURATION_PARAMETER_TENANT, MCL_CORE_CONFIGURATION_PARAMETER_USER_AGENT, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FALSE, MCL_FREE, MCL_FUNCTION_LEAVE_LABEL, MCL_INVALID_PARAMETER, MCL_MALLOC, MCL_NO_FILE_SUPPORT, MCL_NULL, MCL_NULL_CHAR_SIZE, MCL_OK, MCL_OUT_OF_MEMORY, MCL_PROXY_END, MCL_PROXY_HTTP, MCL_SECURITY_PROFILE_END, MCL_SECURITY_SHARED_SECRET, mcl_string_util_reset(), mcl_string_util_snprintf(), mcl_string_util_strlen(), MCL_TRUE, MCL_VERSION_STRING, and USER_AGENT_HEADER_FORMAT.

Here is the call graph for this function: