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:

mr
Slapi_MatchingRuleEntry structure in which you want to set data.
arg
ID specifying the type of information to set.
value
The value that you want to set.
The arg argument can have one of the following values:
ID Data Type of the value Argument Description
SLAPI_MATCHINGRULE_NAME
char *
Name of the matching rule.
SLAPI_MATCHINGRULE_OID
char *
OID of the matching rule.
SLAPI_MATCHINGRULE_DESC
char *
Description of the matching rule.
SLAPI_MATCHINGRULE_SYNTAX
char *
Syntax supported by the matching rule.
SLAPI_MATCHINGRULE_OBSOLETE
int
If 1, the matching rule is obsolete.
Returns

This function returns one of the following values:

  • 0 if the information was successfully set.
  • -1 if an error occurred; for example, if an invalid argument was specified.