![]() |
CMMValidateProfile |
||||
Header: | CMMComponent.h | Carbon status: | Unsupported | |
Handles the kCMMValidateProfile request by determining if the specified profile contains the minimum set of elements required for a profile of its type.
CMError CMMValidateProfile ( CMMComponent cmm, CMProfileRef prof, Boolean *valid );
A handle to your CMMs storage for the instance of your component associated with the calling application or device driver.
A reference to the profile to validate.
A pointer to a flag whose value you set to true if the profile contains the elements required for a color-matching or color-checking session for a profile of this type and false if it does not.
A CMM should respond to the kCMMValidateProfile request code, but it is not required to do so. The ColorSync Manager sends this request code to your CMM on behalf of an application or device driver that called the CMValidateProfile function. The ColorSync Manager dispatches this request to the Component Manager, which calls your CMM to service the request. A CMM typically responds to the kCMMValidateProfile request code by calling a CMM-defined function (for example, CMMValidateProfile) to handle the request.
Your CMMValidateProfile function should test the profile whose reference is passed in the prof parameter to determine if the profile contains the minimum set of elements required for a profile of its type. For each profile class, such as a device profile, there is a specific set of required tagged elements defined by the ICC that the profile must include.
The ICC also defines optional tags, which may be included in a profile. Your CMM might use these optional elements to optimize or improve its processing. Additionally, a profile might include private tags defined to provide your CMM with processing capability it uses. The profile developer can define these private tags, register the tag signatures with the ICC, and include the tags in a profile.
Your CMMValidateProfile function should check for the existence of the required minimum set of profile elements for a profile of this type and any optional or private tags required by your CMM.
Instead of itself checking the profile for the minimum profile elements requirements for the profile class, your CMMValidateProfile function may use the Component Manager functions to call ColorSyncs default CMM and have it perform the minimum defaults requirements validation. The signature of the default CMM is 'appl'.
To call the default CMM when responding to a kCMMValidateProfile request from an application, your CMM can use the standard mechanisms used by applications to call another component.
CMMValidateProfile is an API to CMMs. Use CMValidateProfile instead. Application developers should avoid calling CMMs directly, since they may or may not support a given API.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)