Sun Java System Access Manager 7 2005Q4 C API Reference

am_map_get_entries()

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

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 handle for the map object to be examined.

entry_iter_ptr

Pointer to where the handle for the new entry 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 entry iterator object.

AM_INVALID_ARGUMENT

If the entry_iter_ptr argument is NULL.

AM_NOT_FOUND

If the specified map contains no keys.

Details

This function extracts an iterator pointer that can be used to iterate over the key value pairs stored in this table.

Memory Concerns: The iterator pointer passed in must not have non-destroyed iterators assigned to them. The caller, in future must call am_map_entry_iter_destroy to destroy the iterator instance.

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