beautypg.com

The btline structure – Dialogic 6.2 User Manual

Page 28

background image

The Bfv API Functions

November 2009

28

The BTLINE Structure

When an application calls the BfvLineAttach (or

BfvSessionAttach) function to open and attach a specified channel,

the function creates a separate BTLINE structure for a channel and

returns a pointer to the line structure. All information about the

channel is stored in its BTLINE structure, but only the line state,

the line type, and channel number are actually relevant. The

BfvLineDetach (or BfvSessionDetach) function deallocates a

BTLINE structure.

Applications do not directly access the internal fields of the BTLINE

structure, but instead use functions, described in detail in the

Bfv API Reference Manual, and the following macros, described in

detail with other macros in the Bfv API Reference Manual:

LINE_HAS_CAP(

lp, cap)

Confirms whether or not the line has the specified capability cap.

LINE_STATE(

lp)

Returns or sets the line state of the specified line.

LINE_TYPE(

lp)

Returns the line type of the specified line.

LINE_UNIT_NUM(

lp)

Returns the channel number of the specified line.

A line is always in one of the following states:

LINE_STATE_AWAIT_TRAINING

LINE_STATE_CONNECTED

LINE_STATE_FAX_MODE

LINE_STATE_HOLDUP

LINE_STATE_IDLE

LINE_STATE_NOLOOP

LINE_STATE_OFF_HOOK

LINE_STATE_RCV_INFO

LINE_STATE_RESETTING

LINE_STATE_RETAIN

LINE_STATE_RINGING

LINE_STATE_TURNAROUND