|
Version Negotiation
Over time, different versions may exist for TAPI, applications, and service
providers for a line or phone. New versions may define new features, new fields
to data structures, and so on. Version numbers therefore indicate how to
interpret various data structures.
To allow optimal interoperability of different versions of applications,
versions of TAPI itself, and versions of service providers by different vendors,
TAPI provides a simple, two-step version negotiation mechanism for applications.
Two different versions must be agreed on by the application, TAPI, and the
service provider for each line device. The first is the version number for Basic and
Supplementary Telephony and is referred to as the API version. The other is
for provider-specific extensions, if any, and is referred to as the extension
version. The format of the data structures and data types used by TAPI's basic and
supplementary features is defined by the API version, while the extension
version determines the format of the data structures defined by the vendor-specific
extensions.
Version negotiation proceeds in two phases. In the first phase, the API
version number is negotiated and the extension ID associated with any vendor-specific
extensions supported on the device is obtained. In the second phase, the
extension version is negotiated. If the application does not use any API extensions,
it skips the second phase and extensions are not activated by the service
provider. If the application does want to use extensions, but the service
provider's extensions (the extension ID) are not recognized by the application, the
application should skip the negotiation for extension version as well. Each vendor
has its own set of legal (recognized) versions for each set of extension
specifications it distributes.
The lineNegotiateAPIVersion function is used to negotiate the API version number to use. It also
retrieves the extension ID supported by the line device, returning zeros if no
extensions are supported. With this function call, the application provides the API
version range it is compatible with. TAPI in turn negotiates with the line's
service provider to determine which API version range it supports. TAPI next selects
a version number (typically, although not necessarily, the highest version
number) in the overlapping version range that the application, the DLL, and the
service provider have supplied. This number is returned to the application, along
with the extension ID that defines the extensions available from that line's
service provider.
If the application wants to use the extensions defined by the returned
extension ID, it must first call lineNegotiateExtVersion to negotiate the extension version. In a similar negotiation phase, the
application specifies the already agreed-upon API version and the extension version
range it supports. TAPI passes this information to the service provider for the
line. The service provider checks the API version and the extension version
range against its own, and selects the appropriate extension version number, if
one exists.
When the application later calls lineGetDevCaps, it returns a set of device capabilities for the line that correspond to the
results of version negotiation. These include the line's device capabilities
consistent with the API version and the line's device-specific capabilities
consistent with the extension version. The application must specify both of these
version numbers when it opens a line. At that point, the application, the DLL,
and the service provider are committed to using the agreed-upon versions. If
device-specific extensions are not to be used, the extension version should be
specified as zero.
In an environment where multiple applications open the same line device, the
first application to open the line device selects the versions for all future
applications that want to use the line (service providers do not support multiple
versions simultaneously.) Similarly, an application that opens multiple line
devices may find it easier to operate all line devices under the same API
version number.
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|