Sun Java System Access Manager 7 2005Q4 C API Reference

am_map_find()

Returns an iterator object that can be used to enumerate all of the values associated with the specified key.

Syntax

#include "am_map.h"
AM_EXPORT am_status_t
am_map_find(am_map_t map, const char *key,
           am_map_value_iter_t *value_iter_ptr);

Parameters

This function takes the following parameters:

map

The handle for the map object to be examined.

key

The key for the entry to look up.

value_iter_ptr

Pointer to where the handle for the new value iterator object should be stored.

Returns

This function returns am_status_t with one of the following values:

AM_SUCCESS

If no error was detected.

AM_NO_MEMORY

If unable to allocate memory for the value iterator object.

AM_INVALID_ARGUMENT

If the value_iter_ptr argument is NULL.

AM_NOT_FOUND

If the specified key could not be found in the map.

Details

This function takes a key and returns an iterator that iterates over the values associated with the key.

If the value_iter_ptr argument is non-NULL, then the location that it refers to will be set to NULL if an error is returned.

Memory Concerns: At the end of usage of value_iter_ptr, the caller must call am_map_value_iter_destroy with the iterators pointer.