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.

123 lines
3.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: I S D N C F G . H
  7. //
  8. // Contents: ISDN Wizard/PropertySheet configuration structures
  9. //
  10. // Notes:
  11. //
  12. // Author: jeffspr 14 Jun 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include "ncsetup.h"
  17. #include <ras.h>
  18. // ISDN Switch type flags
  19. const DWORD ISDN_SWITCH_NONE = 0x00000000;
  20. const DWORD ISDN_SWITCH_AUTO = 0x00000001;
  21. const DWORD ISDN_SWITCH_ATT = 0x00000002;
  22. const DWORD ISDN_SWITCH_NI1 = 0x00000004;
  23. const DWORD ISDN_SWITCH_NTI = 0x00000008;
  24. const DWORD ISDN_SWITCH_INS64 = 0x00000010;
  25. const DWORD ISDN_SWITCH_1TR6 = 0x00000020;
  26. const DWORD ISDN_SWITCH_VN3 = 0x00000040;
  27. const DWORD ISDN_SWITCH_NET3 = 0x00000080; // retained for backward compatibility
  28. const DWORD ISDN_SWITCH_DSS1 = 0x00000080;
  29. const DWORD ISDN_SWITCH_AUS = 0x00000100;
  30. const DWORD ISDN_SWITCH_BEL = 0x00000200;
  31. const DWORD ISDN_SWITCH_VN4 = 0x00000400;
  32. const DWORD ISDN_SWITCH_NI2 = 0x00000800;
  33. const DWORD ISDN_SWITCH_SWE = 0x00001000;
  34. const DWORD ISDN_SWITCH_ITA = 0x00002000;
  35. const DWORD ISDN_SWITCH_TWN = 0x00004000;
  36. //---[ Structures for ISDN Config info ]--------------------------------------
  37. // Configuration structure for an ISDN B Channel
  38. //
  39. struct _ISDNBChannel
  40. {
  41. WCHAR szSpid[RAS_MaxPhoneNumber + 1];
  42. WCHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
  43. WCHAR szSubaddress[RAS_MaxPhoneNumber + 1];
  44. };
  45. typedef struct _ISDNBChannel ISDN_B_CHANNEL;
  46. typedef struct _ISDNBChannel * PISDN_B_CHANNEL;
  47. // Configuration structure for an ISDN D Channel. Can contain multiple
  48. // B Channel structures
  49. //
  50. struct _ISDNDChannel
  51. {
  52. DWORD dwNumBChannels;
  53. PWSTR mszMsnNumbers;
  54. PISDN_B_CHANNEL pBChannel;
  55. };
  56. typedef struct _ISDNDChannel ISDN_D_CHANNEL;
  57. typedef struct _ISDNDChannel * PISDN_D_CHANNEL;
  58. // Overall configuration for an ISDN adapter. Can contain multiple
  59. // D Channel structures
  60. //
  61. struct _ISDNConfigInfo
  62. {
  63. DWORD dwWanEndpoints;
  64. DWORD dwNumDChannels;
  65. DWORD dwSwitchTypes;
  66. DWORD dwCurSwitchType;
  67. INT nOldDChannel;
  68. INT nOldBChannel;
  69. BOOL fIsPri; // TRUE if this is a PRI adapter
  70. BOOL fSkipToEnd; // TRUE if we should skip the rest
  71. // of the wizard pages
  72. UINT idd; // Dialog resource ID of wizard page
  73. // we used
  74. PISDN_D_CHANNEL pDChannel;
  75. HDEVINFO hdi;
  76. PSP_DEVINFO_DATA pdeid;
  77. };
  78. typedef struct _ISDNConfigInfo ISDN_CONFIG_INFO;
  79. typedef struct _ISDNConfigInfo * PISDN_CONFIG_INFO;
  80. //---[ Prototypes ]-----------------------------------------------------------
  81. // Read the ISDN registry structure into the config info
  82. //
  83. HRESULT
  84. HrReadIsdnPropertiesInfo(HKEY hkeyISDNBase, HDEVINFO hdi,
  85. PSP_DEVINFO_DATA pdeid,
  86. PISDN_CONFIG_INFO * ppISDNConfig);
  87. // Write the ISDN config info back into the registry
  88. //
  89. HRESULT
  90. HrWriteIsdnPropertiesInfo(HKEY hkeyISDNBase,
  91. PISDN_CONFIG_INFO pISDNConfig);
  92. // Free the structure allocated by HrReadISDNPropertiesInfo
  93. //
  94. VOID
  95. FreeIsdnPropertiesInfo( PISDN_CONFIG_INFO pISDNConfig);
  96. BOOL
  97. FAdapterIsIsdn(HKEY hkeyDriver);
  98. BOOL
  99. FShowIsdnPages(HKEY hkey);
  100. // Set the next, back and cancel buttons depending if we are in GUI setup mode or stand-alone
  101. //
  102. VOID
  103. SetWizardButtons(HWND hWnd, BOOLEAN bFirstPage, PISDN_CONFIG_INFO pISDNConfig);
  104. const DWORD c_cchMaxDChannelName = 3;