Data Delivery C API Library Reference  2.0
Functions
ddca_cmn.h File Reference

Functions

int ddca_cmn_create_map (ddca_map_t **map)
 create an empty ddca_map_t instance
int ddca_cmn_delete_map (ddca_map_t *map)
 delete an entire ddca_map_t object
int ddca_cmn_put_string_value (ddca_map_t *map, const char *name, const char *value)
 add a pair of key/value string attribute to the specified ddca_map_t variable
int ddca_cmn_put_bool_value (ddca_map_t *evt, const char *name, const ddca_bool_t value)
 add a pair of string key and bool value attribute to the specified ddca_map_t variable
int ddca_cmn_put_int_value (ddca_map_t *map, const char *name, const ddca_int32_t value)
 add a pair of string key and int value attribute to the specified ddca_map_t variable
int ddca_cmn_put_double_value (ddca_map_t *map, const char *name, const ddca_double64_t value)
 add a pair of string key and double value attribute to the specified ddca_map_t variable
int ddca_cmn_put_null (ddca_map_t *map, const char *name)
 add a pair of string key and null value attribute to the specified ddca_map_t variable
int ddca_cmn_put_map (ddca_map_t *map, const char *name, ddca_map_t *child_map)
 add a ddca_map_t variable to the another ddca_map_t variable
int ddca_cmn_put_array (ddca_map_t *map, const char *name, ddca_array_t *array)
 add a ddca_array_t array to the ddca_map_t variable
int ddca_cmn_get_string_value (const ddca_map_t *map, const char *name, char **ret)
 get a string value of a specified attribute from given ddca_map_t variable
int ddca_cmn_get_bool_value (const ddca_map_t *map, const char *name, ddca_bool_t *ret)
 get a bool value of a specified attribute from given ddca_map_t variable
int ddca_cmn_get_int_value (const ddca_map_t *map, const char *name, ddca_int32_t *ret)
 get an int value of a specified attribute from given ddca_map_t variable
int ddca_cmn_get_double_value (const ddca_map_t *map, const char *name, ddca_double64_t *ret)
 get a double value of a specified attribute from given ddca_map_t variable
int ddca_cmn_is_null_value (const ddca_map_t *map, const char *name, int *ret)
 return whether a specified attribute in the given ddca_map_t variable is null or not
int ddca_cmn_get_map (const ddca_map_t *map, const char *name, ddca_map_t **ret)
 get a ddca_map_t object from the ddca_map_t variable
int ddca_cmn_get_array (const ddca_map_t *map, const char *name, ddca_array_t **ret)
 get a ddca_array_t array from the ddca_array_t variable
int ddca_cmn_del_value (ddca_map_t *map, const char *name)
 delete a specified object from the ddca_map_t object
int ddca_cmn_create_array (ddca_array_t **array)
 create an empty ddca_array_t array
int ddca_cmn_create_string_array (const char **strings, int count, ddca_array_t **array)
 create a ddca_array_t array of given string values
int ddca_cmn_create_bool_array (const ddca_bool_t *bools, int count, ddca_array_t **array)
 create a ddca_array_t array of given bool values
int ddca_cmn_create_int_array (const ddca_int32_t *numbers, int count, ddca_array_t **array)
 create a ddca_array_t array of given int values
int ddca_cmn_create_double_array (const ddca_double64_t *numbers, int count, ddca_array_t **array)
 create a ddca_array_t array of given double values
int ddca_cmn_delete_array (ddca_array_t *array)
 delete an entire ddca_array_t
int ddca_cmn_get_array_size (const ddca_array_t *array, int *size)
 get size of array from given array variable
int ddca_cmn_append_string_value_to_array (ddca_array_t *array, const char *value)
 add a string value to the specified array variable
int ddca_cmn_append_bool_value_to_array (ddca_array_t *array, const ddca_bool_t value)
 add a bool value to the specified array variable
