DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

OSAGetAttrArrayValues(S_ADM)


OSAGetAttrArrayValues: OSAGetAttrArrayLong, OSAGetAttrArrayDouble, OSAGetAttrArrayString -- get data from attribute list

Syntax

#include <scoAdmin/osaStdDef.h>

long OSAGetAttrArrayLong(errStatusPtr, attributeListPtr, attributeToken, arrayIndex)

double OSAGetAttrArrayDouble(errStatusPtr, attributeListPtr, attributeToken, arrayIndex)

char *OSAGetAttrArrayString(errStatusPtr, attributeListPtr, attributeToken, arrayIndex)

Description

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

OSAGetAttrArrayLong 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 arrayIndex'th integer number associated with the named attribute.

OSAGetAttrArrayDouble works in an identical manner to OSAGetAttrArrayLong except it returns a floating point number.

OSAGetAttrArrayString works in an identical manner to OSAGetAttrArrayLong except it returns a pointer to a string.

These functions only work on set-valued attributes. If the OSA writer needs to receive single-valued attribute data then the OSAGetAttributeValue 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 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.

int arrayIndex
This is an index into the set (or array) of values to be read from. Only one value from the array can be read at a time.

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 attributeList.

See also

OSAGetAttributeValues(S_ADM)
16 September 2002
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003