6.8 Line Open

A line is opened as a result of an application making a lineOpen request. The request is passed to the miniport by TAPI to NDISTAPI to NDISWAN through NDIS as an OID_TAPI_OPEN request. This request passes the NDIS_TAPI_OPEN structure specifying a device identifier, ulDeviceID, the device on which the line is to be opened. In addition, the structure contains htLine, a handle by which NDISTAPI refers internally to the line. The miniport must retain this line handle and return it in any status indications or responses to queries for that line, for instance when it reports a state change using NdisMIndicateStatus.

The miniport creates a structure to represent the line in which to keep its line-specific context. The miniport should return a value representing this context in the hdLine member of NDIS_TAPI_OPEN before returning from MiniportQueryInformation. The line-specific value in hdLine will be passed to the miniport in subsequent calls concerning this line, in the OIDs passed to MiniportQueryInformation and MiniportSetInformation requests, for instance, in an OID_TAPI_MAKE_CALL.

Setting Modes On a Line

If an application makes a lineOpen request with owner privilege, the application indicates it wants to receive incoming calls. The application must specify the valid types of incoming calls it will accept on that line. For instance, an application could request to receive such types as g3fax, interactive voice, datamodem, and so forth. MiniportSetInformation can be called one or more times with the OID_SET_DEFAULT_MEDIA_DETECTION request to set up the types the miniport should accept on behalf of a client.

If more than one application sets the media types, and one application’s list is different from another application’s list, the miniport will be called to set the media-detection types to the union of those requested by the two applications. If an incoming call appears with a media mode type not specified in the preceding successfully completed SET_DEFAULT_MEDIA_DETECTION request for that line, the miniport should not indicate the new call to TAPI. If a miniport does not receive a SET_DEFAULT_MEDIA_DETECTION request for a line, it should not indicate any incoming calls; that line is to be used only for outbound calls.

A miniport NIC driver receives the OID_TAPI_CONDITIONAL_MEDIA_DETECTION request to determine whether it supports the indication of new incoming calls of a specified media mode type or types, without actually committing the miniport. If the miniport can monitor for the indicated set of media modes and can support the capabilities indicated in LineCallParams and can place a call of the specified type, it returns NDIS_STATUS_SUCCESS. If so, the miniport will most likely receive subsequent requests such as OID_TAPI_OPEN, OID_SET_DEFAULT_MEDIA_DETECTION, and so forth.