Device Classes

A device class is a group of related physical devices or device drivers through which applications send and receive the information or data that makes up a call. Every device class has a device class name that uniquely identifies the class, and provides information about the programming interface and commands that can be used to open and communicate with the devices in the class.

The Telephony application programming interface (TAPI) associates devices from one or more device classes to each line or phone device. You access one of these devices by retrieving the device identifier for the device using the lineGetID4OL17WJ or phoneGetIDCQL49I function. You supply the device class name, and the function returns the specific port name, device name, device handle, or device identifier that you need to open and access the device. The format of the information returned depends on the device class and is described in subsequent topics of this section.

 

Note  The device identifier definitions apply to 16-bit and 32-bit TAPI. In some cases, the data type of a media handle in the device identifier definition may be different from that specified by the Microsoft  Windows  operating system version 3.x or Microsoft  Win32  application programming interface. For example, Windows version 3.x and Win32 define wave device identifiers with the UINT type, but TAPI defines this device identifier with the DWORD type. In such cases, you should cast the media handle to the appropriate data type when using it with the Windows version 3.x or Win32 API.

 

You also use device class names with the lineConfigDialog71035C and phoneConfigDialog1E9NGCV functions to enable the user to set configuration options for the given device, with the lineGetIconC5CAK7 and phoneGetIconM6ATQ9 functions to retrieve an icon to represent the given device, and with the lineGetDevConfig19SYTUS and lineSetDevConfigI9Z_MN functions to directly retrieve and set configuration options for the given device.

By default, there are the following device class names.

Device Class Name

Description

comm

Communications port.

comm/datamodem

Modem through a communications port.

comm/datamodem/portname

Name of the device to which a modem is connected.

wave/in

Wave audio device (input only).

wave/out

Wave audio device (output only).

midi/in

Midi sequencer (input only).

midi/out

Midi sequencer (output only).

tapi/line

Line device.

tapi/phone

Phone device.

ndis

Network device.

tapi/terminal

Terminal device.

 

Note  These names are not case sensitive; you can use any combination of uppercase and lowercase letters.

 

Additional device classes and device class names may be available on a given system. In general, if a device does not belong to one of the default device classes, the manufacturer typically defines a new device class and assigns a unique device class name. Check the documentation for the device to determine what additional device classes are available for it. Note, however, that although the device class and media mode are related, they are not the same. A media mode describes a format of information on a call, and a device class defines the programming interface used to manage that information. So, even if a manufacturer defines a new media mode, it is not necessarily true that the manufacturer also needs to define a new device class to support the mode.

The format of the configuration data used with the lineSetDevConfigI9Z_MN and lineGetDevConfig19SYTUS functions also depends on the device class. In general, you use lineGetDevConfig to save a copy of the current device configuration data and then later use lineSetDevConfig with the saved configuration data to restore the device configuration to the previous state. This is a convenient way to temporarily change the configuration without requiring the user to manually restore it to the previous state. Because the exact format of the device configuration data may be different with each service provider, you should not use lineSetDevConfig and lineGetDevConfig to manipulate the device configuration data directly. Some formats are provided only for information.