Sun Java System Directory Server Enterprise Edition 6.2 Developer's Guide

slapi_search_internal_set_pb()

Sets a parameter block for an internal search.

Syntax

#include slapi-plugin.h
int slapi_search_internal_set_pb(Slapi_PBlock *pb,
    const char *base, int scope, const char *filter,
    char **attrs, int attrsonly,LDAPControl **controls,
    const char *uniqueid,Slapi_ComponentId *plugin_identity,
    int operation_flags);

Parameters

This function takes the following parameters:

pb

Parameter block.

base

The base of the search.

scope

LDAP_SCOPE_SUBTREE, LDAP_SCOPE_ONELEVEL , or LDAP_SCOPE_BASE

filter

The search filter.

attrs

Request attribute list.

This parameter is currently ignored.

attrsonly

Specifying 1 retrieves only the attribute types. Specifying 0 retrieves the attribute types and the attribute values.

controls

LDAP control that you wish to attach.

uniqueid

Unique ID must be set to NULL.

plugin_identity

Plug-in identifier obtained from SLAPI_PLUGIN_IDENTITY during plug-in initialization.

operation_flags

The only flag that is exposed in this release is SLAPI_OP_FLAG_NEVER_CHAIN . If this flag is set, then the search will not be conducted if the entry is a chained backend.

Returns

This function returns 0 if successful. Otherwise, it returns an LDAP error code.

Description

Use this function to set the parameter block to perform an internal search. This function is needed in order to use the internal search operation function, slapi_search_internal_pb().

You would typically create a Slapi_PBlock structure using slapi_pblock_new(), pass that parameter block to slapi_search_internal_pb(), and then pass the same parameter block to actually do the search.

Memory Concerns

Allocate the parameter block using slapi_pblock_new() before calling this function.

Directory Server does not free the parameters you passed to this function.

Free the parameter block after calling slapi_search_internal_pb() .

See Also

slapi_pblock_new()

slapi_search_internal_pb()