4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster/* -*- Mode: C -*- */
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The contents of this file are subject to the terms
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * of the Common Development and Distribution License
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * (the License). You may not use this file except in
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * compliance with the License.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * You can obtain a copy of the License at
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * See the License for the specific language governing
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * permission and limitations under the License.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * When distributing Covered Code, include this CDDL
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Header Notice in each file and include the License file
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * If applicable, add the following below the CDDL Header,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * with the fields enclosed by brackets [] replaced by
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * your own identifying information:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * $Id: am_map.h,v 1.4 2008/08/19 19:11:36 veiming Exp $
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Types and functions for creating, destroying, and manipulating the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * map objects used by the OpenSSO Access Management SDK.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Opaque handle to a map object.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Opaque handle to an iterator for the entries in a map object.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef struct am_map_entry_iter *am_map_entry_iter_t;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#define AM_MAP_ENTRY_ITER_NULL static_cast<am_map_entry_iter_t>(0)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#define AM_MAP_ENTRY_ITER_NULL ((am_map_entry_iter_t) 0)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Opaque handle to an iterator for the values associated with a key.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fostertypedef struct am_map_value_iter *am_map_value_iter_t;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#define AM_MAP_VALUE_ITER_NULL static_cast<am_map_value_iter_t>(0)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#define AM_MAP_VALUE_ITER_NULL ((am_map_value_iter_t) 0)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Create a new, empty, map object.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * map_ptr pointer to where the handle for the new map object
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * should be stored
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_SUCCESS
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if a map was successfully created
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_NO_MEMORY
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if unable to allocate memory for the map object
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_INVALID_ARGUMENT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if the map_ptr parameter is NULL
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns the number of elements in the map.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The map for which size is requested.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The size whose type is size_t.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Makes a copy of a map object.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * source_map
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the handle for the map object to be copied
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * a pointer to where to store the handle of the new created
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * map object
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_SUCCESS
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if a map object was successfully copied
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_NO_MEMORY
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if unable to allocate memory for the new map object
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_INVALID_ARGUMENT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if the source_map or map_ptr argument is NULL
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosteram_map_copy(am_map_t source_map, am_map_t *map_ptr);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Destroys the map object referenced by the provided handle.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * map the handle for the map object to be destroyed. The handle
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * may be NULL.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Erase all of the entries in the specified map.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * map the handle for the map object to be modified
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_SUCCESS
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if no error was detected
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_INVALID_ARGUMENT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if the map argument is NULL
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterAM_EXPORT am_status_t am_map_clear(am_map_t map);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns an iterator object that can be used to enumerate all of the entries
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * in the specified map.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * map the handle for the map object to be examined
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * entry_iter_ptr
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pointer to where the handle for the new entry iterator object
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * should be stored.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_SUCCESS
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if no error was detected
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_NO_MEMORY
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if unable to allocate memory for the entry iterator object
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_INVALID_ARGUMENT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if the entry_iter_ptr argument is NULL
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_NOT_FOUND
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if the specified map contains no keys
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * If the entry_iter_ptr argument is non-NULL, then the location that it
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * refers to will be set to NULL if an error is returned.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosteram_map_get_entries(am_map_t map, am_map_entry_iter_t *entry_iter_ptr);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Inserts a new (key, value)-pair into the specified map. If an entry
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * with the same key already exists, then the existing value is replaced
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * by the new value.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * NOTE: The map does not retain any references to the provided key or
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value parameters, i.e. it makes copies of any strings it needs to
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * map the handle for the map object to be modified
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * key the key for the entry
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value the (new) value to be associated with the key
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * replace if non-zero, then the specifed value replaces all of the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * existing values, otherwise the specified value is added
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * to the list of values associated with the specified key.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_SUCCESS
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if the entry was successfully inserted into the map
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_INVALID_ARGUMENT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if either the map, key, or value argument is NULL
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_NO_MEMORY
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if unable to allocate memory for value and if necessary
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosteram_map_insert(am_map_t map, const char *key, const char *value,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Erase the specified key from the specified map.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * map the handle for the map object to be modified
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * key the key for the entry to erase
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_SUCCESS
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if the entry was successfully erased from the map
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_INVALID_ARGUMENT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if either the map or key argument is NULL
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_NOT_FOUND
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if the specified key is not currently in the map
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterAM_EXPORT am_status_t am_map_erase(am_map_t map, const char *key);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns an iterator object that can be used to enumerate all of the values
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * associated with the specified key.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * map the handle for the map object to be examined
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * key the key for the entry to look up
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value_iter_ptr
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pointer to where the handle for the new value iterator object
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * should be stored.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_SUCCESS
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if no error was detected
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_NO_MEMORY
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if unable to allocate memory for the value iterator object
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_INVALID_ARGUMENT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if the value_iter_ptr argument is NULL
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_NOT_FOUND
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if the specified key could not be found in the map
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * If the value_iter_ptr argument is non-NULL, then the location that it
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * refers to will be set to NULL if an error is returned.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns the first value associated with the specified key in the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * specified map.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * map the handle for the map object to be examined
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * key the key for the entry to look up
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * NULL if the specified key could not be found in the map or
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the specified key had no associated values
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value otherwise, the first value associated with the key
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosteram_map_find_first_value(am_map_t map, const char *key);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Destroys the entry iterator object referenced by the provided handle.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * entry_iter
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the handle for the key iterator object to be destroyed.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The handle may be NULL.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosteram_map_entry_iter_destroy(am_map_entry_iter_t entry_iter);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns the key of the element currently referenced by the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * specified iterator.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * entry_iter
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the handle for the entry iterator object to be examined
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * NULL if the specified iterator is NULL or does not reference a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * valid entry
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * key otherwise
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosteram_map_entry_iter_get_key(am_map_entry_iter_t entry_iter);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns the first value of the element currently referenced by the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * specified iterator.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * entry_iter
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the handle for the entry iterator object to be examined
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * NULL if the specified iterator is NULL or does not reference a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * valid entry or the entry does not have any associated values
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value otherwise
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosteram_map_entry_iter_get_first_value(am_map_entry_iter_t entry_iter);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns an iterator object that can be used to enumerate all of the values
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * associated with the entry referenced by the specified iterator.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * entry_iter
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the handle for the entry iterator object to be examined
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value_iter_ptr
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pointer to where the handle for the new value iterator object
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * should be stored.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_SUCCESS
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if no error was detected
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_NO_MEMORY
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if unable to allocate memory for the value iterator object
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_INVALID_ARGUMENT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if the value_iter_ptr argument is NULL
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_NOT_FOUND
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * if the specified iterator is NULL or does not reference a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * valid entry
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * If the value_iter_ptr argument is non-NULL, then the location that it
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * refers to will be set to NULL if an error is returned.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosteram_map_entry_iter_get_values(am_map_entry_iter_t entry_iter,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Determines if the specified iterator references a valid entry.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * entry_iter
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the handle for the entry iterator object to be examined
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * 0 if the specified iterator is NULL or does not reference a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * valid entry
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * !0 otherwise
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosteram_map_entry_iter_is_entry_valid(am_map_entry_iter_t entry_iter);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Advances the specified iterator to the next entry in the map
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * specified when the iterator was created.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * entry_iter
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the handle for the entry iterator object to be modified
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * 0 if the specified iterator is NULL or does not reference a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * valid entry after being updated
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * !0 otherwise
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterAM_EXPORT boolean_t am_map_entry_iter_next(am_map_entry_iter_t entry_iter);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Destroys the value iterator object referenced by the provided handle.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value_iter
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the handle for the value iterator object to be destroyed
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The handle may be NULL.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterAM_EXPORT void am_map_value_iter_destroy(am_map_value_iter_t iter);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Returns the value currently referenced by the specified iterator.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value_iter
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the handle for the value iterator object to be examined
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * NULL if the specified iterator is NULL or does not reference a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * valid value
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value otherwise
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterAM_EXPORT const char *am_map_value_iter_get(am_map_value_iter_t iter);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Determines if the specified iterator references a valid value.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value_iter
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the handle for the value iterator object to be examined
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * 0 if the specified iterator is NULL or does not reference a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * valid value
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * !0 otherwise
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosteram_map_value_iter_is_value_valid(am_map_value_iter_t iter);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Advances the specified iterator to the next value associated with the
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * key specified when the iterator was created.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value_iter
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the handle for the value iterator object to be modified
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * 0 if the specified iterator is NULL or does not reference a
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * valid value after being updated
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * !0 otherwise
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterAM_EXPORT boolean_t am_map_value_iter_next(am_map_value_iter_t iter);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Map iterator on a function pointer.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The map function will iterate over the list of key value pairs and
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * call each key value pair.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Parameters:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * Function pointer that needs to be called for each key
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * value pair.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * The arguments that needs to be passed to the function
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * pointer along with the key value pair.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * AM_INVALID_ARGUMENT
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * If the input parameters is invalid.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * If the func returns any status code other than AM_SUCCESS
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * the iteration will terminate and the same status code will
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster * be returned to the user.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#endif /* not AM_MAP_H */