Iterating Through The Attributes In An Entry; Finding A Specific Attribute In An Entry; Adding And Removing Values; Working With Dns And Rdns - Netscape DIRECTORY SERVER 7.0 - PLUG-IN Manual

For plug-in
Table of Contents

Advertisement

Once you find the attribute you are looking for, use
return the value of that attribute.

Iterating through the Attributes in an Entry

To iterate through the attributes associated with an entry, call the
slapi_entry_first_attr()
function returns a pointer to the first attribute in the entry. With a pointer to the
attribute, you can test to see if it is the attribute in which you are interested.
To retrieve the subsequent attributes in the entry, call
slapi_entry_next_attr()
the
cookie
slapi_entry_next_attr()
Once you find the attribute you need, you can retrieve its value using
slapi_attr_value_find()

Finding a Specific Attribute in an Entry

To see if an entry contains a specific attribute, call
This function returns

Adding and Removing Values

You can also call front-end routines to add or remove attributes and values in an
entry. The front-end provides the following functionality:
To add new values to an entry, call the
function .
To remove values from an entry, call
In certain situations, you may want to add an attribute and its values to an
entry while not replacing any attribute values that already exist. To do this,
call the

Working with DNs and RDNs

In certain situations, the front-end passes DNs to the backend through the
parameter block. For example, when calling the add function, the parameter block
includes a parameter that specifies the DN of the new entry to be added.
function to get the first attribute of the entry. This
, passing to it the pointer to the current attribute in
parameter of the function. Like
returns a pointer to the current attribute.
.
if the entry contains the attribute,
0
slapi_entry_attr_merge_sv()
slapi_attr_value_find()
slapi_entry_first_attr()
slapi_entry_attr_find()
if it does not.
-1
slapi_entry_add_values_sv()
slapi_entry_delete_values_sv()
function.
Chapter 5
Front-End API Functions
Working with DNs and RDNs
to
,
.
.
73

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the NETSCAPE DIRECTORY SERVER 7.0 - PLUG-IN and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Netscape directory server 7.0

Table of Contents