Important: The information in this document is obsolete and should not be used for new development.
Profile Access Procedure Operation Codes
When your application calls theCMOpenProfilefunction (page 3-69),CMNewProfilefunction (page 3-75),CMCopyProfilefunction (page 3-76), orCMNewLinkProfilefunction (page 3-112), it can supply the ColorSync Manager with a profile location structure of type CMProcedureLocation (page 3-42) to specify a procedure that provides access to a profile. The ColorSync Manager calls your procedure when the profile is created, initialized, opened, read, updated, or closed. For a description of the profile access procedure declaration, see MyCMProfileAccessProc (page 3-172). For sample code demonstrating procedure-based profile access, see "Accessing a Resource-Based Profile With a Procedure" (page 4-56) in Advanced Color Imaging on the Mac OS.When the ColorSync Manager calls your profile access procedure, it passes one of the following constants in the
commandparameter to specify an operation. Your procedure must be able to respond to each of these constants.
enum { cmOpenReadAccess= 1, /* open profile for reading */ cmOpenWriteAccess= 2,/* open profile for writing */ cmReadAccess = 3, /* read specified bytes from profile */ cmWriteAccess = 4, /* write specified bytes to profile */ cmCloseAccess = 5, /* close profile for read or write */ cmCreateNewAccess= 6,/* create new data stream for profile */ cmAbortWriteAccess= 7,/* cancel current write process */ cmBeginAccess = 8, /* begin procedure access */ cmEndAccess = 9 /* end procedure access */ };Enumerator descriptions
- cmOpenReadAccess
- Open the profile for reading.
- cmOpenWriteAccess
- Open the profile for writing. The total size of the profile is specified in the
sizeparameter.- cmReadAccess
- Read the number of bytes specified by the
sizeparameter.- cmWriteAccess
- Write the number of bytes specified by the
sizeparameter.- cmCloseAccess
- Close the profile for reading or writing.
- cmCreateNewAccess
- Create a new data stream for the profile.
- cmAbortWriteAccess
- Cancel the current write attempt.
- cmBeginAccess
- Begin the process of procedural access. This is always the first operation constant passed to the access procedure. If the call is successful, the cmEndAccess operation is guaranteed to be the last call to the procedure.
- cmEndAccess
- End the process of procedural access. This is always the last operation constant passed to the access procedure (unless the cmBeginAccess call failed).