OFEvaluateOperation(3sadm)
OFEvaluateOperation --
perform BMIP request
Synopsis
CC ... -lsysadm -lvtcl -ltclx -ltcl -lsocket -lgen -lm
#include <scoadmin/osaStdDef.h>
bmipResponse_pt OFEvaluateOperation(errStatusPtr, handleId, object)
Description
This routine performs the operation indicated by the string in the
BMIP request on the object identified by object.
It will return a pointer to a BMIP response which must be
freed after it is handled in the function ofReturnBmipResponse.
This routine can be called repeatedly during the BMIP request and
multiple bmipResponse_pt may be accumulated. This is the
case when multiple objects are forwarded in the
bmipRequest_t.objectInstance_pt,
or the bmipRequest_t.scopePtr
guides a transformation of the named object instance into many object
identifiers.
If the user wants to perform atomic synchronization with a
request (either all or nothing), they should store up all the responses
and only return them if no errors are found (and if errors are found,
implement some procedure to undo those that succeeded and then return and
empty response).
Arguments
bmipResponse_pt bmipResponsePtr-
This is the BMIP response structure that will be forwarded to the
ofReturnBmipResponse routine.
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.
int handleId-
The handle identifier that was passed to the request processor
by the SCOadmin services library
(or generated by a call to ofGenerateHandleId).
objectInstance_pt object-
A char * to the string representing
the object identifier of the current
class. This is the object that the work/operation will be performed on.
Diagnostics
EXECUTION_PROCEDURE_FAILURE-
The execution of the operation was halted because of an error
in running the operation's execution procedure.
NO_SUCH_CLASS_HANDLE-
The handleId named does not correspond to an existing class in the
Server APIs internal lookup table.
MISSING_ATTRIBUTE_VALUE-
One of the attributes given in the BMIP request did not have a value
associated with in on a request to perform an operation other than
get or replace-with-default.
NO_SUCH_ACTION-
The action requested by the
BMIP request represented by the
handleId is not listed in that
BMIP request's class's CDT.
MISTYPED_ARGUMENT-
The attribute list (or some portion of it)
contained in the BMIP request
represented by the handleId is
not parseable by the Server API.
NO_SUCH_ATTRIBUTE-
One of the attributes contained in the BMIP
request represented by the
handleId is not listed in the request's class's CDT.
UNRECOGNIZED_OPERATION-
The operation contained in the BMIP request represented by the
handleId is not listed in the CDT as being able to be performed on
one of the attributes listed in the BMIP request.
INVALID_ATTRIBUTE_VALUE-
One of the attributes listed in the BMIP request represented by the
handleId is a group attribute and it has been associated with a value.
Or, one of the values associated with an attribute is unparseable or a set
of values is being assigned to a single value-typed attribute.
Examples
void
ObjectRequestProcessor(errStatus_cl *errStatusPtr,
int handleId,
bmipRequest_pt bmipRequestPtr,
void *)
{
/*---
*
* Generate a list of all the objects to be evaluated
*
*/
objectName_pt *objectList;
int objectCount;
.
.
.
/* Implementation to turn bmipRequestPtr->objectInstancePtr into
* object.
*/
.
.
.
for (int loop = 0; loop < objectCount; ++loop)
{
bmipResponse_t *bmipResponsePtr;
bmipResponsePtr = OFEvaluateOperation(errStatusPtr,
handleId,
objectList[loop]);
OFReturnBmipResponse(errStatusPtr,
handleId,
bmipResponsePtr,
(loop + 1 == objectCount) ? FALSE : TRUE );
}
References
OFReturnBmipResponse(3sadm),
OFEvaluateFilter(3sadm).
25 April 2004
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004