HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
34 Functions for monitoring operations
This chapter contains reference information on operation routines.
Table 34-1 Operation routines
DescriptionFunction
Determines if the client has abandoned the current operation.“slapi_op_abandoned()”
Gets the type of a Slapi_Operation.
“slapi_op_get_type()”
34.1 slapi_op_abandoned()
Description This function allows you to verify if the operation associated to the pblock in the
parameter has been abandoned. This function is useful to check periodically the operations status
of long-running plug-ins.
Syntax
#include "slapi-plugin.h"
int slapi_op_abandoned( Slapi_PBlock *pb );
Parameters This function takes the following parameter:
Parameter block passed in from the current operation.
pb
Returns This function returns one of the following values:
1 if the operation has been abandoned.
0 if the operation has not been abandoned.
34.2 slapi_op_get_type()
Description This function returns the type of an Slapi_Operation. The Slapi_Operation
structure can be extracted from a pblock structure using “slapi_pblock_get()” with the
SLAPI_OPERATION parameter. For example:
slapi_pblock_get (pb, SLAPI_OPERATION, &op);
Syntax
#include "slapi-plugin.h"
unsigned long slapi_op_get_type(Slapi_Operation * op);
Parameters This function takes the following parameter:
The operation of which you wish to get the type.
op
Returns This function returns one of the following operation types:
SLAPI_OPERATION_BIND
SLAPI_OPERATION_UNBIND
SLAPI_OPERATION_SEARCH
SLAPI_OPERATION_MODIFY
SLAPI_OPERATION_ADD
SLAPI_OPERATION_DELETE
SLAPI_OPERATION_MODDN
SLAPI_OPERATION_MODRDN
SLAPI_OPERATION_COMPARE
34.1 slapi_op_abandoned() 285