Sun Java System Calendar Server 6 2005Q4 Developer's Guide

Method: GetAttribute

Purpose

Retrieve an attribute value for a user.

Syntax

PRUint32 GetAttribute (char* aUser,
                       char* aKey,
                       char** aValue,
                       PRInt32 *aReturnCode)=0;

Parameters

The method has the following four parameters:

aUser

The name of the user. 

aKey

The attribute key. 

aValue

On return, this location contains a pointer to the retrieved attribute value. 

aReturnCode

On return, contains a constant that determines whether the server should continue with the default, or with the override processing. 

One of the following constants: 

  • NS_CONTINUE_DEFAULT_PROCESSING

  • NS_OVERRIDE_DEFAULT_PROCESSING

Returns

NS_OK on success, non-zero error code on failure.

Description

Retrieves the value of the specified attribute for the specified user, and stores it at the location pointed to by aValue. You are responsible for allocating storage space for the returned attribute, and for freeing it (using the FreeAttribute method) when it is no longer needed.