To see if an entry complies with the schema, call the
slapi_entry_schema_check()
Getting the Attributes and Values of an Entry
There are two basic ways to obtain the attributes and values of an entry:
•
You can iterate through the attributes of the entry, testing each one to see if it is
the needed attribute.
•
You can use the
slapi_entry_attr_find()
specific attribute.
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 you are interested in.
To retrieve the subsequent attributes in the entry, call
passing to it the pointer to the current attribute in the
function. Like
slapi_entry_first_attr()
pointer to the current attribute.
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 return 0 if the entry contains the attribute, -1 if it does not.
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 .
function.
function to get the first attribute of the entry. This
,
slapi_entry_next_attr()
.
slapi_entry_add_values_sv()
Working with Entries, Attributes, and Values
function to see if an entry has a
slapi_attr_value_find()
slapi_entry_next_attr()
parameter of the
cookie
slapi_entry_attr_find()
Chapter 5
Front-End API Functions
to
,
returns a
.
63
Need help?
Do you have a question about the NETSCAPE DIRECTORY SERVER 6.2 - PLUG-IN and is the answer not in the manual?
Questions and answers