LINEDEVSTATUS

This structure describes the current status of a line device.

At a Glance

Header file: Tapi.h
Windows CE versions: 1.0 and later

Syntax

typedef struct linedevstatus_tag {
DWORD
dwTotalSize;
DWORD
dwNeededSize;
DWORD
dwUsedSize;

DWORD
dwNumOpens;
DWORD
dwOpenMediaModes;
DWORD
dwNumActiveCalls;
DWORD
dwNumOnHoldCalls;
DWORD
dwNumOnHoldPendCalls;
DWORD
dwLineFeatures;
DWORD
dwNumCallCompletions;
DWORD
dwRingMode;
DWORD
dwSignalLevel;
DWORD
dwBatteryLevel;
DWORD
dwRoamMode;

DWORD
dwDevStatusFlags;

DWORD
dwTerminalModesSize;
DWORD
dwTerminalModesOffset;

DWORD
dwDevSpecificSize;
DWORD
dwDevSpecificOffset;

} LINEDEVSTATUS, FAR *LPLINEDEVSTATUS;

Members

dwTotalSize

Specifies the total size in bytes allocated to this data structure.

dwNeededSize

Specifies the size, in bytes, for this data structure that is needed to hold all the returned data.

dwUsedSize

Specifies the size, in bytes, of the portion of this data structure that contains useful data.

dwNumOpens

Specifies the number of active opens on the line device.

dwOpenMediaModes

Specifies a bit array that indicates for which media modes the line device is currently open.

dwNumActiveCalls

Specifies the number of calls on the line in call states other idle, onhold, onholdpendingtransfer, and onholdpendingconference.

dwNumOnHoldCalls

Specifies the number of calls on the line in the onhold state.

dwNumOnHoldPendCalls

Specifies the number of calls on the line in the onholdpendingtransfer or onholdpendingconference state.

dwLineFeatures

Specifies the line-related API functions that are currently available on this line. It uses the following LINEFEATURE_* constants:

Value Description
LINEFEATURE_DEVSPECIFIC Device-specific operations can be used on the line.
LINEFEATURE_DEVSPECIFICFEAT Device-specific features can be used on the line.
LINEFEATURE_FORWARD Forwarding of all addresses can be used on the line.
LINEFEATURE_MAKECALL An outgoing call can be placed on this line using an unspecified address.
LINEFEATURE_SETMEDIACONTROL Media control can be set on this line.
LINEFEATURE_SETTERMINAL Terminal modes for this line can be set.

dwNumCallCompletions

Specifies the number of outstanding call completion requests on the line.

dwRingMode

Specifies the current ring mode on the line device.

dwSignalLevel

Specifies the current signal level of the connection on the line. This is a value in the range 0x00000000 (weakest signal) to 0x0000FFFF (strongest signal).

dwBatteryLevel

Specifies the current battery level of the line device hardware. This is a value in the range 0x00000000 (battery empty) to 0x0000FFFF (battery full).

dwRoamMode

Specifies the current roam mode of the line device. It uses the following LINEROAMMODE_ constants:

Value Description
LINEROAMMODE_UNKNOWN The roam mode is currently unknown, but may be identified later.
LINEROAMMODE_UNAVAIL The roam mode is unavailable and cannot be known.
LINEROAMMODE_HOME The line is connected to the home network node.
LINEROAMMODE_ROAMA The line is connected to the Roam-A carrier and calls are charged accordingly.
LINEROAMMODE_ROAMB The line is connected to the Roam-B carrier and calls are charged accordingly.

dwDevStatusFlags

Specifies the size, in bytes, of this data structure that contains useful data, of type LINEDEVSTATUSFLAGS_.

Value Description
LINEDEVSTATUSFLAGS_CONNECTED Specifies if the line is connected to TAPI. If TRUE, the line is connected and API is able to operate on the line device. If FALSE, the line is disconnected and the application is unable to control the line device using TAPI.
LINEDEVSTATUSFLAGS_LOCKED This bit is most often used with line devices associated with cellular phones. Many cellular phones have a security mechanism that requires the entry of a password to enable the phone to place calls. This bit may be used to indicate to applications that the phone is locked and cannot place calls until the password is entered on the user interface of the phone, so that the application can present an appropriate alert to the user.
LINEDEVSTATUSFLAGS_MSGWAIT This member indicates if the line has a message waiting. If TRUE, a message is waiting; if FALSE, no message is waiting.
LINEDEVSTATUSFLAGS_INSERVICE This member indicates if the line is in service. If TRUE, the line is in service; if FALSE, the line is out of service.

dwTerminalModesSize

dwTerminalModesOffset

Specify the size, in bytes, of the variably sized device field that contains an array with DWORD-sized entries, and the offset, in bytes, from the beginning of this data structure. This array is indexed by terminal identifiers, in the range from zero to dwNumTerminals minus one. Each entry in the array specifies the current terminal modes for the corresponding terminal set using the lineSetTerminal function for this line. It uses the following LINETERMMODE_ constants:

Value Description
LINETERMMODE_LAMPS Lamp events sent from the line to the terminal.
LINETERMMODE_BUTTONS Button-press events sent from the terminal to the line.
LINETERMMODE_DISPLAY Display data sent from the line to the terminal.
LINETERMMODE_RINGER Ringer-control data sent from the switch to the terminal.
LINETERMMODE_HOOKSWITCH Hookswitch events sent between the terminal and the line.
LINETERMMODE_MEDIATOLINE The unidirectional media stream from the terminal to the line associated with a call on the line. Use this value when the routing of both unidirectional channels of a call’s media stream can be controlled independently.
LINETERMMODE_MEDIAFROMTERM The unidirectional media stream from the line to the terminal associated with a call on the line. Use this value when the routing of both unidirectional channels of a call’s media stream can be controlled independently.
LINETERMMODE_MEDIABIDIRECT The bidirectional media stream associated with a call on the line and the terminal. Use this value when the routing of both unidirectional channels of a call’s media stream cannot be controlled independently.

dwDevSpecificSize

dwDevSpecificOffset

Specify the size, in bytes, of the variably sized device-specific field, and the offset, in bytes, from the beginning of this data structure. 

Remarks

Device-specific extensions should use the DevSpecific (dwDevSpecificSize and dwDevSpecificOffset) variably sized area of this data structure.

The members dwAvailableMediaModes through dwAppInfoOffset are available only to applications that open the line device with an API version of 2.0 or later.