CC ... -lsysadm -lvtcl -ltclx -ltcl -lsocket -lgen -lm#include <scoadmin/osaStdDef.h>
int OFGenerateHandleId(errStatusPtr, oldHandleId, bmipRequestPtr)
If a request processor needs to use a different BMIP request (such as scoping of another class, etc) then it should generate a new handleId to match the new BMIP request. This is done with the OFGenerateHandleId routine.
The routine is passed the old handleId and the new BMIP request, and it will return a new handleId that maps to the new data structures that the Server API has generated for the new BMIP request. These data structures and the original data structure will be deleted by the Server API when the request processor exits, and for all intents and purposes are invisible to the OSA writer.
void ObjectRequestProcessor(errStatus_cl *errStatusPtr, int handleId, bmipRequest_pt bmipRequestPtr, void *osaDataPtr) { . . ./* scoped request code */
int widgetHandleId; objectClass_pt tmpObjectClassPtr; scopeParameter_pt tmpScopePtr; extern ofRequestProcessor_fpt widgetRequestProcessor; . . .
tmpObjectClassPtr = bmipRequestPtr->scopePtr; tmpScopePtr = bmipRequestPtr->obejctClassPtr; bmipRequestPtr->scopePtr = NULL; bmipRequestPtr->obejctClassPtr = "sco widget"; widgetHandleId = OFGenerateHandleId(errStatusPtr, handleId, bmipRequestPtr);
if (ErrorIsOk(errStatusPtr) == FALSE) return; /* now call other Request Processor local to this OSA */
widgetRequestProcessor(errStatusPtr, widgetHandleId, bmipRequestPtr, osaDataSpace);
bmipRequestPtr->scopePtr = tmpObjectClassPtr; bmipRequestPtr->obejctClassPtr = tmpScopePtr;