HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
#include "slapi-plugin.h"
int slapi_entry_attr_delete( Slapi_Entry *e, const char *type );
Parameters This function takes the following parameters:
Entry from which you want to delete the attribute.
e
Attribute type that you want to delete.
type
Returns This function returns one of the following values:
0
If successful.
1 If the specified attribute is not part of the entry.
-1 If an error occurred.
24.11 slapi_entry_attr_find()
Determines if an entry contains the specified attribute. If the entry contains the attribute, the
function returns a pointer to the attribute.
Syntax
#include "slapi-plugin.h"
int slapi_entry_attr_find( const Slapi_Entry *e, const char *type,
Slapi_Attr **attr );
Parameters This function takes the following parameters:
Entry that you want to check.
e
Name of the attribute that you want to check.
type
Pointer to the attribute, if the attribute is in the entry.
attr
Returns This function returns one of the following values:
0 if the entry contains the specified attribute.
-1 if the entry does not contain the specified attribute.
Memory concerns Do not free the returned attr. It is a pointer to the internal entry data
structure. It is usually wise to make a copy of the returned attr, using “slapi_attr_dup()”, to
avoid dangling pointers if the entry is freed while the pointer to attr is still being used.
See also “slapi_attr_dup()”
24.12 slapi_entry_attr_get_bool()
Gets the value of a given attribute of a given entry as a boolean value.
Syntax
#include "slapi-plugin.h"
char *slapi_entry_attr_get_bool(const Slapi_Entry* e, const char *type);
Parameters This function takes the following parameters:
Entry from which you want to get the boolean value.
e
Attribute type from which you want to get the value.
type
Returns This function returns one of the following values:
24.11 slapi_entry_attr_find() 217