14.24. Slapi_MatchingRuleEntry

Slapi_MatchingRuleEntry is the data type for an opaque structure that represents a matching rule.
The matching rule definition can be specified as a dynamic declaration using functions such as slapi_matchingrule_new() or slapi_matchingrule_set().
Alternatively, the matching rule definition can also be specified as a static declaration. For example:
static Slapi_MatchingRuleEntry
integerMatch = { INTEGERMATCH_OID, NULL /* no alias? */,
	"integerMatch", "The rule evaluates to TRUE if and only if the
attribute value and the assertion value are the same integer value.",
	INTEGER_SYNTAX_OID, 0 /* not obsolete */ };
...
int
int_init( Slapi_PBlock *pb )
{
	int rc;
...
	rc = slapi_matchingrule_register(&integerMatch);
...
}
Table 14.14, “Frontend API Functions for Slapi_MatchingRuleEntry” summarizes the front-end API functions that can be called to work with matching rules.
Syntax

This function has the following syntax:

typedef struct slapi_matchingRuleEntry {
	char *mr_oid;
	char *mr_oidalias;
	char *mr_name;
	char *mr_desc;
	char *mr_syntax;
	int mr_obsolete;
} slapi_MatchingRuleEntry;
typedef struct slapi_matchingRuleEntry Slapi_MatchingRuleEntry;
See Also

 

Table 14.14. Frontend API Functions for Slapi_MatchingRuleEntry

To perform this action... Call this function
Compare two berval structures to determine if they are equal. slapi_berval_cmp()
Call the indexer function associated with an extensible match filter. slapi_mr_filter_index()
Free the specified matching rule structure (and optionally, its members) from memory. slapi_matchingrule_free()
Get information about a matching rule. slapi_matchingrule_get()
Call the indexer factory function for the plug-in responsible for a specified matching rule. slapi_mr_indexer_create()
Allocate memory for a new Slapi_MatchingRuleEntry structure. slapi_matchingrule_new()
Register the specified matching rule with the server. slapi_matchingrule_register()
Set information about the matching rule. slapi_matchingrule_set()
Determines if a matching rule is a valid ordering matching rule for the given syntax. slapi_matchingrule_is_ordering()
Reserved for future use. slapi_matchingrule_unregister()