OTOpenMapper
Creates a mapper provider and returns a mapper reference. This function is synchronous and creates a mapper that operates synchronously.C INTERFACE
MapperRef OTOpenMapper (OTConfiguration* config, OTOpenFlags oflag, OSErr* err)C++ INTERFACES
None. C++ applications use the C interface to this function.PARAMETERS
config- A pointer to a configuration structure that specifies the mapper's characteristics. You obtain a value for the
configparameter by calling the OTCreateConfiguration function. TheOTOpenMapperfunction deletes the configuration structure when creating the mapper or attempting to create it.oflag- Reserved; must be set to 0.
err- A pointer to the result code for this function.
DESCRIPTION
TheOTOpenMapperfunction opens a mapper having the configuration specified by theconfigparameter. For additional information see the chapter "Configuration Management" and the documentation provided for the name-binding protocol you are using. The function returns a mapper reference, by which you refer to the created mapper when calling mapper functions. If theOTOpenMapperfunction fails, its return value isNULL.A mapper created by the
OTOpenMapperfunction operates in synchronous mode, unless you change the mapper's mode of execution by calling theOTSetAsynchronousfunction. When a mapper is in synchronous mode, all mapper provider functions execute synchronously.By default, a newly created mapper does not block and does not acknowledge sends. To change the mapper's default mode of operation, you can call the
OTSetBlockingfunction and theOTIsAckingSendsfunction.You can open multiple mappers using identical or different configurations, although if you use identical configurations, you must read the "Special Considerations" section, next. The different mappers can be distinguished by the mapper reference.
SPECIAL CONSIDERATIONS
Because theOTOpenMapperfunction executes synchronously, your application should not call this function at interrupt time.The
OTOpenMapperfunction destroys the configuration structure returned by theOTCreateConfigurationfunction. If you want to use the same configuration to open additional mappers, you must obtain a valid copy of the configuration structure by calling theOTCloneConfigurationfunction.SEE ALSO
TheOTCreateConfigurationfunction used to create the configuration structure that defines the protocols underlying the mapper is discussed in the chapter "Configuration Management" in this book.To create a mapper asynchronously, call the
OTAsyncOpenMapperfunction (page 4-16).To close and delete a mapper, call the
OTCloseProviderfunction, described in the chapter "Providers" in this book.For additional information about a mapper's mode of operations, see "Setting Modes of Operation for Mappers" on page 4-5.
The
OTSetAsynchronousfunction, theOTSetBlockingfunction, and theOTIsAckingSendsfunction are described in the chapter "Providers" in this book.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help