int ddca_cmn_append_int_value_to_array (ddca_array_t *array, const ddca_int32_t value)
 add an int value to the specified array variable
int ddca_cmn_append_double_value_to_array (ddca_array_t *array, const ddca_double64_t value)
 add a double value to the specified array variable
int ddca_cmn_append_map_to_array (ddca_array_t *array, ddca_map_t *map)
 add a ddca_array_t object to the specified array variable
int ddca_cmn_append_array_to_array (ddca_array_t *array, ddca_array_t *child_array)
 add a ddca_array_t array to the specified array variable
int ddca_cmn_insert_string_value_to_array (ddca_array_t *array, int index, const char *value)
 insert a string value to the specified index of given array variable
int ddca_cmn_insert_bool_value_to_array (ddca_array_t *array, int index, const ddca_bool_t value)
 insert a bool value to the specified index of given array variable
int ddca_cmn_insert_int_value_to_array (ddca_array_t *array, int index, const ddca_int32_t value)
 insert an int value to the specified index of given array variable
int ddca_cmn_insert_double_value_to_array (ddca_array_t *array, int index, const ddca_double64_t value)
 insert a double value to the specified index of given array variable
int ddca_cmn_insert_map_to_array (ddca_array_t *array, int index, ddca_map_t *map)
 insert a ddca_array_t object to the specified index of given array variable
int ddca_cmn_insert_array_to_array (ddca_array_t *array, int index, ddca_array_t *child_array)
 insert a ddca_array_t array to the specified index of given array variable
int ddca_cmn_get_string_value_in_array (const ddca_array_t *array, int index, char **ret)
 get a string value at a specified index from given array variable
int ddca_cmn_get_bool_value_in_array (const ddca_array_t *array, int index, ddca_bool_t *ret)
 get a bool value at a specified index from given array variable
int ddca_cmn_get_int_value_in_array (const ddca_array_t *array, int index, ddca_int32_t *ret)
 get an int value at a specified index from given array variable
int ddca_cmn_get_double_value_in_array (const ddca_array_t *array, int index, ddca_double64_t *ret)
 get a double value at a specified index from given array variable
int ddca_cmn_get_map_in_array (const ddca_array_t *array, int index, ddca_map_t **ret)
 get a ddca_array_t object at a specified index from given array variable
int ddca_cmn_get_array_in_array (const ddca_array_t *array, int index, ddca_array_t **ret)
 get a ddca_array_t array at a specified index from given array variable
int ddca_cmn_del_value_from_array (ddca_array_t *array, int index)
 delete a value at the specified index from given array variable

Detailed Description


Function Documentation

int ddca_cmn_append_array_to_array ( ddca_array_t array,
ddca_array_t child_array 
)

add a ddca_array_t array to the specified array variable

This function adds a ddca_array_t array value to the specified array variable.

Parameters:
[in,out]*arrayarray variable where the chiled_array will be added
[in]*child_arrayarray variable to be added
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_append_bool_value_to_array ( ddca_array_t array,
const ddca_bool_t  value 
)

add a bool value to the specified array variable

This function adds a bool value to the specified array variable.

Parameters:
[in,out]*arrayarray variable where the value will be added
[in]valuevalue to be added
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_append_double_value_to_array ( ddca_array_t array,
const ddca_double64_t  value 
)

add a double value to the specified array variable

This function adds a double value to the specified array variable.

Parameters:
[in,out]*arrayarray variable where the value will be added
[in]valuevalue to be added
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_append_int_value_to_array ( ddca_array_t array,
const ddca_int32_t  value 
)

add an int value to the specified array variable

This function adds an int value to the specified array variable.

Parameters:
[in,out]*arrayarray variable where the value will be added
[in]valuevalue to be added
Return values:
DDCA_SUCCESSoperation success
othersoperation failure

add a ddca_array_t object to the specified array variable

This function adds a ddca_array_t object to the specified array variable.

