HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
#include "slapi-plugin.h"
slapi_value_compare(const Slapi_Attr *a, const Slapi_Value *v1,
const Slapi_Value *v2);
Parameters This function takes the following parameters:
A pointer to an attribute used to determine how the two values will be compared.
a
Pointer to the Slapi_Value structure containing the first value to compare.v1
Pointer to the Slapi_Value structure containing the second value to compare.v2
Returns This function returns one of the following values:
0 if the two values are equal.
-1 if v1 is smaller than v2.
1 if v1 is greater than v2.
42.2 slapi_value_dup()
Duplicates a value.
Syntax
#include "slapi-plugin.h"
slapi_value_dup(const Slapi_Value *v);
Parameters This function takes the following parameter:
Pointer to the Slapi_Value structure you wish to duplicate.v
Returns This function returns a pointer to a newly allocated Slapi_Value.
Memory concerns The new Slapi_Value is allocated and needs to be freed by the caller, using
“slapi_value_free()”.
See also “slapi_value_free()”
42.3 slapi_value_free()
Description This function frees from memory the Slapi_Value structure and its members (if
it is not NULL), and sets the pointer to NULL.
Syntax
#include "slapi-plugin.h"
slapi_value_free(Slapi_Value **value);
Parameters This function takes the following parameter:
Address of the pointer to the Slapi_Value you wish to free.value
Memory concerns Call this function when you are finished working with the structure.
42.4 slapi_value_get_berval()
Gets the berval structure of the value.
Syntax
#include "slapi-plugin.h"
slapi_value_get_berval( const Slapi_Value *value );
336 Functions for handling values