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.

129 lines
4.3 KiB

  1. // object.h: interface for the CObjSecurity class.
  2. //
  3. // Copyright (c)1997-1999 Microsoft Corporation
  4. //
  5. //////////////////////////////////////////////////////////////////////
  6. #if !defined(AFX_OBJECT_H__BD7570F7_9F0E_4C6B_B525_E078691B6D0E__INCLUDED_)
  7. #define AFX_OBJECT_H__BD7570F7_9F0E_4C6B_B525_E078691B6D0E__INCLUDED_
  8. #if _MSC_VER >= 1000
  9. #pragma once
  10. #endif // _MSC_VER >= 1000
  11. #include "GenericClass.h"
  12. /*
  13. Class description
  14. Naming:
  15. CObjSecurity stands for Object Security.
  16. Base class:
  17. CGenericClass, because it is a class representing two WMI
  18. objects - WMI class names are Sce_FileObject and Sce_KeyObject
  19. Purpose of class:
  20. (1) Implement Sce_FileObject and Sce_KeyObject WMI classes. The difference between
  21. these two classes are obviously reflected by m_Type member.
  22. Design:
  23. (1) Almost trivial other than implementing necessary method as a concrete class
  24. Use:
  25. (1) Almost never used directly. Always through the common interface defined by
  26. CGenericClass.
  27. */
  28. class CObjSecurity : public CGenericClass
  29. {
  30. public:
  31. CObjSecurity (
  32. ISceKeyChain *pKeyChain,
  33. IWbemServices *pNamespace,
  34. int type,
  35. IWbemContext *pCtx = NULL
  36. );
  37. virtual ~CObjSecurity ();
  38. virtual HRESULT PutInst (
  39. IWbemClassObject *pInst,
  40. IWbemObjectSink *pHandler,
  41. IWbemContext *pCtx
  42. );
  43. virtual HRESULT CreateObject (
  44. IWbemObjectSink *pHandler,
  45. ACTIONTYPE atAction
  46. );
  47. private:
  48. int m_Type;
  49. HRESULT ConstructInstance (
  50. IWbemObjectSink *pHandler,
  51. CSceStore* pSceStore,
  52. LPCWSTR wszLogStorePath,
  53. int ObjType,
  54. LPCWSTR wszObjName,
  55. BOOL bPostFilter
  56. );
  57. HRESULT ConstructQueryInstances (
  58. IWbemObjectSink *pHandler,
  59. CSceStore* pSceStore,
  60. LPCWSTR wszLogStorePath,
  61. int ObjType,
  62. BOOL bPostFilter
  63. );
  64. HRESULT DeleteInstance (
  65. IWbemObjectSink *pHandler,
  66. CSceStore* pSceStore,
  67. int ObjType,
  68. LPCWSTR wszObjName
  69. );
  70. HRESULT SaveSettingsToStore (
  71. CSceStore* pSceStore,
  72. int ObjType,
  73. LPCWSTR wszObjName,
  74. DWORD mode,
  75. LPCWSTR wszSDDL
  76. );
  77. HRESULT PutDataInstance (
  78. IWbemObjectSink *pHandler,
  79. LPCWSTR wszStoreName,
  80. int ObjType,
  81. LPCWSTR wszObjName,
  82. int mode,
  83. PSECURITY_DESCRIPTOR pSD,
  84. SECURITY_INFORMATION SeInfo,
  85. BOOL bPostFilter
  86. );
  87. HRESULT PutDataInstance (
  88. IWbemObjectSink *pHandler,
  89. LPCWSTR wszStoreName,
  90. int ObjType,
  91. LPCWSTR wszObjName,
  92. int mode,
  93. LPCWSTR strSD,
  94. BOOL bPostFilter
  95. );
  96. };
  97. #endif // !defined(AFX_OBJECT_H__BD7570F7_9F0E_4C6B_B525_E078691B6D0E__INCLUDED_)