Sun Java System Access Manager 7 2005Q4 C API Reference

am_properties_copy()

Makes a copy of a properties object.

Syntax

#include "am_properties.h"
AM_EXPORT am_status_t
am_properties_copy(am_properties_t source_properties,
              am_properties_t *properties_ptr);

Parameters

This function takes the following parameters:

source_properties

The handle for the properties object to be copied.

properties_ptr

A pointer to where to store the handle of the new created properties object.

Returns

This function returns am_status_t with one of the following values:

AM_SUCCESS

If a properties object was successfully copied.

AM_NO_MEMORY

If unable to allocate memory for the new properties object.

AM_INVALID_ARGUMENT

If the source_properties or properties_ptr argument is NULL.

Details

Creates an instance of am_properties_t and assigns it to properties_ptr. The function copies all the elements in the source_ptr to properties_ptr. The source_ptr is not affected during this operation.

Memory Concerns: After the usage of the instance properties_ptr the caller must call am_properties_destroy to clean up the allocated memory. The removal of any item in either structures do not affect the other.