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.

148 lines
3.4 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: simdata.h
  8. //
  9. //--------------------------------------------------------------------------
  10. /////////////////////////////////////////////////////////////////////
  11. // SimData.h - Security Identity Mapping
  12. //
  13. // Data object used to display SIM property pages
  14. //
  15. #ifndef __SIMDATA_H_INCLUDED__
  16. #define __SIMDATA_H_INCLUDED__
  17. #include "Cert.h"
  18. // Forward Classes
  19. class CSimData;
  20. class CSimPropPage;
  21. class CSimX509PropPage;
  22. class CSimKerberosPropPage;
  23. class CSimOtherPropPage;
  24. enum DIALOG_TARGET_ENUM
  25. {
  26. eNone, // No Property Page
  27. eX509, // X509 Property Page
  28. eKerberos, // Kerberos Property Page
  29. eOther, // Other Property Page
  30. eNil // String is invalid -> get rid of string
  31. };
  32. /////////////////////////////////////////////////////////////////////
  33. class CSimEntry // Security Identity Mapping Entry
  34. {
  35. public:
  36. // Which dialog should the SIM entry should go
  37. DIALOG_TARGET_ENUM m_eDialogTarget;
  38. CSimEntry * m_pNext;
  39. CString m_strData;
  40. CSimEntry()
  41. {
  42. m_eDialogTarget = eNone;
  43. m_pNext = NULL;
  44. }
  45. LPCTSTR PchGetString() const
  46. {
  47. return (LPCTSTR)m_strData;
  48. }
  49. void SetString(CString& rstrData);
  50. }; // CSimEntry
  51. /////////////////////////////////////////////////////////////////////
  52. class CSimData // Data object for Security Identity Mapping
  53. {
  54. friend CSimPropPage;
  55. friend CSimX509PropPage;
  56. friend CSimKerberosPropPage;
  57. friend CSimOtherPropPage;
  58. protected:
  59. BOOL m_fIsDirty;
  60. // Allocated property pages
  61. CSimX509PropPage * m_paPage1;
  62. CSimKerberosPropPage * m_paPage2;
  63. #ifdef _DEBUG
  64. CSimOtherPropPage * m_paPage3;
  65. #endif
  66. protected:
  67. CSimEntry * m_pSimEntryList; // Linked list of Kerberos Names to map to account
  68. CString m_strUserPath;
  69. CString m_strADsIPath;
  70. HWND m_hwndParent;
  71. public:
  72. CSimData();
  73. ~CSimData();
  74. void FlushSimList();
  75. BOOL FInit(CString strUserPath, CString strADsIPath, HWND hwndParent = NULL);
  76. void DoModal();
  77. BOOL FOnApply(HWND hwndParent = NULL);
  78. BOOL FQuerySimData();
  79. HRESULT FUpdateSimData();
  80. void GetUserAccountName(OUT CString * pstrName);
  81. CSimEntry * PAddSimEntry(CString& rstrData);
  82. void DeleteSimEntry(CSimEntry * pSimEntryDelete);
  83. void AddEntriesToListview(HWND hwndListview, DIALOG_TARGET_ENUM eDialogTarget);
  84. }; // CSimData
  85. #endif // ~__SIMDATA_H_INCLUDED__
  86. /////////////////////////////////////////////////////////////////////////////
  87. // CSimPropertySheet
  88. class CSimPropertySheet : public CPropertySheet
  89. {
  90. DECLARE_DYNAMIC(CSimPropertySheet)
  91. // Construction
  92. public:
  93. CSimPropertySheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
  94. CSimPropertySheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
  95. // Attributes
  96. public:
  97. // Operations
  98. public:
  99. // Overrides
  100. // ClassWizard generated virtual function overrides
  101. //{{AFX_VIRTUAL(CSimPropertySheet)
  102. public:
  103. virtual BOOL OnInitDialog();
  104. //}}AFX_VIRTUAL
  105. // Implementation
  106. public:
  107. virtual ~CSimPropertySheet();
  108. // Generated message map functions
  109. protected:
  110. //{{AFX_MSG(CSimPropertySheet)
  111. // NOTE - the ClassWizard will add and remove member functions here.
  112. //}}AFX_MSG
  113. DECLARE_MESSAGE_MAP()
  114. BOOL OnHelp(WPARAM wParam, LPARAM lParam);
  115. virtual void DoContextHelp (HWND hWndControl);
  116. };
  117. /////////////////////////////////////////////////////////////////////////////