TAPI - Returning an “opaque” data structure object

lineGetLineDevStatus()

Return an “opaque” data structure object


SYNTAX

lineGetLineDevStatus(DeviceID)

This function returns an “opaque” data structure object, the contents of which are specific to the line (service provider) and device class. The data structure object stores the current configuration of a media-stream device associated with the line device.

The DeviceID is an integer value, containing the number of the line device.

The tapiGetValue() function returns the value or values required, using the following form:

tapiGetValue(TAPI_VAR_DEV_STATUS, value)

The function should be called once for each value required.

The values that may be returned are:

TAPI_FLD_NUM_OPENS

Upon successful completion, returns an i4 value specifying the number of active calls to open function on the line device.

TAPI_FLD_OPEN_MEDIA_MODES

Upon successful completion, returns an i4 value specifying the bit array indicating the media types for which the line device is currently open.

TAPI_FLD_NUM_ACTIVE_CALLS

Upon successful completion, returns an i4 value specifying the number of calls on the line in call states other than idle, onhold, onholdpendingtransfer, and onholdpendingconference.

TAPI_FLD_NUM_ON_HOLD_CALLS

Upon successful completion, returns an i4 value specifying the number of calls on the line in the onhold state.

TAPI_FLD_NUM_ON_HOLD_PEND_CALLS

Upon successful completion, returns an i4 value specifying the number of calls on the line in the onholdpendingtransfer or onholdpendingconference state.

TAPI_FLD_LINE_FEATURES

Upon successful completion, returns an i4 value specifying the line-related API functions that are currently available on this line.

TAPI_FLD_NUM_CALL_COMPLETIONS

Upon successful completion, returns an i4 value specifying the number of outstanding call completion requests on the line.

TAPI_FLD_RING_MODE

Upon successful completion, returns an i4 value specifying the current ring mode on the line device.

API_FLD_SIGNAL_LEVEL

Upon successful completion, returns an i4 value specifying the current signal level of the connection on the line. This is a value in the range 0x00000000 (weakest signal) to 0x0000FFFF (strongest signal).

TAPI_FLD_BATTERY_LEVEL

Upon successful completion, returns an i4 value specifying the current battery level of the line device hardware. This is a value in the range 0x00000000 (battery empty) to 0x0000FFFF (battery full).

TAPI_FLD_ROAM_MODE

Upon successful completion, returns an i4 value specifying the current roam mode of the line device.

TAPI_FLD_DEV_STATUS_FLAGS

Upon successful completion, returns an i4 value specifying the status flags that indicate information such as whether the device is locked.


EXAMPLE

!temp Dev,,i4
!temp DevStatusFlags,,i4

     tmp.RC = lineGetLineDevStatus(tmp.Dev)
     tmp.DevStatusFlags = tapiGetValue(TAPI_VAR_DEV_STATUS, \
          TAPI_FLD_DEV_STATUS_FLAGS, tmp.Dev)

RELATED TOPICS

TAPI