Parameters:
[in,out]*arrayarray variable where the value will be added
[in]*mapddca_map_t variable to be added
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_append_string_value_to_array ( ddca_array_t array,
const char *  value 
)

add a string value to the specified array variable

This function adds a string value to the specified array variable.

Parameters:
[in,out]*arrayarray variable where the value will be added
[in]*valuevalue to be added
Return values:
DDCA_SUCCESSoperation success
othersoperation failure

create an empty ddca_array_t array

This function creates an empty ddca_array_t array. The ddca_array_t array accumulates the sequence of objects expressed by array.

Parameters:
[out]**arrayarray object to be created
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_create_bool_array ( const ddca_bool_t bools,
int  count,
ddca_array_t **  array 
)

create a ddca_array_t array of given bool values

This function creates a ddca_array_t array, and set bool values from given array of bool value to the ddca_array_t array.

Parameters:
[in]*boolsarray of bool values to set
[in]countnumber of bool values in bools array
[out]**arrayarray object to be created
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_create_double_array ( const ddca_double64_t *  numbers,
int  count,
ddca_array_t **  array 
)

create a ddca_array_t array of given double values

This function creates a ddca_array_t array, and set double values from given array of double value to the ddca_array_t array.

Parameters:
[in]*numbersarray of double values to set
[in]countnumber of double values in numbers array
[out]**arrayarray object to be created
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_create_int_array ( const ddca_int32_t *  numbers,
int  count,
ddca_array_t **  array 
)

create a ddca_array_t array of given int values

This function creates a ddca_array_t array, and set int values from given array of int value to the ddca_array_t array.

Parameters:
[in]*numbersarray of int values to set
[in]countnumber of int values in numbers array
[out]**arrayarray object to be created
Return values:
DDCA_SUCCESSoperation success
othersoperation failure

create an empty ddca_map_t instance

This function creates an empty ddca_map_t instance.

Parameters:
[out]**mapddca_map_t variable to be created
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_create_string_array ( const char **  strings,
int  count,
ddca_array_t **  array 
)

create a ddca_array_t array of given string values

This function creates a ddca_array_t array, and set string values from given array of string value to the ddca_array_t array.

Parameters:
[in]**stringsarray of string values to set
[in]countnumber of string values in strings array
[out]**arrayarray object to be created
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_del_value ( ddca_map_t map,
const char *  name 
)

delete a specified object from the ddca_map_t object

This function deletes an object specified with the name on the ddca_map_t object. This function works only the same level as the given variable; use ddca_get_object function and this function to delete the nested attribute.

Parameters:
[in]*mapddca_map_t variable to delete from
[in]*namekey name to be deleted
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_del_value_from_array ( ddca_array_t array,
int  index 
)

delete a value at the specified index from given array variable

This function deletes a value in the specified index from given array variable. Note that index starts from 0. So specify index between size of array - 1 and 0.

Parameters:
[in]*arrayarray variable to delete
[in]indexnumber of index to delete
Return values:
DDCA_SUCCESSoperation success
othersoperation failure

delete an entire ddca_array_t

This function deletes the ddca_array_t object and all its component objects.

Parameters:
[in]*arrayddca_array_t variable to delete
Return values:
DDCA_SUCCESSoperation success
othersoperation failure

delete an entire ddca_map_t object

This function deletes the ddca_map_t object and all its descendants put to this object.

Parameters:
[in]*mapddca_map_t variable to delete
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_get_array ( const ddca_map_t map,
const char *  name,
ddca_array_t **  ret 
)

get a ddca_array_t array from the ddca_array_t variable

This function searches and gets a ddca_array_t array from the ddca_array_t variable specified by the attribute name. Note that the output array must not be freed since this function return the reference to it.

Parameters:
[in]*mapddca_map_t variable to search
[in]*namename of attribute to get
[out]**retvariable to accumulate the result
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_get_array_in_array ( const ddca_array_t array,
int  index,
ddca_array_t **  ret 
)

