2.2.3.2.11 PHONESTATE_Constants

The PHONESTATE_Constants are bit-flag constants that describe various status items for a phone device.

Constant/value

Description

PHONESTATE_OTHER

0x00000001

The phone-status items, other than those listed below, have changed. The application checks the current phone status to determine which items have changed.

PHONESTATE_CONNECTED

0x00000002

The connection between the phone device and TAPI was just made. This happens when TAPI is first invoked or when the wire that connects the phone to the computer is plugged in with TAPI active.

PHONESTATE_DISCONNECTED

0x00000004

The connection between the phone device and TAPI was just broken. This happens when the wire that connects the phone set to the PC is unplugged while TAPI is active.

PHONESTATE_OWNER

0x00000008

The number of owners for the phone device.

PHONESTATE_MONITORS

0x00000010

The number of monitors for the phone device.

PHONESTATE_DISPLAY

0x00000020

The display of the phone has changed.

PHONESTATE_LAMP

0x00000040

A lamp of the phone has changed.

PHONESTATE_RINGMODE

0x00000080

The ring mode of the phone has changed.

PHONESTATE_RINGVOLUME

0x00000100

The ring volume of the phone has changed.

PHONESTATE_HANDSETHOOKSWITCH

0x00000200

The handset hookswitch state has changed.

PHONESTATE_HANDSETVOLUME

0x00000400

The speaker volume setting of the handset has changed.

PHONESTATE_HANDSETGAIN

0x00000800

The microphone gain setting of the handset has changed.

PHONESTATE_SPEAKERHOOKSWITCH

0x00001000

The hookswitch state of the speaker phone has changed.

PHONESTATE_SPEAKERVOLUME

0x00002000

The speaker volume setting of the speaker phone has changed.

PHONESTATE_SPEAKERGAIN

0x00004000

The microphone gain setting state of the speaker phone has changed.

PHONESTATE_HEADSETHOOKSWITCH

0x00008000

The hookswitch state of the headset has changed.

PHONESTATE_HEADSETVOLUME

0x00010000

The speaker volume setting of the headset has changed.

PHONESTATE_HEADSETGAIN

0x00020000

The microphone gain setting of the headset has changed.

PHONESTATE_SUSPEND

0x00040000

The application's use of the phone is temporarily suspended.

PHONESTATE_RESUME

0x00080000

The application's use of the phone device is resumed after having been suspended for some time.

PHONESTATE_DEVSPECIFIC

0x00100000

The device-specific information of the phone has changed.

PHONESTATE_REINIT

0x00200000

Items have changed in the configuration of phone devices. To become aware of these changes (as for the appearance of new phone devices), the application reinitializes its use of TAPI.

The following constants are present in TAPI versions 1.4, 2.0, 2.1, 2.2, 3.0, and 3.1.

Constant/value

Description

PHONESTATE_CAPSCHANGE

0x00400000

Indicates that, because of configuration changes made by the user or other circumstances, one or more of the members in the PHONECAPS packet have changed. The application uses GetDevCaps to read the updated packet. If a service provider sends a PHONE_STATE packet that contains this value to TAPI, TAPI will pass it on to applications that have negotiated TAPI version 1.4, 2.0, 2.1, 2.2, 3.0, or 3.1; applications negotiating a previous TAPI version will receive PHONE_STATE packets specifying PHONESTATE_REINIT, requiring them to shut down and reinitialize their connection to TAPI to obtain the updated information.

PHONESTATE_REMOVED

0x00800000

Indicates that the device is being removed from the computer by the service provider (most likely through user action or through a control panel or similar tool). A PHONE_STATE packet with this value is usually immediately followed by a PHONE_CLOSE packet on the device. Subsequent attempts to access the device prior to TAPI being reinitialized results in PHONEERR_NODEVICE being returned to the application. If a service provider sends a PHONE_STATE packet that contains this value to TAPI, TAPI will pass it on to applications that have negotiated TAPI version 1.4, 2.0, 2.1, 2.2, 3.0, or 3.1. Applications that negotiate a previous TAPI version do not receive any notification.