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

am_policy_service_init()

Initializes one instance of the OpenSSO Enterprise Policy Service for policy evaluation.

Syntax

#include "am_policy.h"
AM_EXPORT am_status_t
am_policy_service_init(const char *service_name,
                       const char *instance_name,
                       am_resource_traits_t rsrc_traits,
                       am_properties_t service_config_properties,
                       am_policy_t *policy_handle_ptr);

Parameters

This function takes the following parameters:

service_name

Pointer to the name for the Policy Service.

instance_name

Pointer to the name of the instance being initialized.

rsrc_traits

Pointer to a am_resource_traits_t structure type.


Note –

See am_resource_traits_t for more information.


service_config_properties

Pointer to the properties used to initialize the Policy Service instance.


Note –

See am_properties_t for more information.


policy_handle_ptr

Pointer to the integer specifying the object being evaluated.

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 the call was successful.

AM_*

If any error occurs, the type of error indicated by the status value.