get a ddca_array_t array at a specified index from given array variable

This function searches and gets a ddca_array_t array at a specified index from given array variable. Note that index starts from 0. So specify index between size of array - 1 and 0. Note that the output array must not be freed since this function return the reference to it.

Parameters:
[in]*arrayarray variable to search
[in]indexnumber of index to get
[out]**retvariable to accumulate the result
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_get_array_size ( const ddca_array_t array,
int *  size 
)

get size of array from given array variable

This function counts the number of the element included in the specified array variable and returns it.

Parameters:
[in]*arrayarray variable
[out]*sizearray size
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_get_bool_value ( const ddca_map_t map,
const char *  name,
ddca_bool_t ret 
)

get a bool value of a specified attribute from given ddca_map_t variable

This function searches and returns a bool value of a specified attribute from given ddca_map_t variable. This function do not search the nested values. So the attribute to be returned must locate the same level as the given ddca_map_t variable. Note that the bool value is represented as a ddca_bool_t type and DDCA_BOOL value.

Parameters:
[in]*mapddca_map_t variable to search
[in]*namename of attribute to get
[out]*retvariable to accumulate the result
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_get_bool_value_in_array ( const ddca_array_t array,
int  index,
ddca_bool_t ret 
)

get a bool value at a specified index from given array variable

This function searches and returns a bool value at a specified index from given array variable. Note that the bool value is represented as a ddca_bool_t type and DDCA_BOOL value. Note that index starts from 0. So specify index between size of array - 1 and 0.

Parameters:
[in]*arrayarray variable to search
[in]indexnumber of index to get
[out]*retvariable to accumulate the result
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_get_double_value ( const ddca_map_t map,
const char *  name,
ddca_double64_t *  ret 
)

get a double value of a specified attribute from given ddca_map_t variable

This function searches and returns a double value of a specified attribute from given ddca_map_t variable. This function do not search the nested values. So the attribute to be returned must locate the same level as the given ddca_map_t variable.

Parameters:
[in]*mapddca_map_t variable to search
[in]*namename of attribute to get
[out]*retvariable to accumulate the result
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_get_double_value_in_array ( const ddca_array_t array,
int  index,
ddca_double64_t *  ret 
)

get a double value at a specified index from given array variable

This function searches and returns a double value at a specified index from given array variable. Note that index starts from 0. So specify index between size of array - 1 and 0.

Parameters:
[in]*arrayarray variable to search
[in]indexnumber of index to get
[out]*retvariable to accumulate the result
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_get_int_value ( const ddca_map_t map,
const char *  name,
ddca_int32_t *  ret 
)

get an int value of a specified attribute from given ddca_map_t variable

This function searches and returns an int value of a specified attribute from given ddca_map_t variable. This function do not search the nested values. So the attribute to be returned must locate the same level as the given ddca_map_t variable.

Parameters:
[in]*mapddca_map_t variable to search
[in]*namename of attribute to get
[out]*retvariable to accumulate the result
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_get_int_value_in_array ( const ddca_array_t array,
int  index,
ddca_int32_t *  ret 
)

get an int value at a specified index from given array variable

This function searches and returns an int value at a specified index from given array variable. Note that index starts from 0. So specify index between size of array - 1 and 0.

Parameters:
[in]*arrayarray variable to search
[in]indexnumber of index to get
[out]*retvariable to accumulate the result
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_get_map ( const ddca_map_t map,
const char *  name,
ddca_map_t **  ret 
)

get a ddca_map_t object from the ddca_map_t variable

This function searches and gets a ddca_map_t object from the ddca_map_t variable specified by the attribute name. Note that the output map must not be freed since this function return the reference to it.

Parameters:
[in]*mapddca_map_t variable to search
[in]*namename of attribute to search
[out]**retvalue to be returned
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_get_map_in_array ( const ddca_array_t array,
int  index,
ddca_map_t **  ret 
)

