Core configuration module interface header file. More...
#include "mcl_core/mcl_core_common.h"
Go to the source code of this file.
Typedefs | |
typedef struct mcl_core_configuration_t | mcl_core_configuration_t |
Functions | |
MCL_CORE_EXPORT mcl_error_t | mcl_core_configuration_initialize (mcl_core_configuration_t **configuration) |
MCL_CORE_EXPORT mcl_error_t | mcl_core_configuration_set_parameter (mcl_core_configuration_t *configuration, E_MCL_CORE_CONFIGURATION_PARAMETER parameter, const void *value) |
MCL_CORE_EXPORT void | mcl_core_configuration_destroy (mcl_core_configuration_t **configuration) |
Core configuration module interface header file.
This module is used for configuring core component.
Definition in file mcl_core_configuration.h.
typedef struct mcl_core_configuration_t mcl_core_configuration_t |
This is the handle for core configuration instance.
Definition at line 24 of file mcl_core_configuration.h.
Parameters for core configuration.
Enumerator | |
---|---|
MCL_CORE_CONFIGURATION_PARAMETER_MDSP_HOST |
Mindsphere hostname parameter as char*. |
MCL_CORE_CONFIGURATION_PARAMETER_MDSP_PORT |
Mindsphere port parameter as mcl_uint16_t. |
MCL_CORE_CONFIGURATION_PARAMETER_CERTIFICATE |
Mindsphere certificate parameter as char*. If certificate is not set (as itself or as file), default CA certificate store will be used (if available). |
MCL_CORE_CONFIGURATION_PARAMETER_CERTIFICATE_FILE |
Mindsphere certificate file parameter as char*. If certificate is not set (as itself or as file), default CA certificate store will be used (if available). |
MCL_CORE_CONFIGURATION_PARAMETER_PROXY_TYPE |
Proxy type parameter as E_MCL_PROXY. Mandatory if proxy host name is set, ineffective otherwise. |
MCL_CORE_CONFIGURATION_PARAMETER_PROXY_HOST |
Proxy host name parameter as char* (optional). |
MCL_CORE_CONFIGURATION_PARAMETER_PROXY_PORT |
Proxy port number parameter as mcl_uint16_t. Mandatory if proxy host name is set, ineffective otherwise. |
MCL_CORE_CONFIGURATION_PARAMETER_PROXY_USER |
Proxy username parameter as char*. Optional if proxy host name is set, ineffective otherwise. |
MCL_CORE_CONFIGURATION_PARAMETER_PROXY_PASS |
Proxy password parameter as char*. Mandatory if proxy host name and proxy username are set, ineffective otherwise. |
MCL_CORE_CONFIGURATION_PARAMETER_PROXY_DOMAIN |
Proxy domain parameter as char*. Optional if proxy host name and proxy username are set, ineffective otherwise. |
MCL_CORE_CONFIGURATION_PARAMETER_SECURITY_PROFILE |
Security profile parameter as E_MCL_SECURITY_PROFILE. |
MCL_CORE_CONFIGURATION_PARAMETER_MAX_HTTP_PAYLOAD_SIZE |
This is an obsolete parameter. Setting it will have no effect. |
MCL_CORE_CONFIGURATION_PARAMETER_HTTP_REQUEST_TIMEOUT |
HTTP request timeout (in seconds) parameter as mcl_uint32_t. Default timeout is 300 seconds. |
MCL_CORE_CONFIGURATION_PARAMETER_USER_AGENT |
User agent parameter as char*. |
MCL_CORE_CONFIGURATION_PARAMETER_TENANT |
Tenant parameter as char*. |
MCL_CORE_CONFIGURATION_PARAMETER_IAT |
Initial access token parameter as char*. |
MCL_CORE_CONFIGURATION_PARAMETER_CREDENTIALS_LOAD_CALLBACK |
Custom function for loading credentials parameter as mcl_credentials_load_callback_t. |
MCL_CORE_CONFIGURATION_PARAMETER_CREDENTIALS_SAVE_CALLBACK |
Custom function for saving credentials parameter as mcl_credentials_save_callback_t. |
MCL_CORE_CONFIGURATION_PARAMETER_CRITICAL_SECTION_ENTER_CALLBACK |
Custom function for entering critical section parameter as mcl_critical_section_enter_callback_t (optional, default is NULL). |
MCL_CORE_CONFIGURATION_PARAMETER_CRITICAL_SECTION_LEAVE_CALLBACK |
Custom function for leaving critical section parameter as mcl_critical_section_leave_callback_t (optional, default is NULL). |
MCL_CORE_CONFIGURATION_PARAMETER_END |
Definition at line 29 of file mcl_core_configuration.h.
MCL_CORE_EXPORT void mcl_core_configuration_destroy | ( | mcl_core_configuration_t ** | configuration | ) |
This function destroys the mcl_core_configuration_t data structure.
[in] | configuration | Core 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_CORE_EXPORT 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.
[out] | configuration | Data structure holding the configuration parameters. |
configuration
is NULL. 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_CORE_EXPORT 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.
[in] | configuration | Core configuration to set its parameter. |
[in] | parameter | One of the parameters listed in E_MCL_CORE_CONFIGURATION_PARAMETER. |
[in] | value | New value of the parameter . |
configuration
or value
is NULL. parameter
is invalid. 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.