Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. tapiutil.h
  5. Abstract:
  6. Utility functions for working with TAPI
  7. Environment:
  8. Windows fax driver user interface
  9. Revision History:
  10. 09/18/96 -davidx-
  11. Created it.
  12. dd-mm-yy -author-
  13. description
  14. --*/
  15. #ifndef _TAPIUTIL_H_
  16. #define _TAPIUTIL_H_
  17. #include <shellapi.h>
  18. //
  19. // Initialize the country list box
  20. //
  21. VOID
  22. InitCountryListBox(
  23. PFAX_TAPI_LINECOUNTRY_LIST pCountryList,
  24. HWND hwndList,
  25. HWND hwndAreaCode,
  26. LPTSTR lptstrCountry,
  27. DWORD countryCode,
  28. BOOL bAddCountryCode
  29. );
  30. //
  31. // Handle selection changes in the country list box
  32. //
  33. VOID
  34. SelChangeCountryListBox(
  35. HWND hwndList,
  36. HWND hwndAreaCode,
  37. PFAX_TAPI_LINECOUNTRY_LIST pCountryList
  38. );
  39. //
  40. // Return the current selection of country list box
  41. //
  42. DWORD
  43. GetCountryListBoxSel(
  44. HWND hwndList
  45. );
  46. //
  47. // Return the default country ID for the current location
  48. //
  49. DWORD
  50. GetDefaultCountryID(
  51. VOID
  52. );
  53. //
  54. // Given a FAX_TAPI_LINECOUNTRY_ENTRY structure, determine if area code is needed in that country
  55. //
  56. INT
  57. AreaCodeRules(
  58. PFAX_TAPI_LINECOUNTRY_ENTRY pLineCountryEntry
  59. );
  60. #define AREACODE_DONTNEED 0
  61. #define AREACODE_REQUIRED 1
  62. #define AREACODE_OPTIONAL 2
  63. //
  64. // Find the specified country from a list of all countries and
  65. // return a pointer to the corresponding FAX_TAPI_LINECOUNTRY_ENTRY structure
  66. //
  67. PFAX_TAPI_LINECOUNTRY_ENTRY
  68. FindCountry(
  69. PFAX_TAPI_LINECOUNTRY_LIST pCountryList,
  70. DWORD countryId
  71. );
  72. //
  73. // Assemble a canonical phone number given the following:
  74. // country code, area code, and phone number
  75. //
  76. VOID
  77. AssemblePhoneNumber(
  78. OUT LPTSTR pAddress,
  79. IN UINT cchAddress,
  80. IN DWORD countryCode,
  81. IN LPTSTR pAreaCode,
  82. IN LPTSTR pPhoneNumber
  83. );
  84. //
  85. // bring country id from the country code
  86. //
  87. DWORD
  88. GetCountryIdFromCountryCode(
  89. PFAX_TAPI_LINECOUNTRY_LIST pCountryList,
  90. DWORD dwCountryCode
  91. );
  92. BOOL
  93. DoTapiProps(
  94. HWND hDlg
  95. );
  96. BOOL
  97. SetCurrentLocation(
  98. DWORD locationID
  99. );
  100. LPLINETRANSLATECAPS
  101. GetTapiLocationInfo(
  102. HWND hWnd
  103. );
  104. void
  105. ShutdownTapi ();
  106. BOOL
  107. InitTapi ();
  108. BOOL
  109. TranslateAddress (
  110. LPCTSTR lpctstrCanonicalAddress,
  111. DWORD dwLocationId,
  112. LPTSTR *lpptstrDialableAndDisplayableAddress
  113. );
  114. #endif // !_TAPIUTIL_H_