Inserts a new key-value pair into the specified map.
#include "am_map.h" AM_EXPORT am_status_t am_map_insert(am_map_t map, const char *key, const char *value, int replace);
This function takes the following parameters:
The handle for the map object to be modified.
The key for the entry.
The (new) value to be associated with the key.
If non-zero, then the specified value replaces all of the existing values. Otherwise the specified value is added to the list of values associated with the specified key.
This function returns am_status_t with one of the following values:
If the entry was successfully inserted into the map.
If either the map, key, or value argument is NULL.
If unable to allocate memory for value and if necessary the key.
If an entry with the same key already exists, then the existing value is replaced by the new value.
NOTE: The map does not retain any references to the provided key or value parameters. It makes copies of any strings it needs to store.