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

am_map_get_entries()

Returns an entry iterator object that can be used to enumerate all entries in the specified map.

Details

am_map_get_entries() returns a pointer to an entry iterator that can be used on the key/value pairs stored in the specified map object.

Syntax

#include "am_map.h"
AM_EXPORT am_status_t
am_map_get_entries(am_map_t map, 
                   am_map_entry_iter_t *entry_iter_ptr);

Parameters

This function takes the following parameters:

map

The specified map object.

entry_iter_ptr

Pointer specifying the location of the entry iterator.


Note –

If entry_iter_ptr is not NULL, the location it refers to will be set to NULL if an error is returned.


Returns

This function returns one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):

AM_SUCCESS

If no error is detected.

AM_NO_MEMORY

If unable to allocate memory for the entry iterator object.

AM_INVALID_ARGUMENT

If entry_iter_ptr is NULL.

AM_NOT_FOUND

If the specified map object contains no keys.

Memory Concerns

The pointer to the iterator must have only one iterator assigned. am_map_entry_iter_destroy() must be called when finished to destroy the iterator instance.