Important: The information in this document is obsolete and should not be used for new development.
OTAsyncOpenMapper
Creates an asynchronous mapper and installs a notifier function for the mapper provider.C INTERFACE
OSStatus OTAsyncOpenMapper (OTConfiguration* config, OTOpenFlags oflag, OTNotifyProcPtr proc,C++ INTERFACE
None. C++ applications use the C interface to this function.PARAMETERS
config
- A pointer to an endpoint configuration structure that specifies the mapper's characteristics. You obtain a value for the
config
parameter by calling theOTCreateConfiguration
function. TheOTAsyncOpenMapper
function disposes of the configuration before returning.oflag
- Reserved; must be set to 0.
proc
- A pointer to a notifier function for this mapper.
contextPtr
- A context pointer for your use. The mapper provider passes this pointer value when calling the notifier function you specify in the
proc
parameter. You might use thecontextPtr
parametert o pass to your notifier function information about your mapper.- function result
- An error code. See Appendix B for more information.
DISCUSSION
TheOTAsyncOpenMapper
function opens a mapper having the configuration specified by theconfig
parameter. For additional information on mappers and configurations see "Getting Started With Open Transport" and the documentation provided for the mapper protocol you are using. TheOTAsyncOpenMapper
function runs asynchronously, returning as soon as the function has been queued for execution.The
OTAsyncOpenMapper
function attempts to create a mapper, and then calls the notifier function that you specified in theproc
parameter, passingT_OPENCOMPLETE
for thecode
parameter, a result code in theresult
parameter, and the mapper reference for the newly created mapper in thecookie
parameter. For more information on notifier functions and event codes see "Using Notifier Functions" and "Event Codes".A mapper created by the
OTAsyncOpenMapper
function operates in asynchronous mode and does not block. For more information about a mapper's mode of operations, see the section "Setting Modes of Operation for Mappers".You can open multiple mappers using identical or different configurations. The different mappers can be distinguished by the mapper reference. You can set the
contextPtr
parameter to point to the mapper reference or to a structure containing the mapper reference; this allows your notifier function to determine to which mapper a completion event belongs.To close a mapper use the function
OTCloseProvider
.SPECIAL CONSIDERATIONS
TheOTAsyncOpenMapper
function destroys the configuration value passed in the config parameter. You cannot use the same configuration to open multiple mappers. To copy the configuration for use when opening another mapper, you must call theOTCloneConfiguration
function.SEE ALSO
TheOTOpenMapper
function.