HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Return Values This function returns either of two values:
1 means that the matching rule is a valid ordering matching rule for the given syntax.
0 means that the matching rule could not be found, does not apply to the given syntax, or
is not an ordering matching rule.
32.5 slapi_matchingrule_new()
Description This function allocates memory for a new Slapi_MatchingRuleEntry structure,
which represents a matching rule. After you call this function, you can call the
slapi_matchingrule_set() function to set the values in this structure and call the
slapi_matchingrule_register() function to register the matching rule.
Syntax
#include "slapi-plugin.h"
Slapi_MatchingRuleEntry *slapi_matchingrule_new();
Returns This function returns one of the following values:
A new Slapi_MatchingRuleEntry structure.
NULL if memory could not be allocated.
32.6 slapi_matchingrule_register()
Description This function registers the specified matching rule with the server. To create the
matching rule and set its values, call the slapi_matchingrule_new() function and the
slapi_matchingrule_set() function.
Syntax
#include "slapi-plugin.h"
int slapi_matchingrule_register(Slapi_MatchingRuleEntry *mrEntry);
Parameters This function takes the following parameter:
Slapi_MatchingRuleEntry structure representing the matching rule that you want
to register.
mrEntry
Returns This function returns one of the following values:
0 If the matching rule was successfully registered.
-1 If an error occurred.
32.7 slapi_matchingrule_set()
Sets information about the matching rule.
Description This function sets information in an Slapi_MatchingRuleEntry structure. To
get information from this structure, call the slapi_matchingrule_get() function.
Syntax
#include "slapi-plugin.h"
int slapi_matchingrule_set(Slapi_MatchingRuleEntry *mr,
int arg, void *value);
Parameters This function takes the following parameters:
Slapi_MatchingRuleEntry structure in which you want to set data.mr
ID specifying the type of information to set.
arg
The value that you want to set.
value
32.5 slapi_matchingrule_new() 261