InomHitta mer dokumentationSupportresurser som ingår | Ladda ner denna bok i PDF (909 KB)
Chapter 10 Miscellaneous FunctionsThis chapter provides a reference to various Sun JavaTM System Access Manager functions that do not belong in other collections. Function summaries include a short description, syntax, parameters and returns, and header file. The following functions are included in this chapter: am_cleanup()Cleans up any memory allocated by C SDK. This function must be called when a caller is done with C SDK interfaces to cleanup memory allocated by the C SDK. Syntax#include "am_h.h" AM_EXPORT am_status_t am_cleanup(void); ParametersThis function takes no parameters. ReturnsThis function returns am_status_t with one of the following values:
DetailsThis should be called only once at the end of C SDK calls, after which the initialize functions am_*_init() must be called again to initialize the C SDK before using any of its interfaces. Any properties input parameter given to the init functions am_sso_init(), am_auth_init() or am_policy_init() should be destroyed only after am_cleanup is called. am_notify()Parses and processes an SSO or policy notification message as an XML string. If the message is an SSO notification, any SSO Token listeners registered using am_sso_add_listener() will be called. If the notification 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 if the policy module in the C SDK has been initialized (using am_policy_init() and am_policy_service_init() ). Syntax#include "am_notify.h" AM_EXPORT am_status_t am_notify(const char *xmlmsg, am_policy_t policy_handle); ParametersThis function takes the following parameters:
ReturnsThis function returns am_status_t with one of the following values:
DetailsThis function should be called by the service listening on the notification URL given in the properties file if notification is enabled. am_string_set_allocate()Allocates space for an am_string_set_t and space for size strings. Also initializes size to the given size. Syntax#include "am_string.h" AM_EXPORT am_string_set_t * am_string_set_allocate(int size); ParametersThis function takes the following parameters:
ReturnsThis function returns a pointer to allocated am_string_set_t, or NULL if size is less than 0. am_string_set_destroy()Frees memory held by the parameter, by freeing each string in the set of strings, followed by the strings pointer, followed by the struct itself. Syntax#include "am_string_set.h" AM_EXPORT void am_string_set_destroy(am_string_set_t *string_set); ParametersThis function takes the following parameters:
ReturnsNone am_status_to_name()Returns the name of the given status code as a string. For example, the name of AM_SUCCESS is AM_SUCCCESS. Syntax#include "am_types.h" AM_EXPORT const char * am_status_to_name(am_status_t status); ParametersThis function takes the following parameters:
ReturnsThis function returns the name of the status code as a const char * . am_status_to_string()Returns the message for the given status code. For example, the message for AM_SUCCESS issuccess. Syntax#include "am_types.h" AM_EXPORT const char * am_status_to_string(am_status_t status); ParametersThis function takes the following parameters:
ReturnsThis function returns the message for the status code as a const char *. DetailsThe header file for this function is am_types.h am_http_cookie_encode()URL encodes a HTTP cookie. Syntax#include "am_utls.h" AM_EXPORT am_status_t am_http_cookie_encode(const char *cookie, char *buf, int len); ParametersThis function takes the following parameters:
ReturnsThis function returns am_status_t with one of the following values:
am_http_cookie_decode()URL decodes a HTTP cookie. Syntax#include "am_utls.h" AM_EXPORT am_status_t am_http_cookie_decode(const char *cookie, char *buf, int len); ParametersThis function takes the following parameters:
ReturnsThis function returns am_status_t with one of the following values:
|