Sun Directory Server Enterprise Edition 7.0 Developer's Guide

slapi_filter_get_type()

(Applies only to filters of the type LDAP_FILTER_PRESENT) Gets the attribute type specified in the filter.

Syntax

#include "slapi-plugin.h"
int slapi_filter_get_type( Slapi_Filter *f, char **type );

Parameters

This function takes the following parameters:

f

Filter from which you want to get the substring values.

type

Pointer to the attribute type of the filter.

Returns

This function returns 0 if successful, or -1 if the filter is not one of the types listed above.

Description

Filters of the type LDAP_FILTER_PRESENT generally determine if a specified attribute is assigned a value. For example:

(mail=*)

This filter finds entries that have a value assigned to the mail attribute.

Call this function to get the attribute type from this filter. In the case of the example above, calling this function gets the attribute type mail.

Memory Concerns

The string returned in the parameter type must not be freed after calling this function. It will be freed when the structure Slapi_Filter is freed by calling slapi_filter_free() .

See Also

slapi_filter_get_attribute_type()

slapi_filter_get_ava()

slapi_filter_get_choice()