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.

132 lines
3.8 KiB

  1. // cacls.h: interface for the CADsAccessControlEntry class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_CACLS_H__11DBDB41_BC2B_11D0_B1D8_00C04FD702AD__INCLUDED_)
  5. #define AFX_CACLS_H__11DBDB41_BC2B_11D0_B1D8_00C04FD702AD__INCLUDED_
  6. #if _MSC_VER >= 1000
  7. #if (!defined(BUILD_FOR_NT40))
  8. #pragma once
  9. #endif
  10. #endif // _MSC_VER >= 1000
  11. typedef enum _tagACLTYPE
  12. {
  13. acl_Invalid = 0,
  14. acl_DACL,
  15. acl_SACL,
  16. acl_Limit
  17. } ACLTYPE;
  18. class CADsAccessControlEntry : public COleDsObject
  19. {
  20. public:
  21. CADsAccessControlEntry ( void );
  22. CADsAccessControlEntry ( IUnknown* );
  23. ~CADsAccessControlEntry ( void );
  24. public:
  25. void FooFunction(void);
  26. IDispatch* GetACE ( void );
  27. IDispatch* CreateACE ( void );
  28. HRESULT PutProperty ( int,
  29. CString&,
  30. long Code = ADS_PROPERTY_UPDATE );
  31. HRESULT GetProperty ( int,
  32. CString& );
  33. private:
  34. void InitializeMembers( void );
  35. };
  36. class CADsAccessControlList : public COleDsObject
  37. {
  38. public:
  39. CADsAccessControlList ( void );
  40. CADsAccessControlList ( IUnknown* );
  41. ~CADsAccessControlList ( void );
  42. public:
  43. IDispatch* GetACL ( void );
  44. IDispatch* CreateACL ( void );
  45. void SetDocument ( CMainDoc* );
  46. int GetACECount ( void );
  47. CADsAccessControlEntry* GetACEObject( int nACE );
  48. HRESULT AddACE ( IUnknown* pNewACE );
  49. HRESULT RemoveACE ( IUnknown* pRemoveACE );
  50. void RemoveAllACE( void );
  51. HRESULT PutProperty ( int,
  52. int,
  53. CString&,
  54. long Code = ADS_PROPERTY_UPDATE );
  55. HRESULT GetProperty ( int,
  56. int,
  57. CString& );
  58. private:
  59. void InitializeMembers ( void );
  60. private:
  61. CObArray m_arrACE;
  62. };
  63. class CADsSecurityDescriptor : public COleDsObject
  64. {
  65. public:
  66. CADsSecurityDescriptor();
  67. CADsSecurityDescriptor( IUnknown* );
  68. virtual ~CADsSecurityDescriptor();
  69. public:
  70. HRESULT PutProperty ( int,
  71. CString&,
  72. long Code = ADS_PROPERTY_UPDATE );
  73. HRESULT GetProperty ( int,
  74. CString& );
  75. HRESULT PutProperty ( ACLTYPE,
  76. int,
  77. int,
  78. CString&,
  79. long Code = ADS_PROPERTY_UPDATE );
  80. HRESULT GetProperty ( ACLTYPE,
  81. int,
  82. int,
  83. CString& );
  84. HRESULT PutACL ( IDispatch* pACL,
  85. ACLTYPE eACL );
  86. IDispatch* GetACL ( ACLTYPE eACL );
  87. CADsAccessControlList* GetACLObject( ACLTYPE eACL );
  88. HRESULT AddACE ( ACLTYPE eACL, IUnknown* pNewACE );
  89. HRESULT RemoveACE ( ACLTYPE eACL, IUnknown* pNewACE );
  90. void RemoveAllACE( ACLTYPE eACL );
  91. int GetACECount ( ACLTYPE eACL );
  92. void SetDocument ( CMainDoc* );
  93. private:
  94. void InitializeMembers ( );
  95. private:
  96. COleDsObject* pACLObj[ acl_Limit ];
  97. };
  98. #endif // !defined(AFX_CACLS_H__11DBDB41_BC2B_11D0_B1D8_00C04FD702AD__INCLUDED_)