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
OTResult parameter specifies the reason, if known, and the cookie parameter provides the port reference of the port that went off line. A port going off line often results in providers getting kOTProviderIsClosed events. 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
cookie parameter 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
OTResult parameter is the reason for the request (normally kOTNoError or kOTUserRequestedErr), and the cookie parameter is a pointer to an OTPortCloseStruct structure.
kOTNewPortRegistered
- A new port has been registered with Open Transport, as when the user inserts a new PCMCIA card. The
cookie parameter 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 the kOTPortEnabled event instead.