HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
“slapi_add_entry_internal_set_pb()” except that it constructs the entry from a DN and a set of
attributes. The function sets pblock to contain the following data:
SLAPI_TARGET_DN set to DN of the new entry.
SLAPI_CONTROLS_ARG set to request controls, if present.
SLAPI_ADD_ENTRY set to Slapi_Entry to add.
Syntax
#include "slapi-plugin.h"
int slapi_add_internal_set_pb(Slapi_PBlock *pb, const char *dn,
LDAPMod **attrs, LDAPControl **controls,
Slapi_ComponentId *plugin_identity, int operation_flags);
Parameters This function takes the following parameters:
Parameter block populated with add parameters.
pb
Entry DN.
dn
Entry attributes.
attrs
List of controls associated with the operation.
controls
Plug-in identity; a cookie that identifies the plug-in to the Directory Server during an
internal operation. This cookie is used by the server to retrieve the plug-in configuration
in order to determine whether to allow the operation and which actions to take during
the operation processing. Plug-in identity is passed to the plug-in initialization function
in the SLAPI_PLUGIN_IDENTITY pblock parameter. A plug-in must save this
information and pass it to every internal operation issued by the plug-in.
plugin_identity
Actions taken during operation processing.
operation_flags
Returns This function returns LDAP_SUCCESS or one of the LDAP error codes if the entry
cannot be constructed from the specified attributes due to constraint violation.
18.3 slapi_delete_internal_set_pb()
Description This function populates pblock to contain data for use by slapi_delete_internal_pb()
for an internal delete operation.
For unique identifier-based operation:
SLAPI_TARGET_DN set to the DN that allows to select the right back end.
SLAPI_TARGET_UNIQUEID set to the unique ID of the entry.
SLAPI_CONTROLS_ARG set request controls, if present.
For DN-based search:
SLAPI_TARGET_DN set to the entry DN.
SLAPI_CONTROLS_ARG set to request controls, if present.
Syntax
#include "slapi-plugin.h"
void slapi_delete_internal_set_pb (Slapi_PBlock *pb,
const char *dn, LDAPControl **controls,
const char *uniqueid, Slapi_ComponentId *plugin_identity,
int operation_flags);
Parameters This function takes the following parameters:
Parameter block populated with delete parameters.
pb
DN of the entry to be removed. For unique ID operation, this parameter is used to
select the correct back end.
dn
166 Functions for setting internal operation flags