get a ddca_array_t object at a specified index from given array variable

This function searches and gets a ddca_array_t object of a specified index from given array variable. Note that index starts from 0. So specify index between size of array - 1 and 0. Note that the output map must not be freed since this function return the reference to it.

Parameters:
[in]*arrayarray variable to search
[in]indexnumber of index to get
[out]**retvariable to accumulate the result
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_get_string_value ( const ddca_map_t map,
const char *  name,
char **  ret 
)

get a string value of a specified attribute from given ddca_map_t variable

This function searches and returns a string value of a specified attribute from given ddca_map_t variable. This function do not search the nested values. So the attribute to be returned must locate the same level as the given ddca_map_t variable. Note that the output string must be freed after the use.

Parameters:
[in]*mapddca_map_t variable to search
[in]*namename of attribute to get
[out]**retvariable to accumulate the result
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_get_string_value_in_array ( const ddca_array_t array,
int  index,
char **  ret 
)

get a string value at a specified index from given array variable

This function searches and returns a string value at a specified index from given array variable. Note that index starts from 0. So specify index between size of array - 1 and 0. Note that the output string must be freed after the use.

Parameters:
[in]*arrayarray variable to search
[in]indexnumber of index to get
[out]**retvariable to accumulate the result
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_insert_array_to_array ( ddca_array_t array,
int  index,
ddca_array_t child_array 
)

insert a ddca_array_t array to the specified index of given array variable

This function inserts a ddca_array_t array to the specified index of given array variable. Note that index starts from 0. So specify index between size of array - 1 and 0.

Parameters:
[in,out]*arrayarray variable to insert
[in]indexnumber of index to insert
[in]*child_arrayddca_array_t variable to be inserted
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_insert_bool_value_to_array ( ddca_array_t array,
int  index,
const ddca_bool_t  value 
)

insert a bool value to the specified index of given array variable

This function inserts a bool value to the specified index of given array variable. Note that index starts from 0. So specify index between size of array - 1 and 0.

Parameters:
[in,out]*arrayarray variable to insert
[in]indexnumber of index to insert
[in]valuevalue to be inserted
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_insert_double_value_to_array ( ddca_array_t array,
int  index,
const ddca_double64_t  value 
)

insert a double value to the specified index of given array variable

This function inserts a double value to the specified index of given array variable. Note that index starts from 0. So specify index between size of array - 1 and 0.

Parameters:
[in,out]*arrayarray variable to insert
[in]indexnumber of index to insert
[in]valuevalue to be inserted
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_insert_int_value_to_array ( ddca_array_t array,
int  index,
const ddca_int32_t  value 
)

insert an int value to the specified index of given array variable

This function inserts an int value to the specified index of given array variable. Note that index starts from 0. So specify index between size of array - 1 and 0.

Parameters:
[in,out]*arrayarray variable to insert
[in]indexnumber of index to insert
[in]valuevalue to be inserted
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_insert_map_to_array ( ddca_array_t array,
int  index,
ddca_map_t map 
)

insert a ddca_array_t object to the specified index of given array variable

This function inserts a ddca_array_t object to the specified index of given array variable. Note that index starts from 0. So specify index between size of array - 1 and 0.

Parameters:
[in,out]*arrayarray variable to insert
[in]indexnumber of index to insert
[in]*mapddca_map_t variable to be inserted
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_insert_string_value_to_array ( ddca_array_t array,
int  index,
const char *  value 
)

insert a string value to the specified index of given array variable

This function inserts a string value to the specified index of given array variable. Note that index starts from 0. So specify index between size of array - 1 and 0.

Parameters:
[in,out]*arrayarray variable to insert
[in]indexnumber of index to insert
[in]*valuevalue to be inserted
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_is_null_value ( const ddca_map_t map,
const char *  name,
int *  ret 
)

return whether a specified attribute in the given ddca_map_t variable is null or not

