Carbon


CMProfileFilterProcPtr

Header: CMApplication.h Carbon status: Supported

Defines a pointer to a profile filter callback function. Your profile filter function examines the profile whose reference you specify and determines whether to include it in the profile search result list.

typedef Boolean(* CMProfileFilterProcPtr) (
    CMProfileRef prof, 
    void *refCon
);

You would declare your function like this if you were to name it MyCMProfileFilterCallback:

Boolean MyCMProfileFilterCallback (
    CMProfileRef prof, 
    void *refCon
);
Parameter descriptions
prof

A profile reference of type CMProfileRef to the profile to test.

refCon

A pointer to a reference constant that holds data passed through from the CMNewProfileSearch function or the CMUpdateProfileSearch function.

function result

False indicates that the profile should be included. True indicates that the profile should be filtered out.

DISCUSSION

Your MyCMProfileFilterCallback function is called after the CMNewProfileSearch function searches for profiles based on the search record’s contents as specified by the search bitmask.

When your application calls CMNewProfileSearch, it passes a reference to a search specification record of type CMSearchRecord of type CMSearchRecord that contains a filter field. If the filter field contains a pointer to your MyCMProfileFilterCallback function, then your function is called to determine whether to exclude a profile from the search result list. Your function should return true for a given profile to exclude that profile from the search result list. If you do not want to filter profiles beyond the criteria in the search record, specify a NULL value for the search record’s filter field.

After a profile has been included in the profile search result based on criteria specified in the search record, your MyCMProfileFilterCallback function can further examine the profile. For example, you may wish to include or exclude the profile based on criteria such as an element or elements not included in the CMSearchRecord search record. Your MyCMProfileFilterCallback function can also perform searching using AND or OR logic.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)