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.

94 lines
4.5 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : SecurityInfo.cpp //
  3. // //
  4. // DESCRIPTION : The header file of the ISecurityInformation interface //
  5. // used to instantiate a security page. //
  6. // //
  7. // AUTHOR : yossg //
  8. // // //
  9. // HISTORY : //
  10. // Feb 7 2000 yossg Create //
  11. // //
  12. // Copyright (C) 2000 Microsoft Corporation All Rights Reserved //
  13. /////////////////////////////////////////////////////////////////////////////
  14. #ifndef __FAX_SECURITY_INFO_H_
  15. #define __FAX_SECURITY_INFO_H_
  16. //#include <atlcom.h>
  17. #include "MsFxsSnp.h"
  18. #include <aclui.h> // ACL UI editor
  19. class CFaxServerNode; // forward decl
  20. class ATL_NO_VTABLE CFaxSecurityInformation :
  21. public CComObjectRootEx<CComSingleThreadModel>,
  22. //public CComCoClass<CFaxSecurityInformation, &CLSID_FaxSecurityInformation>,
  23. public ISecurityInformation
  24. {
  25. public:
  26. CFaxSecurityInformation::CFaxSecurityInformation();
  27. CFaxSecurityInformation::~CFaxSecurityInformation();
  28. void Init(CFaxServerNode * pFaxServerNode)
  29. {
  30. ATLASSERT(pFaxServerNode);
  31. m_pFaxServerNode = pFaxServerNode;
  32. }
  33. DECLARE_NOT_AGGREGATABLE(CFaxSecurityInformation)
  34. BEGIN_COM_MAP(CFaxSecurityInformation)
  35. //COM_INTERFACE_ENTRY(ISecurityInformation)
  36. COM_INTERFACE_ENTRY_IID(IID_ISecurityInformation,ISecurityInformation)
  37. END_COM_MAP()
  38. public:
  39. // *** ISecurityInformation methods ***
  40. virtual HRESULT STDMETHODCALLTYPE GetObjectInformation(
  41. OUT PSI_OBJECT_INFO pObjectInfo );
  42. virtual HRESULT STDMETHODCALLTYPE GetSecurity(
  43. IN SECURITY_INFORMATION RequestedInformation,
  44. OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor,
  45. IN BOOL fDefault );
  46. virtual HRESULT STDMETHODCALLTYPE SetSecurity(
  47. IN SECURITY_INFORMATION SecurityInformation,
  48. IN PSECURITY_DESCRIPTOR pSecurityDescriptor );
  49. virtual HRESULT STDMETHODCALLTYPE GetAccessRights(
  50. IN const GUID* pguidObjectType,
  51. IN DWORD dwFlags, // SI_EDIT_AUDITS, SI_EDIT_PROPERTIES
  52. OUT PSI_ACCESS *ppAccess,
  53. OUT ULONG *pcAccesses,
  54. OUT ULONG *piDefaultAccess );
  55. virtual HRESULT STDMETHODCALLTYPE MapGeneric(
  56. IN const GUID *pguidObjectType,
  57. IN UCHAR *pAceFlags,
  58. IN OUT ACCESS_MASK *pMask);
  59. virtual HRESULT STDMETHODCALLTYPE PropertySheetPageCallback(
  60. IN HWND hwnd,
  61. IN UINT uMsg,
  62. IN SI_PAGE_TYPE uPage );
  63. // no need to implement
  64. virtual HRESULT STDMETHODCALLTYPE GetInheritTypes(
  65. OUT PSI_INHERIT_TYPE *ppInheritTypes,
  66. OUT ULONG *pcInheritTypes );
  67. // internal methods
  68. HRESULT MakeSelfRelativeCopy(
  69. PSECURITY_DESCRIPTOR psdOriginal,
  70. PSECURITY_DESCRIPTOR* ppsdNew
  71. );
  72. private:
  73. CFaxServerNode * m_pFaxServerNode;
  74. CComBSTR m_bstrServerName; // Computer on which to look up account names and SIDs.
  75. CComBSTR m_bstrObjectName; // This name appears in the title of the advanced security property sheet.
  76. };
  77. #endif //__FAX_SECURITY_INFO_H_