This function searches and returns the result whether a specified attribute in the given ddca_map_t 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 ddca_map_t variable.

Parameters:
[in]*mapddca_map_t variable to search
[in]*namename of attribute to get
[out]*retvariable to accumulate the result
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_put_array ( ddca_map_t map,
const char *  name,
ddca_array_t array 
)

add a ddca_array_t array to the ddca_map_t variable

This function adds a ddca_array_t array to the ddca_map_t variable with the specified attribute name. Note that the input array must not be freed since this function use the reference to it.

Parameters:
[in,out]*mapddca_map_t variable where the attribute will be added
[in]*namename of attribute to be added
[in]*arrayddca_array_t variable to be added
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_put_bool_value ( ddca_map_t evt,
const char *  name,
const ddca_bool_t  value 
)

add a pair of string key and bool value attribute to the specified ddca_map_t variable

This function adds a pair of string key and bool value attribute to the specified ddca_map_t variable. More than one attribute with the same name cannot be added to the same instance. So if the key name to be added already exist to the target instance, this function will return failure.

Parameters:
[in,out]*mapddca_map_t variable where the attribute will be added
[in]*namename of attribute to be added
[in]valuevalue to be added
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_put_double_value ( ddca_map_t map,
const char *  name,
const ddca_double64_t  value 
)

add a pair of string key and double value attribute to the specified ddca_map_t variable

This function adds a pair of string key and double value attribute to the specified ddca_map_t variable. More than one attribute with the same name cannot be added to the same instance. So if the key name to be added already exist to the target instance, this function will return failure.

Parameters:
[in,out]*mapddca_map_t variable where the attribute will be added
[in]*namename of attribute to be added
[in]valuevalue to be added
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_put_int_value ( ddca_map_t map,
const char *  name,
const ddca_int32_t  value 
)

add a pair of string key and int value attribute to the specified ddca_map_t variable

This function adds a pair of string key and int value attribute to the specified ddca_map_t variable. More than one attribute with the same name cannot be added to the same instance. So if the key name to be added already exist to the target instance, this function will return failure.

Parameters:
[in,out]*mapddca_map_t variable where the attribute will be added
[in]*namename of attribute to be added
[in]valuevalue to be added
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_put_map ( ddca_map_t map,
const char *  name,
ddca_map_t child_map 
)

add a ddca_map_t variable to the another ddca_map_t variable

This function adds a ddca_map_t instance to the ddca_map_t variable with the specified attribute name. More than one attribute with the same name cannot be added to the same instance. So if the key name to be added already exist to the target instance, this function will return failure. Note that the input map must not be freed since this function use the reference to it.

Parameters:
[in,out]*mapddca_map_t variable where the attribute will be added
[in]*namename of attribute to be added
[in]*child_mapddca_map_t variable to be added
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_put_null ( ddca_map_t map,
const char *  name 
)

add a pair of string key and null value attribute to the specified ddca_map_t variable

This function adds a pair of string key and null value attribute to the specified ddca_map_t variable. More than one attribute with the same name cannot be added to the same instance. So if the key name to be added already exist to the target instance, this function will return failure.

Parameters:
[in,out]*mapddca_map_t variable where the attribute will be added
[in]*namename of attribute to be added
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
int ddca_cmn_put_string_value ( ddca_map_t map,
const char *  name,
const char *  value 
)

add a pair of key/value string attribute to the specified ddca_map_t variable

This function adds a pair of key/value string attribute to the specified ddca_map_t variable. More than one attribute with the same name cannot be added to the same instance. So if the key name to be added already exist to the target instance, this function will return failure. The input string can be freed if the function is success.

Parameters:
[in,out]*mapddca_map_t variable where the attribute will be added
[in]*namename of attribute to be added
[in]*valuevalue to be added
Return values:
DDCA_SUCCESSoperation success
othersoperation failure
 All Data Structures Files Functions Variables Typedefs Defines