Source code of Windows XP (NT5)
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.

128 lines
2.1 KiB

  1. #ifndef INET_CONFIG_DATA_H
  2. #define INET_CONFIG_DATA_H
  3. class CPortConfigData {
  4. public:
  5. CPortConfigData ();
  6. CPortConfigData (
  7. LPCTSTR pUserName,
  8. LPCTSTR pPassword);
  9. ~CPortConfigData ();
  10. inline BOOL
  11. bValid (VOID) CONST {
  12. return m_bValid;
  13. }
  14. inline DWORD
  15. GetAuthMethod () CONST {
  16. return m_dwAuthMethod;
  17. }
  18. inline BOOL
  19. GetIgnoreSecurityDlg () CONST {
  20. return m_bIgnoreSecurityDlg;
  21. }
  22. inline LPCTSTR
  23. GetUserName () CONST {
  24. return m_pUserName;
  25. };
  26. inline LPCTSTR
  27. GetPassword () CONST {
  28. return m_pPassword;
  29. }
  30. BOOL
  31. SetAuthMethod (
  32. DWORD dwAuthMethod);
  33. BOOL
  34. SetUserName (
  35. LPCTSTR pUserName);
  36. BOOL
  37. SetPassword (
  38. LPCTSTR pPassword);
  39. BOOL
  40. SetIgnoreSecurityDlg (
  41. BOOL bIgnoreSecurityDlg) {
  42. m_bIgnoreSecurityDlg = bIgnoreSecurityDlg;
  43. return TRUE;
  44. }
  45. private:
  46. BOOL m_bValid;
  47. LPTSTR m_pUserName;
  48. LPTSTR m_pPassword;
  49. DWORD m_dwAuthMethod;
  50. BOOL m_bIgnoreSecurityDlg;
  51. };
  52. class CPortConfigDataMgr {
  53. public:
  54. CPortConfigDataMgr (LPCTSTR pszPortName);
  55. ~CPortConfigDataMgr ();
  56. BOOL bValid (VOID) CONST {
  57. return m_bValid;
  58. };
  59. BOOL
  60. SetPerUserSettings (
  61. CPortConfigData &ConfigData);
  62. BOOL
  63. SetPerPortSettings (
  64. CPortConfigData &ConfigData);
  65. BOOL
  66. GetPerPortSettings (
  67. CPortConfigData* pConfigData) CONST;
  68. BOOL
  69. GetPerUserSettings (
  70. CPortConfigData* pConfigData) CONST;
  71. BOOL
  72. GetCurrentSettings (
  73. CPortConfigData* pConfigData) CONST;
  74. BOOL
  75. DeleteAllSettings (
  76. VOID);
  77. private:
  78. BOOL
  79. SetPortSettings (
  80. HKEY hkPath,
  81. CPortConfigData &ConfigData);
  82. BOOL
  83. GetPortSettings (
  84. HKEY hkPath,
  85. CPortConfigData* pConfigData) CONST;
  86. BOOL
  87. DeletePerPortSettings (
  88. VOID);
  89. BOOL
  90. DeletePerUserSettings (
  91. LPTSTR pUser);
  92. BOOL
  93. DeleteSettings (
  94. HKEY hkPath);
  95. BOOL m_bValid;
  96. LPTSTR m_pszPortName;
  97. };
  98. #endif