Data Delivery C API Library Reference
1.2
|
Data Structures | |
struct | ddca_conf_profile_t |
Configuration variable type for DDCA Configuration API. More... | |
Functions | |
int | ddca_conf_load_profile (const char *profile_filename, ddca_conf_profile_t **profile) |
load a profile specified with the filename | |
int | ddca_conf_get_string_value (const ddca_conf_profile_t *profile, const char *name, char **ret) |
get a string value of a specified attribute from given profile variable | |
int | ddca_conf_get_bool_value (const ddca_conf_profile_t *profile, const char *name, ddca_bool_t *ret) |
get a bool value of a specified attribute from given profile variable | |
int | ddca_conf_get_int_value (const ddca_conf_profile_t *profile, const char *name, ddca_int32_t *ret) |
get an int value of a specified attribute from given profile variable | |
int | ddca_conf_get_double_value (const ddca_conf_profile_t *profile, const char *name, ddca_double64_t *ret) |
get a double value of a specified attribute from given profile variable | |
int | ddca_conf_is_null_value (const ddca_conf_profile_t *profile, const char *name, int *ret) |
return whether a specified attribute in the given profile variable is null or not | |
int | ddca_conf_get_map (const ddca_conf_profile_t *profile, const char *name, ddca_map_t **ret) |
get a ddca_map_t instance of a specified attribute from given event variable | |
int | ddca_conf_get_array (const ddca_conf_profile_t *profile, const char *name, ddca_array_t **ret) |
get a ddca_array_t instance of a specified attribute from given profile variable | |
int | ddca_conf_put_string_value (ddca_conf_profile_t *profile, const char *name, const char *value) |
add a pair of key/value string attribute to the specified profile variable | |
int | ddca_conf_put_bool_value (ddca_conf_profile_t *profile, const char *name, const ddca_bool_t value) |
add a pair of string key and bool value attribute to the specified profile variable | |
int | ddca_conf_put_int_value (ddca_conf_profile_t *profile, const char *name, const ddca_int32_t value) |
add a pair of string key and int value attribute to the specified profile variable | |
int | ddca_conf_put_double_value (ddca_conf_profile_t *profile, const char *name, const ddca_double64_t value) |
add a pair of string key and double value attribute to the specified profile variable | |
int | ddca_conf_put_null (ddca_conf_profile_t *profile, const char *name) |
add a pair of string key and null value attribute to the specified profile variable | |
int | ddca_conf_put_map (ddca_conf_profile_t *profile, const char *name, ddca_map_t *map) |
add a pair of string key and ddca_map_t variable to the specified profile variable | |
int | ddca_conf_put_array (ddca_conf_profile_t *profile, const char *name, ddca_array_t *array) |
add a pair of string key and ddca_array_t variable to the specified profile variable | |
int | ddca_conf_del_value (ddca_conf_profile_t *profile, const char *name) |
delete a specified object from the ddca_conf_profile_t object |
int ddca_conf_del_value | ( | ddca_conf_profile_t * | profile, |
const char * | name | ||
) |
delete a specified object from the ddca_conf_profile_t object
This function deletes an object specified with the name from the ddca_conf_profile_t object . This function works only the same level as the given variable; use ddca_get_object and this function to delete the nested attribute.
[in,out] | *profile | profile variable to delete from |
[in] | *name | profile name to be deleted |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_get_array | ( | const ddca_conf_profile_t * | profile, |
const char * | name, | ||
ddca_array_t ** | ret | ||
) |
get a ddca_array_t instance of a specified attribute from given profile variable
This function searches and returns a ddca_array_t instance of a specified attribute from given profile variable. This function do not search the nested values. So the attribute to be returned must locate the same level as the given profile variable. Note that the output array must not be freed since this function return the reference to it.
[in] | *profile | profile variable to search |
[in] | *name | name of attribute to get |
[out] | **ret | variable to accumulate the result |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_get_bool_value | ( | const ddca_conf_profile_t * | profile, |
const char * | name, | ||
ddca_bool_t * | ret | ||
) |
get a bool value of a specified attribute from given profile variable
This function searches and returns a bool value of a specified attribute from given profile variable. This function do not search the nested values. So the attribute to be returned must locate the same level as the given profile variable. Note that the bool value is represented as a ddca_bool_t type and DDCA_BOOL value.
[in] | *profile | profile variable to search |
[in] | *name | name of attribute to get |
[out] | *ret | variable to accumulate the result |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_get_double_value | ( | const ddca_conf_profile_t * | profile, |
const char * | name, | ||
ddca_double64_t * | ret | ||
) |
get a double value of a specified attribute from given profile variable
This function searches and returns a double value of a specified attribute from given profile variable. This function do not search the nested values. So the attribute to be returned must locate the same level as the given profile variable.
[in] | *profile | profile variable to search |
[in] | *name | name of attribute to get |
[out] | *ret | variable to accumulate the result |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_get_int_value | ( | const ddca_conf_profile_t * | profile, |
const char * | name, | ||
ddca_int32_t * | ret | ||
) |
get an int value of a specified attribute from given profile variable
This function searches and returns an int value of a specified attribute from given profile variable. This function do not search the nested values. So the attribute to be returned must locate the same level as the given profile variable.
[in] | *profile | profile variable to search |
[in] | *name | name of attribute to get |
[out] | *ret | variable to accumulate the result |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_get_map | ( | const ddca_conf_profile_t * | profile, |
const char * | name, | ||
ddca_map_t ** | ret | ||
) |
get a ddca_map_t instance of a specified attribute from given event variable
This function searches and returns a ddca_map_t instance of a specified attribute from given profile variable. This function do not search the nested values. So the attribute to be returned must locate the same level as the given profile variable. Note that the output map must not be freed since this function return the reference to it.
[in] | *profile | profile variable to search |
[in] | *name | name of attribute to get |
[out] | **ret | variable to accumulate the result |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_get_string_value | ( | const ddca_conf_profile_t * | profile, |
const char * | name, | ||
char ** | ret | ||
) |
get a string value of a specified attribute from given profile variable
This function searches and returns a string value of a specified attribute from given profile variable. This function do not search the nested values. So the attribute to be returned must locate the same level as the given profile variable. Note that the output string must be freed after the use.
[in] | *profile | profile variable to search |
[in] | *name | name of attribute to get |
[out] | **ret | variable to accumulate the result |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_is_null_value | ( | const ddca_conf_profile_t * | profile, |
const char * | name, | ||
int * | ret | ||
) |
return whether a specified attribute in the given profile variable is null or not
This function searches and returns the result whether a specified attribute in the given profile variable is null or not. This function do not search the nested values. So the attribute to be returned must locate the same level as the given profile variable.
[in] | *profile | profile variable to search |
[in] | *name | name of attribute to get |
[out] | *ret | variable to accumulate the result |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_load_profile | ( | const char * | profile_filename, |
ddca_conf_profile_t ** | profile | ||
) |
load a profile specified with the filename
This function loads a profile from the specified profile filename.
[in] | *profile_filename | the filename of the profile |
[out] | **profile | the variable to accumulate the loaded profile |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_put_array | ( | ddca_conf_profile_t * | profile, |
const char * | name, | ||
ddca_array_t * | array | ||
) |
add a pair of string key and ddca_array_t variable to the specified profile variable
This function adds a pair of string key and ddca_array_t variable to the specified profile variable. More than one attribute with the same name cannot be added to the same object. So if the key name to be added already exist to the target profile, this function will return failure. Note that the input array must not be freed since this function use the reference to it.
[in,out] | *profile | profile variable where the attribute will be added |
[in] | *name | name of attribute to be added |
[in] | *array | value to be added |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_put_bool_value | ( | ddca_conf_profile_t * | profile, |
const char * | name, | ||
const ddca_bool_t | value | ||
) |
add a pair of string key and bool value attribute to the specified profile variable
This function adds a pair of string key and bool value attribute to the specified profile variable. More than one attribute with the same name cannot be added to the same object. So if the key name to be added already exist to the target profile. this function will return failure.
[in,out] | *profile | profile variable where the attribute will be added |
[in] | *name | name of attribute to be added |
[in] | value | value to be added |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_put_double_value | ( | ddca_conf_profile_t * | profile, |
const char * | name, | ||
const ddca_double64_t | value | ||
) |
add a pair of string key and double value attribute to the specified profile variable
This function adds a pair of string key and double value attribute to the specified profile variable. More than one attribute with the same name cannot be added to the same object. So if the key name to be added already exist to the target profile, this function will return failure.
[in,out] | *profile | profile variable where the attribute will be added |
[in] | *name | name of attribute to be added |
[in] | value | value to be added |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_put_int_value | ( | ddca_conf_profile_t * | profile, |
const char * | name, | ||
const ddca_int32_t | value | ||
) |
add a pair of string key and int value attribute to the specified profile variable
This function adds a pair of string key and int value attribute to the specified profile variable. More than one attribute with the same name cannot be added to the same object. So if the key name to be added already exist to the target profile, this function will return failure.
[in,out] | *profile | profile variable where the attribute will be added |
[in] | *name | name of attribute to be added |
[in] | value | value to be added |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_put_map | ( | ddca_conf_profile_t * | profile, |
const char * | name, | ||
ddca_map_t * | map | ||
) |
add a pair of string key and ddca_map_t variable to the specified profile variable
This function adds a pair of string key and ddca_map_t variable to the specified profile variable. More than one attribute with the same name cannot be added to the same object. So if the key name to be added already exist to the target profile, this function will return failure. Note that the input map must not be freed since this function use the reference to it.
[in,out] | *profile | profile variable to add |
[in] | *name | name of attribute to be added |
[in] | *map | value to be added |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_put_null | ( | ddca_conf_profile_t * | profile, |
const char * | name | ||
) |
add a pair of string key and null value attribute to the specified profile variable
This function adds a pair of string key and null value attribute to the specified profile variable. More than one attribute with the same name cannot be added to the same object. So if the key name to be added already exist to the target profile, this function will return failure.
[in,out] | *profile | profile variable where the attribute will be added |
[in] | *name | name of attribute to be added |
DDCA_SUCCESS | operation success |
others | operation failure |
int ddca_conf_put_string_value | ( | ddca_conf_profile_t * | profile, |
const char * | name, | ||
const char * | value | ||
) |
add a pair of key/value string attribute to the specified profile variable
This function adds a pair of key/value string attribute to the specified profile variable. More than one attribute with the same name cannot be added to the same object. So if the key name to be added already exist to the target profile, this function will return failure. The input string can be freed if the function is success.
[in,out] | *profile | profile variable where the attribute will be added |
[in] | *name | name of attribute to be added |
[in] | *value | value to be added |
DDCA_SUCCESS | operation success |
others | operation failure |