Sun Java System Access Manager 7.1 C API Reference

am_properties_get()

Retrieves the value associated with the specified key from the specified properties object.

Details

am_properties_get() checks for the presence of the specified key and returns its value, if present.

Syntax

#include "am_properties.h"
AM_EXPORT am_status_t
am_properties_get(am_properties_t properties,
                  const char *key,
                  const char **value_ptr);

Parameters

This function takes the following parameters:

properties

Pointer to the specified properties object.

key

Pointer to the specified key in the specified properties object.

value_ptr

Pointer to a pointer to the location where the value associated with the specified key will be stored.

Returns

One of the following values as well as value_ptr containing an unparsed string with the address of the location of the value.

AM_SUCCESS

If no error is detected.

AM_INVALID_ARGUMENT

If the properties, key, or value_ptr argument is NULL.

AM_NOT_FOUND

If the specified key has no associated value and a default value is not provided.

AM_INVALID_VALUE

If the value associated with the specified key cannot be parsed as required by the particular accessor function.

AM_NO_MEMORY

If insufficient memory is available to look up the key.

Memory Concerns

Do not modify value_ptr or free the memory.