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

<am_notify.h>

<am_notify.h> contains the am_notify() function which parses and processes a session or policy notification message as an XML string. If the message is a session notification, any token handle listeners registered using am_sso_add_listener() will be called. If the message is a policy notification, the internal policy cache maintained by the policy module in the C SDK will be updated with the notification information only if the policy module has been initialized (using am_policy_init() and am_policy_service_init()).

am_notify() Syntax

#include "am_notify.h"
AM_EXPORT am_status_t 
am_notify(const char *xmlmsg, 
          am_policy_t policy_handle);

am_notify() Parameters

This function takes the following parameters:

xmlmsg

Pointer to the XML message containing the notification.

policy_handle

Reference to the policy evaluation object.

am_notify() 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 XML was successfully parsed and processed.

AM_INVALID_ARGUMENT

If any input parameter is invalid.

AM_ERROR_PARSING_XML

If an error occurred parsing the XML.

AM_ERROR_DISPATCH_LISTENER

If an error occurred dispatching the listener.

AM_FAILURE

If any other error occurred.