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

<am_types.h>

<am_types.h> contains defined types and corresponding functions. They are:

boolean_t

Defines true or false boolean with the syntax:

#include "am_types.h"
typedef enum { 
    B_FALSE, 
    B_TRUE 
} boolean_t;

bool_t

Defines true or false boolean with the syntax:

#include "am_types.h"
typedef enum {
    AM_FALSE = 0,
    AM_TRUE
} am_bool_t;

am_status_t

Defines error codes with the syntax:

#include "am_types.h"
typedef enum {
    AM_SUCCESS = 0,
    AM_FAILURE,
    AM_INIT_FAILURE,
    AM_AUTH_FAILURE,
    AM_NAMING_FAILURE,
    AM_SESSION_FAILURE,
    AM_POLICY_FAILURE,
    AM_NO_POLICY,
    AM_INVALID_ARGUMENT,
    AM_INVALID_VALUE,
    AM_NOT_FOUND,
    AM_NO_MEMORY,
    AM_NSPR_ERROR,
    AM_END_OF_FILE,
    AM_BUFFER_TOO_SMALL,
    AM_NO_SUCH_SERVICE_TYPE,
    AM_SERVICE_NOT_AVAILABLE,
    AM_ERROR_PARSING_XML,
    AM_INVALID_SESSION,
    AM_INVALID_ACTION_TYPE,
    AM_ACCESS_DENIED,
    AM_HTTP_ERROR,
    AM_INVALID_FQDN_ACCESS,
    AM_FEATURE_UNSUPPORTED,
    AM_AUTH_CTX_INIT_FAILURE,
    AM_SERVICE_NOT_INITIALIZED,
    AM_INVALID_RESOURCE_FORMAT,
    AM_NOTIF_NOT_ENABLED,
    AM_ERROR_DISPATCH_LISTENER,
    AM_REMOTE_LOG_FAILURE,
    AM_LOG_FAILURE,
    AM_REMOTE_LOG_NOT_INITIALIZED,
    AM_NUM_ERROR_CODES	/* This should always be the last. */
} am_status_t;

am_status_to_string()

Returns a message for the given error code.

Syntax

#include "am_types.h"
AM_EXPORT const char *am_status_to_string(am_status_t status);

Parameters

This function takes the following parameter:

status

Given error code

Returns

This function returns the appropriate message for the status code as a const char *

AM_SUCCESS

Success.

AM_FAILURE

Failure.

AM_INIT_FAILURE

Initialization failure.

AM_AUTH_FAILURE

OpenSSO Enterprise Authentication Service failure.

AM_NAMING_FAILURE

OpenSSO Enterprise Naming Service failure.

AM_SESSION_FAILURE

OpenSSO Enterprise Session Service failure.

AM_POLICY_FAILURE

OpenSSO Enterprise Policy Service failure.

AM_NO_POLICY

No policy found.

AM_INVALID_ARGUMENT

Invalid argument.

AM_INVALID_VALUE

Invalid value.

AM_NOT_FOUND

OpenSSO Enterprise not found.

AM_NO_MEMORY

No memory.

AM_NSPR_ERROR

NSPR error.

AM_END_OF_FILE

Reached end of file.

AM_BUFFER_TOO_SMALL

If the defined size of the buffer is smaller than the encoded value.

AM_NO_SUCH_SERVICE_TYPE

No such service type found.

AM_SERVICE_NOT_AVAILABLE

Service is not available.

AM_ERROR_PARSING_XML

Error found during XML parsing.

XML AM_INVALID_SESSION

Invalid session.

AM_END_OF_FILE

Reached end of file.

AM_INVALID_ACTION_TYPE

Invalid action type.

AM_ACCESS_DENIED

Access denied.

AM_HTTP_ERROR

HTTP error.

AM_INVALID_FQDN_ACCESS

Invalid fully qualified domain name (FQDN) access.

AM_FEATURE_UNSUPPORTED

The feature or configuration is unsupported.

AM_AUTH_CTX_INIT_FAILURE

Authentication context initialization failed.

AM_SERVICE_NOT_INITIALIZED

Specified service was not initialized.

AM_INVALID_RESOURCE_FORMAT

Specified resource name does not follow the format required by the service.

AM_NOTIF_NOT_ENABLED

Notification Service is not enabled or no notification URL is set.

AM_ERROR_DISPATCH_LISTENER

Error occurred dispatching single sign-on (SSO) listener.

AM_REMOTE_LOG_FAILURE

Remote Logging Service encountered an error.

AM_LOG_FAILURE

Log encountered an error.

AM_REMOTE_LOG_NOT_INITIALIZED

Remote Logging Service is not initialized.