Sun OpenSSO Enterprise 8.0 C API Reference for Application and Web Policy Agent Developers

am_map_for_each()

Returns a map iterator on a function pointer for the specified map object.

Details

am_map_for_each() will iterate over the list of key/value pairs and call each one. For every key in the map, a function can be invoked via the function pointer.

Syntax

#include "am_map.h"
AM_EXPORT am_status_t
am_map_for_each(am_map_t,
                am_status_t (*func)(const char *key,
                const char *value,
                void **args),
                void **args);

Parameters

This function takes the following parameters:

am_map_t

The specified map object.

key

Pointer to a key in an entry.

args

Pointer to application-defined parameters.

Returns

This function returns one of the following values:

Other codes

If the function returns any code other than AM_SUCCESS, the iteration will terminate and the same status code will be returned to the user.

AM_INVALID_ARGUMENT

If the parameters are invalid.