Retrieves the value (or the specified default) associated with the specified key from the specified properties object.
am_properties_get_with_default() checks for the presence of the specified key and returns its value, if present. Contrary to am_properties_get(), if no value is present, it returns the specified default value.
#include "am_properties.h" AM_EXPORT am_status_t am_properties_get_with_default(am_properties_t properties, const char *key, const char *default_value, const char **value_ptr);
This function takes the following parameters:
The specified properties object.
Pointer to the specified key in the specified properties object.
Pointer to the value to be returned in case of no associated value.
Pointer to a pointer to the location where the returned value will be stored.
One of the following values as well as value_ptr containing an unparsed string with the address of the location of the value.
If no error is detected.
If the properties, key, or value_ptr argument is NULL.
If the specified key has no associated value and a default value is not provided.
If the value associated with the specified key is cannot be parsed as required by the particular accessor function.
If insufficient memory is available to look up the key.
Do not modify value_ptr or free the memory.