OSAGetAttributeValues(S_ADM)


OSAGetAttributeValues: OSAGetAttributeLong, OSAGetAttributeDouble, OSAGetAttributeString -- get attribute list data

Syntax

#include <scoAdmin/osaStdDef.h>

long OSAGetAttributeLong(errStatusPtr, attributeListPtr, attributeToken)

double OSAGetAttributeLong(errStatusPtr, attributeListPtr, attributeToken)

char *OSAGetAttributeLong(errStatusPtr, attributeListPtr, attributeToken)

Description

These procedures allow the C/C++ OSAs to get single-valued data from the attribute list via SCOadmin services library routines.

OSAGetAttributeLong looks for the named attribute in the attribute list provided by the client's request (the command line). If found then it will return the integer number associated with the named attribute.

OSAGetAttributeDouble works in an identical manner to OSAGetAttributeLong except it returns a floating point number.

OSAGetAttributeString works in an identical manner to OSAGetAttributeLong except it returns a pointer to a string.

These functions only work on single-valued attributes. If the OSA writer needs to receive set-valued attribute data then the OSAGetAttrArrayValue procedures should be called.

Arguments


errStatus_cl *errStatusPtr
A pointer to the error stack data structure. If an error occurs in retrieving the data, the appropriate error will be placed in the error stack. This data can be referenced using the library functions associated with the error stack.

ofParameterList_cl *attributeListPtr
A pointer to the attribute list data structure. All attribute values that provided by the calling client are contained in this structure and are accessed via SCOadmin services library routines.

attributeToken_t attributeToken
The predefined token that represents the attribute to which the given value should be associated with. These tokens are defined in the OSA's CDT.

Error messages


INVALID_ATTRIBUTE_VALUE
The specified attribute in not of same data type as requested for in the operation (either by long versus double versus string, or set versus single).

NO_SUCH_ATTRIBUTE
The attribute represented by attributeToken was not provided by the client in the attribute list.

See also

OSAGetAttrArrayValues(S_ADM)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005