OSAReturnValues(3sadm)


OSAReturnValues: OSAReturnLong, OSAReturnDouble, OSAReturnString, OSAReturnBoolean, OSAReturnActionData -- return values to library routine

Synopsis

CC ... -lsysadm -lvtcl -ltclx -ltcl -lsocket -lgen -lm

#include <scoadmin/osaStdDef.h>

void OSAReturnLong(returnListPtr, attributeToken, integerValue)

void OSAReturnDouble(returnListPtr, attributeToken, floatingPointValue)

void OSAReturnString(returnListPtr, attributeToken, stringValue)

void OSAReturnBoolean(returnListPtr, booleanValue)

void OSAReturnActionData(returnListPtr, stringValue)

Description

These procedures allow the C/C++ OSAs to return values to the SCOadmin services library routine calling them.

OSAReturnLong passes the value of a integer number to the return list structure and associates it with an attribute. If this function is called repeatedly on for the same attribute in the same return list then the results depend on the associated attribute (represented by the attributeToken); if the attribute is of single-valued type then the given integer will replace any previous integer associated with the attribute, if the attribute is of set-valued type then the given integer will be added to the list of previous values associated with the attribute, and all the integer values given with that attribute will be returned.

OSAReturnDouble works in an identical manner to OSAReturnLong except it expects a floating point number.

OSAReturnString works in an identical manner to OSAReturnLong except it expects a pointer to a string.

OSAReturnBoolean is used while evaluating Filter operations. As filters will only return a true or false, they do not need to associate values with an attribute. This function should only be called once for each return list.

OSAReturnActionData is used while evaluating Action operations. As actions only return ``raw'' data, they do not need to associate values with an attribute. This function can be called repeatedly, each will create a new string element that will be returned. Note that OSAReturnActionData s used by the ``list'' execution procedures to return the names of objects held by containers.

All of these procedures copy the data passed to them so that passing them volatile data will not result in an error.

Unexpected results will occur if one of these procedures is called with an attribute of a data type other than its own. The programmer should take care to call OSAReturnString() only with attributes of data type of string, etc.

Arguments


ofParameterList_cl *returnListPtr
A pointer to the return list data structure. All return values are contained in this structure and are accessed and changed 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.

long integerValue
The value of the integer that will be associated with the named attribute.

double floatingPointValue
The value of the floating point number that will be associated with the named attribute.

char *stringValue
The a pointer to the string that will be associated with the named attribute or an action operation. This data will be copied and stored by the return list data structure, so passing this function volatile data is acceptable.

bool_t booleanValue
One of the two boolean values (TRUE or FALSE) that is to be associated with a filter request.

25 April 2004
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004