Filtering Search Objects
To support targeted parsing and printing, you can use the attribute
filtering mechanisms in the Search stream. For each Search stream object,
you can associate a list of allowed attributes. When printing a Search stream,
only the attributes that match the allowed attributes will be printed. When
parsing a Search stream, only the attributes that match the allowed attributes
will be parsed.
SearchStream_IsAllowed() and SearchStream_SetAllowed() allow attributes, while SearchStream_IsDenied() and SearchStream_SetDenied() deny attributes. You can allow or deny
an attribute, but not both.
SearchStream_IsAllowed
|
NSAPI_PUBLIC boolean_t SearchStream_IsAllowed
(SearchStream *ss, char *attribute);
Indicates that the given attribute is allowed (that is, it can be printed
or parsed).
|
SearchStream_SetAllowed
|
NSAPI_PUBLIC int SearchStream_SetAllowed
(SearchStream *ss, char *allowed_attrs[])
Sets all the attributes in the allowed_attrs array
to allowed.
|
SearchStream_SetDenied
|
NSAPI_PUBLIC int SearchStream_SetDenied
(SearchStream *ss, char *denied_attrs[]);
Sets all the attributes in the allowed_attrs array
to be denied (that is, they cannot be parsed or printed).
|
SearchStream_GetAllowed
|
NSAPI_PUBLIC char **SearchStream_GetAllowed
(SearchStream *ss)
Returns an array of all the attributes that are allowed.
|
SearchStream_GetDenied
|
NSAPI_PUBLIC char **SearchStream_GetDenied
(SearchStream *ss);
Returns an array of all the attributes that are denied.
|