MyCMProfileFilterProcApplication-defined function that examines the profile whose reference you specify and determines whether to include it in the profile search result list.
After a profile has been included in the profile search result based on criteria specified in the search record, your
MyCMProfileFilterProcfunction 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
CMSearchRecordsearch record. Your
MyCMProfileFilterProcfunction can also perform searching using
This application-supplied function must conform to the following declaration, although the function name is arbitrary:
pascal Boolean MyCMProfileFilterProc ( CMProfileRef prof, void *refCon);
- A profile reference (page 3-63) to the profile to test.
- A reference constant that holds data passed through from the
CMNewProfileSearchfunction or the
- function result
- A result code of type Boolean. A return value of
falseindicates that the profile should be included. A return value of
trueindicates that the profile should be filtered out.
DISCUSSIONYour MyCMProfileFilterProc function is called after the
CMNewProfileSearchfunction 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(page 3-51) that contains a
filterfield. If the
filterfield contains a pointer to your
MyCMProfileFilterProcfunction, then your function is called to determine whether to exclude a profile from the search result list. Your function should return
truefor 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
NULLvalue for the search record's