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.

260 lines
8.3 KiB

  1. /* Copyright (c) 1995, Microsoft Corporation, all rights reserved
  2. **
  3. ** pbuser.h
  4. ** Remote Access phonebook user preference library
  5. ** Public header
  6. **
  7. ** 06/20/95 Steve Cobb
  8. */
  9. #ifndef _PBUSER_H_
  10. #define _PBUSER_H_
  11. /*----------------------------------------------------------------------------
  12. ** Constants
  13. **----------------------------------------------------------------------------
  14. */
  15. /* User preference modes
  16. */
  17. #define UPM_Normal 0
  18. #define UPM_Logon 1
  19. #define UPM_Router 2
  20. /* User preference key and values.
  21. */
  22. #define REGKEY_HkcuOldRas TEXT("Software\\Microsoft\\Windows NT\\CurrentVersion\\Network\\RemoteAccess")
  23. #define REGKEY_HkcuOldRasParent TEXT("Software\\Microsoft\\Windows NT\\CurrentVersion\\Network")
  24. #define REGKEY_HkcuOldRasRoot TEXT("RemoteAccess")
  25. #define REGKEY_HkuOldRasLogon TEXT(".DEFAULT\\Software\\Microsoft\\RAS Phonebook")
  26. #define REGKEY_HkcuRas TEXT("Software\\Microsoft\\RAS Phonebook")
  27. #define REGKEY_HkuRasLogon TEXT(".DEFAULT\\Software\\Microsoft\\RAS Logon Phonebook")
  28. #define REGKEY_HklmRouter TEXT("Software\\Microsoft\\Router Phonebook")
  29. #define REGKEY_Callback TEXT("Callback")
  30. #define REGKEY_Location TEXT("Location")
  31. #define REGVAL_szNumber TEXT("Number")
  32. #define REGVAL_dwDeviceType TEXT("DeviceType")
  33. #define REGVAL_dwPhonebookMode TEXT("PhonebookMode")
  34. #define REGVAL_szUsePersonalPhonebook TEXT("UsePersonalPhonebook")
  35. #define REGVAL_szPersonalPhonebookPath TEXT("PersonalPhonebookPath")
  36. #define REGVAL_szPersonalPhonebookFile TEXT("PersonalPhonebookFile")
  37. #define REGVAL_szAlternatePhonebookPath TEXT("AlternatePhonebookPath")
  38. #define REGVAL_fOperatorDial TEXT("OperatorDial")
  39. #define REGVAL_fPreviewPhoneNumber TEXT("PreviewPhoneNumber")
  40. #define REGVAL_fUseLocation TEXT("UseLocation")
  41. #define REGVAL_fShowLights TEXT("ShowLights")
  42. #define REGVAL_fShowConnectStatus TEXT("ShowConnectStatus")
  43. #define REGVAL_fNewEntryWizard TEXT("NewEntryWizard")
  44. #define REGVAL_dwRedialAttempts TEXT("RedialAttempts")
  45. #define REGVAL_dwRedialSeconds TEXT("RedialSeconds")
  46. #define REGVAL_dwIdleDisconnectSeconds TEXT("IdleHangUpSeconds")
  47. #define REGVAL_dwCallbackMode TEXT("CallbackMode")
  48. #define REGVAL_mszPhonebooks TEXT("Phonebooks")
  49. #define REGVAL_mszAreaCodes TEXT("AreaCodes")
  50. #define REGVAL_mszPrefixes TEXT("Prefixes")
  51. #define REGVAL_mszSuffixes TEXT("Suffixes")
  52. #define REGVAL_szLastCallbackByCaller TEXT("LastCallbackByCaller")
  53. #define REGVAL_dwPrefix TEXT("Prefix")
  54. #define REGVAL_dwSuffix TEXT("Suffix")
  55. #define REGVAL_dwXWindow TEXT("WindowX")
  56. #define REGVAL_dwYWindow TEXT("WindowY")
  57. #define REGVAL_szDefaultEntry TEXT("DefaultEntry")
  58. #define REGVAL_fCloseOnDial TEXT("CloseOnDial")
  59. #define REGVAL_fAllowLogonPhonebookEdits TEXT("AllowLogonPhonebookEdits")
  60. #define REGVAL_fAllowLogonLocationEdits TEXT("AllowLogonLocationEdits")
  61. #define REGVAL_fUseAreaAndCountry TEXT("UseAreaAndCountry")
  62. #define REGVAL_dwMode TEXT("Mode")
  63. #define REGVAL_dwFlags TEXT("Flags")
  64. #define REGVAL_dwX TEXT("x")
  65. #define REGVAL_dwY TEXT("y")
  66. #define REGVAL_dwCx TEXT("cx")
  67. #define REGVAL_dwCy TEXT("cy")
  68. #define REGVAL_dwCxCol1 TEXT("cxCol1")
  69. #define REGVAL_dwStartPage TEXT("StartPage")
  70. #define REGVAL_dwXDlg TEXT("xDlg")
  71. #define REGVAL_dwYDlg TEXT("yDlg")
  72. #define REGVAL_dwCxDlgCol1 TEXT("cxDlgCol1")
  73. #define REGVAL_dwCxDlgCol2 TEXT("cxDlgCol2")
  74. #define REGVAL_szLastDevice TEXT("LastDevice")
  75. #define REGVAL_mszDeviceList TEXT("DeviceList")
  76. #define REGVAL_fSkipConnectComplete TEXT("SkipConnectComplete")
  77. #define REGVAL_fRedialOnLinkFailure TEXT("RedialOnLinkFailure")
  78. #define REGVAL_fExpandAutoDialQuery TEXT("ExpandAutoDialQuery")
  79. #define REGVAL_fPopupOnTopWhenRedialing TEXT("PopupOnTopWhenRedialing")
  80. #define REGVAL_dwVersion TEXT("Version")
  81. /* Callback modes (see dwCallbackMode below).
  82. */
  83. #define CBM_No 0
  84. #define CBM_Maybe 1
  85. #define CBM_Yes 2
  86. /* Phonebook modes (see dwPhonebookMode below).
  87. */
  88. #define PBM_System 0
  89. #define PBM_Personal 1
  90. #define PBM_Alternate 2
  91. #define PBM_Router 3
  92. /*----------------------------------------------------------------------------
  93. ** Datatypes
  94. **----------------------------------------------------------------------------
  95. */
  96. /* Information about a callback number. See 'PBUSER.pdtllistCallback'. Note
  97. ** that 'dwDeviceType' is a PBK PBDEVICETYPE enumeration cast to a DWORD.
  98. */
  99. #define CALLBACKINFO struct tagCALLBACKINFO
  100. CALLBACKINFO
  101. {
  102. TCHAR* pszPortName;
  103. TCHAR* pszDeviceName;
  104. TCHAR* pszNumber;
  105. DWORD dwDeviceType;
  106. };
  107. /* Information associated with a TAPI location number.
  108. */
  109. #define LOCATIONINFO struct tagLOCATIONINFO
  110. LOCATIONINFO
  111. {
  112. DWORD dwLocationId;
  113. DWORD iPrefix;
  114. DWORD iSuffix;
  115. };
  116. /* User preference information read from the "CURRENT_USER" registry. This
  117. ** information applies to all "normal" user phonebooks plus the system
  118. ** phonebook. The router phonebook may work differently.
  119. */
  120. #define PBUSER struct tagPBUSER
  121. PBUSER
  122. {
  123. /* Appearance page.
  124. */
  125. BOOL fOperatorDial;
  126. BOOL fPreviewPhoneNumber;
  127. BOOL fUseLocation;
  128. BOOL fShowLights;
  129. BOOL fShowConnectStatus;
  130. BOOL fCloseOnDial;
  131. BOOL fAllowLogonPhonebookEdits;
  132. BOOL fAllowLogonLocationEdits;
  133. BOOL fSkipConnectComplete;
  134. BOOL fNewEntryWizard;
  135. /* Auto-dial page.
  136. */
  137. DWORD dwRedialAttempts;
  138. DWORD dwRedialSeconds;
  139. DWORD dwIdleDisconnectSeconds;
  140. BOOL fRedialOnLinkFailure;
  141. BOOL fPopupOnTopWhenRedialing;
  142. BOOL fExpandAutoDialQuery;
  143. /* Callback page.
  144. **
  145. ** This list is of CALLBACKINFO.
  146. */
  147. DWORD dwCallbackMode;
  148. DTLLIST* pdtllistCallback;
  149. TCHAR* pszLastCallbackByCaller;
  150. /* Phone list page.
  151. */
  152. DWORD dwPhonebookMode;
  153. TCHAR* pszPersonalFile;
  154. TCHAR* pszAlternatePath;
  155. DTLLIST* pdtllistPhonebooks;
  156. /* Area code strings, in MRU order.
  157. */
  158. DTLLIST* pdtllistAreaCodes;
  159. BOOL fUseAreaAndCountry;
  160. /* Prefix/suffix information, i.e. the ordered string lists and the
  161. ** settings for a particular TAPI location.
  162. */
  163. DTLLIST* pdtllistPrefixes;
  164. DTLLIST* pdtllistSuffixes;
  165. DTLLIST* pdtllistLocations;
  166. /* Phonebook window position and last entry selected used by RASPHONE.EXE.
  167. */
  168. DWORD dwXPhonebook;
  169. DWORD dwYPhonebook;
  170. TCHAR* pszDefaultEntry;
  171. /* Set true if the structure has been initialized.
  172. */
  173. BOOL fInitialized;
  174. /* Set true if something's changed since the structure was read.
  175. */
  176. BOOL fDirty;
  177. };
  178. /*----------------------------------------------------------------------------
  179. ** Prototypes
  180. **----------------------------------------------------------------------------
  181. */
  182. DTLNODE*
  183. CreateLocationNode(
  184. IN DWORD dwLocationId,
  185. IN DWORD iPrefix,
  186. IN DWORD iSuffix );
  187. DTLNODE*
  188. CreateCallbackNode(
  189. IN TCHAR* pszPortName,
  190. IN TCHAR* pszDeviceName,
  191. IN TCHAR* pszNumber,
  192. IN DWORD dwDeviceType );
  193. VOID
  194. DestroyLocationNode(
  195. IN DTLNODE* pNode );
  196. VOID
  197. DestroyCallbackNode(
  198. IN DTLNODE* pNode );
  199. VOID
  200. DestroyUserPreferences(
  201. IN PBUSER* pUser );
  202. DTLNODE*
  203. DuplicateLocationNode(
  204. IN DTLNODE* pNode );
  205. DWORD
  206. GetUserPreferences(
  207. IN HANDLE hConnection,
  208. OUT PBUSER* pUser,
  209. IN DWORD dwMode );
  210. DWORD
  211. SetUserPreferences(
  212. IN HANDLE hConnection,
  213. IN PBUSER* pUser,
  214. IN DWORD dwMode );
  215. // These two are provided as an optimization.
  216. // They write directly to the registry.
  217. DWORD GetUserManualDialEnabling (
  218. IN OUT PBOOL pbEnabled,
  219. IN DWORD dwMode );
  220. DWORD SetUserManualDialEnabling (
  221. IN BOOL bEnable,
  222. IN DWORD dwMode );
  223. #endif // _PBUSER_H_