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

slapi_rdn_get_next()

Gets a certain RDN type/value pair from within the RDNs stored in a Slapi_RDN structure.

Syntax

#include "slapi-plugin.h"
 int slapi_rdn_get_next(Slapi_RDN *rdn, int index, char **type,
    char **value);

Parameters

This function takes the following parameters:

rdn

The Slapi_RDN structure containing the RDN value(s).

index

Indicates the position of the RDN that precedes the currently desired RDN.

type

Repository that will hold the type (cn, o, ou, etc.) of the next (index+1) RDN. If this parameter is NULL at the return of the function, the RDN does not exist.

value

Repository that will hold the value of the next (index+1) RDN. If this parameter is NULL, the RDN does not exist.

Returns

This function returns -1 if there is no RDN in the index position, or the real position of the retrieved RDN if the operation was successful.

Description

This function gets the type/value pair corresponding to the RDN stored in the next (index+1) position inside rdn. Notice that the index of an element within an array of values is always one unit below its real position in the array.

See Also

slapi_rdn_get_first()

slapi_rdn_get_rdn()