HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
“slapi_entry2str()”
“slapi_str2entry()”
24.3 slapi_entry_add_rdn_values()
Adds the components in an entry's relative distinguished name (RDN) to the entry as attribute
values. (For example, if the entry's RDN is uid=bjensen, the function adds uid=bjensen to
the entry as an attribute value.)
Syntax
#include "slapi-plugin.h"
int slapi_entry_add_rdn_values( Slapi_Entry *e );
Parameters This function takes the following parameter:
Entry to which you want to add the RDN attributes.
e
Returns This function returns one of the following values:
LDAP_SUCCESS if the values were successfully added to the entry. The function also returns
LDAP_SUCCESS if the entry is NULL, if the entry's DN is NULL, or if the entry's RDN is NULL.
LDAP_INVALID_DN_SYNTAX if the DN of the entry cannot be parsed.
Memory concerns Free the entry from memory by using the “slapi_ch_free()” function, if the
entry was allocated by the user.
See also “slapi_entry_free()”
24.4 slapi_entry_add_string()
Description This function adds a string value to the existing attribute values in an entry. If the
specified attribute does not exist in the entry, the attribute is created with the string value specified.
The function doesn't check for duplicate values; it does not check if the string value being added
is already there.
Syntax
#include "slapi-plugin.h"
int slapi_entry_add_string (Slapi_Entry *e, const char *type,
const char *value);
Parameters This function takes the following parameters:
Entry to which you want to add a string value.
e
Attribute to which you want to add a string value.
type
String value you want to add.
value
Returns This function returns 0 when successful; any other value returned signals failure.
Memory concerns This routine makes a copy of the parameter value. value can be NULL.
24.5 slapi_entry_add_value()
Description This function adds a Slapi_Value data value to the existing attribute values in
an entry. If the specified attribute does not exist in the entry, the attribute is created with the
Slapi_Value specified. The function doesn't check for duplicate values, meaning it does not
check if the value being added is already there.
Syntax
214 Functions for managing entries