37.7. slapi_rdn_get_first()

Description

This function gets the type/value pair corresponding to the first RDN stored in a Slapi_RDN structure. For example, if the RDN is cn=Joey, the function will place cn in the type return parameter and Joey in value.

Syntax

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

Parameters

This function takes the following parameters:

rdn
The Slapi_RDN structure containing the RDN value(s).
type
Repository that will hold the type of the first RDN. If this parameter is NULL at the return of the function, it means rdn is empty.
value
Repository that will hold the type of the first RDN. If this parameter is NULL at the return of the function, it means rdn is empty.
Returns

This function returns one of the following values:

  • -1 if rdn is empty.
  • 1 if the operation is successful.