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.

125 lines
4.9 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. faxsecinfo.h
  5. Abstract:
  6. This header is the ISecurityInformation implmentation used to instantiate a
  7. security page.
  8. Environment:
  9. WIN32 User Mode
  10. Author:
  11. Darwin Ouyang (t-darouy) 30-Sept-1997
  12. --*/
  13. // FaxSnapin.h : Declaration of the CFaxSnapinAbout
  14. #ifndef __FAX_SECURITY_INFO_H_
  15. #define __FAX_SECURITY_INFO_H_
  16. #include "resource.h" // main symbols
  17. #include "faxadmin.h"
  18. #include <aclui.h> // ACL UI editor
  19. class CInternalNode; // forward decl
  20. class CFaxComponentData;
  21. class ATL_NO_VTABLE CFaxSecurityInformation :
  22. public CComObjectRootEx<CComSingleThreadModel>,
  23. public CComCoClass<CFaxSecurityInformation, &CLSID_FaxSecurityInformation>,
  24. public ISecurityInformation {
  25. public:
  26. CFaxSecurityInformation::CFaxSecurityInformation();
  27. CFaxSecurityInformation::~CFaxSecurityInformation();
  28. DECLARE_NOT_AGGREGATABLE(CFaxSecurityInformation)
  29. DECLARE_REGISTRY_RESOURCEID(IDR_FAXSNAPIN)
  30. BEGIN_COM_MAP(CFaxSecurityInformation)
  31. COM_INTERFACE_ENTRY(ISecurityInformation)
  32. END_COM_MAP()
  33. public:
  34. // *** ISecurityInformation methods ***
  35. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetObjectInformation(
  36. OUT PSI_OBJECT_INFO pObjectInfo );
  37. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSecurity(
  38. IN SECURITY_INFORMATION RequestedInformation,
  39. OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor,
  40. IN BOOL fDefault );
  41. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetSecurity(
  42. IN SECURITY_INFORMATION SecurityInformation,
  43. IN PSECURITY_DESCRIPTOR pSecurityDescriptor );
  44. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetAccessRights(
  45. IN const GUID* pguidObjectType,
  46. IN DWORD dwFlags, // SI_EDIT_AUDITS, SI_EDIT_PROPERTIES
  47. OUT PSI_ACCESS *ppAccess,
  48. OUT ULONG *pcAccesses,
  49. OUT ULONG *piDefaultAccess );
  50. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE MapGeneric(
  51. IN const GUID *pguidObjectType,
  52. IN UCHAR *pAceFlags,
  53. IN OUT ACCESS_MASK *pMask); /* ?? */
  54. // no need to impl these
  55. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetInheritTypes(
  56. OUT PSI_INHERIT_TYPE *ppInheritTypes,
  57. OUT ULONG *pcInheritTypes );
  58. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE PropertySheetPageCallback(
  59. IN HWND hwnd,
  60. IN UINT uMsg,
  61. IN SI_PAGE_TYPE uPage ); /* ?? */
  62. // internal methods
  63. HRESULT SetOwner( CInternalNode * toSet);
  64. HRESULT SetSecurityDescriptor( DWORD FaxDescriptorId );
  65. HRESULT MakeSelfRelativeCopy(
  66. PSECURITY_DESCRIPTOR psdOriginal,
  67. PSECURITY_DESCRIPTOR* ppsdNew
  68. );
  69. HRESULT MakeAbsoluteCopyFromRelative(
  70. PSECURITY_DESCRIPTOR psdOriginal,
  71. PSECURITY_DESCRIPTOR* ppsdNew
  72. );
  73. HRESULT DestroyAbsoluteDescriptor();
  74. public:
  75. CInternalNode * m_pOwner; // my owning node
  76. CFaxComponentData * m_pCompData; // owning IComponentData
  77. PSECURITY_DESCRIPTOR m_pDescriptor; // my security descriptor
  78. PSECURITY_DESCRIPTOR m_pAbsoluteDescriptor; // absolute format descriptor
  79. DWORD m_dwDescID; // descriptor ID
  80. // used to track components of the absolute descriptor
  81. PACL m_pDacl;
  82. PACL m_pSacl;
  83. PSID m_pDescOwner;
  84. PSID m_pPrimaryGroup;
  85. };
  86. #endif //__FAX_SECURITY_INFO_H_