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
configparameter by calling theOTCreateConfigurationfunction. TheOTAsyncOpenMapperfunction 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
procparameter. You might use thecontextPtrparametert o pass to your notifier function information about your mapper.- function result
- An error code. See Appendix B for more information.
DISCUSSION
TheOTAsyncOpenMapperfunction opens a mapper having the configuration specified by theconfigparameter. For additional information on mappers and configurations see "Getting Started With Open Transport" and the documentation provided for the mapper protocol you are using. TheOTAsyncOpenMapperfunction runs asynchronously, returning as soon as the function has been queued for execution.The
OTAsyncOpenMapperfunction attempts to create a mapper, and then calls the notifier function that you specified in theprocparameter, passingT_OPENCOMPLETEfor thecodeparameter, a result code in theresultparameter, and the mapper reference for the newly created mapper in thecookieparameter. For more information on notifier functions and event codes see "Using Notifier Functions" and "Event Codes".A mapper created by the
OTAsyncOpenMapperfunction 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
contextPtrparameter 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
TheOTAsyncOpenMapperfunction 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 theOTCloneConfigurationfunction.SEE ALSO
TheOTOpenMapperfunction.