Important: The information in this document is obsolete and should not be used for new development.
Port-Related Events
There are several port-related events that Open Transport can send to an application that is registered as an Open Transport client. Note that if your application is not registered as a client, Open Transport cannot send it these events. See "OTRegisterAsClient" for more information.
enum { kOTPortDisabled = 0x25000001, kOTPortEnabled = 0x25000002, kOTPortoffLine = 0x25000003, kOTPortoffLine = 0x25000004, kOTClosePortRequest= 0x25000005, kOTYieldPortRequest= 0x25000005,, kOTNewPortRegistered = 0x25000006 };Constant descriptions
kOTPortDisabled- A port has gone off line, as when the user removes a PCMCIA card while the computer is running. The
OTResultparameter specifies the reason, if known, and thecookieparameter provides the port reference of the port that went off line. A port going off line often results in providers gettingkOTProviderIsClosedevents. There is no guarantee in Open Transport as to which of these events will be received first.kOTPortEnabled- A port that had previously been disabled is now reenabled, as when the user reinserts a previously removed PCMCIA card while the computer is running. The
cookieparameter is the port reference of the port that is now enabled.kOTPortoffLine- The port is now offline.
kOTClosePortRequest- A request has been made to close or yield this port.
kOTYieldPortRequest- You currently are using a provider that is using a port that some other application wants to use. The
OTResultparameter is the reason for the request (normallykOTNoErrororkOTUserRequestedErr), and thecookieparameter is a pointer to anOTPortCloseStructstructure.kOTNewPortRegistered- A new port has been registered with Open Transport, as when the user inserts a new PCMCIA card. The
cookieparameter is the port reference of the new port. Your provider receives this event the first time a new port is enabled. Subsequently, if a port is reenabled after being disabled, you receive thekOTPortEnabledevent instead.