Terminal Messages
The following bit masks specify the messages that the Telephone Manager passes to your application for a given terminal activity. You also use these constants when you callTELTermMsgHandto specify which messages you want your message handler to receive.When your terminal message handler receives a message, the
hTELparameter is a handle to the telephone record associated with the terminal that originated the message. Themsgparameter is one of the following constants. Theglobalsparameter is the value you specified when you called theTELTermMsgHandfunction to register the message handling routine. Themtypeandvalueparameters vary in meaning according to the message type.
enum { telTermHookMsg = 0x00000001, telTermKeyMsg = 0x00000002, telTermVolMsg = 0x00000004, telTermDisplayMsg = 0x00000008, telTermEnableMsg = 0x00000010, telTermOpenMsg = 0x00000020, telTermCloseMsg = 0x00000040, telTermResetMsg = 0x00000080, telTermErrorMsg = 0x00000100, telTermIndHSStateChgMsg = 0x00000200, telTermIndHSConnectMsg = 0x00000400, telTermKeyImmMsg = 0x00000800, telTermVolStateMsg = 0x00001000, telTermOtherMsg = 0x80000000, telAllTermMsgs = 0x00001fff };Constant descriptions
telTermHookMsg- Your application receives this message when a hookswitch state associated with a terminal has changed (either because your application called
TELSetHookSwor because the telephone was physically placed on or off hook). Themtypeparameter is a constant that indicates the type of hookswitch. Thevalueparameter is a constant that indicates whether the hookswitch state is on or off. See "Hookswitch Types and States" on page 2-11 for a description of the constants you can find in these parameters.telTermKeyMsg- Your application receives this message when a key on an attached telephone set (either on the telephone keypad or a feature key) has been pressed. This message is queued and then sent to your message handler at system task time. (If keys are selected through software, notification is provided through the applicable directory number and call appearance message handlers.) The
mtypeparameter is a constant indicating which kind of key was pressed. Thevalueparameter is the ASCII value for the key that was pressed or a constant that indicates a feature key. See "Key Press Constants" on page 5-27 for a description of these constants.telTermVolMsg- Your application receives this message when a speaker volume level or a microphone sensitivity level has been adjusted for a given terminal (either because your application called
TELSetVolumeorTELAlertto modify the level, or because a user manually changed a volume setting on the telephone handset). Themtypeparameter is a constant that indicates which volume or sensitivity has been set. Thevalueparameter is constant that indicates the new level. This parameter is equal totelVolSameif the level has not been changed, or can have any value fromtelVolMintotelVolMax. See "Volume Controls" on page 2-12 for a description of the constants that can be passed in these parameters.telTermDisplayMsg- Your application receives this message when the display on the telephone terminal has changed. The
mtypeparameter is a constant that indicates the current display mode. Thevalueparameter is constant that indicates which item in the display has changed. See "Display Modes" on page 2-10 and "Display Items" on page 2-10 for a description of the constants that can be passed in these parameters.telTermEnableMsg- Your application receives this message whenever the enabled state of a terminal changes. The
mtypeparameter is not used and is always set to 0. Thevalueparameter is a constant that indicates the state of the connection between a tool and a terminal. See "Terminal States" on page 5-26 for a description of the constants that can be passed in this parameter.telTermOpenMsg- Your application receives this message when a terminal is successfully opened in response to the
TELOpenTermfunction. Themtypeandvalueparameters are not used and are always set to 0.telTermCloseMsg- Your application receives this message when a terminal is shut down in response to the
TELCloseTermfunction. Themtypeandvalueparameters are not used and are always set to 0.telTermResetMsg- Your application receives this message when a terminal has been reset in response to the
TELResetTermfunction. Themtypeandvalueparameters are not used and are always set to 0.telTermErrorMsg- Your application receives this message when a terminal hardware related error has occurred (for example, the hardware device was disconnected). The
mtypeparameter specifies the error that occurred. See "Terminal Errors" on page 5-26 for a description of the values this parameter can contain. Thevalueparameter is not used and is always set to 0.telTermIndHSStateChgMsg- Your application receives this message when there is a change in the independent handset state (either because your application called
TELIndHandsetConnector because the independent handset was physically placed on or off hook by the user). Themtypeparameter is a constant that specifies whether the handset is connected to the telephone line. Thevalueparameter is constant that specifies whether the handset is on-hook or off-hook. These constants are described in "Independent Handset States" on page 2-14.telTermIndHSConnectMsg- Your application receives this message after an independent handset has been connected or disconnected by the
TELSetIndHSConnectfunction. Themtypeparameter is not used and is always set to 0. Thevalueparameter is constant that specifies whether the handset is connected to the telephone line. These constants are described in "Independent Handset States" on page 2-14.telTermKeyImmMsg- Your application receives this message when a key on an attached telephone set (either on the telephone keypad or a feature key) has been pressed. This message is sent immediately, not at system task time. (If keys are selected through software, notification is provided through the applicable directory number and call appearance message handlers.) The
mtypeparameter is a constant indicating which kind of key was pressed. Thevalueparameter is the ASCII value for the key that was pressed or a constant that indicates a feature key. See "Key Press Constants" on page 5-27 for a description of these constants.telTermVolStateMsg- Your application receives this message when a user mutes a device (such as the handset speaker, handset microphone, or ringer) or turns it back on without changing the volume setting. The
mtypeparameter is a constant that indicates which device has had its volume state changed. Thevalueparameter is a constant that indicates the new state of the device. See "Volume Controls" on page 2-12 for a description of these constants.telTermOtherMsg- Your application receives this message when a telephone tool needs to send it some information about the terminal that cannot be provided by the other terminal messages. The values passed in the
mtypeandvalueparameters are defined by the telephone tool.telAllTermMsgs- All terminal events except
telTermOtherMsg.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help