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.

101 lines
3.1 KiB

  1. // audit.h: interface for the CAuditSettings class.
  2. //
  3. // Copyright (c)1997-1999 Microsoft Corporation
  4. //
  5. //////////////////////////////////////////////////////////////////////
  6. #if !defined(AFX_AUDIT_H__BD7570F7_9F0E_4C6B_B525_E078691B6D0E__INCLUDED_)
  7. #define AFX_AUDIT_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. CAuditSettings stands for Audit Policy.
  16. Base class:
  17. CGenericClass, because it is a class representing a WMI
  18. object - its WMI class name is Sce_AuditPolicy
  19. Purpose of class:
  20. (1) implement support for our WMI class Sce_AuditPolicy.
  21. Design:
  22. (1) it implements all pure virtual functions declared in CGenericClass
  23. so that it is a concrete class to create.
  24. (2) Since it has virtual functions, the desctructor should be virtual.
  25. Use:
  26. (1) We probably will never directly use this class. All its use is driven by
  27. CGenericClass's interface (its virtual functions).
  28. */
  29. class CAuditSettings : public CGenericClass
  30. {
  31. public:
  32. CAuditSettings(
  33. ISceKeyChain *pKeyChain,
  34. IWbemServices *pNamespace,
  35. IWbemContext *pCtx = NULL
  36. );
  37. virtual ~CAuditSettings();
  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. HRESULT ConstructInstance(
  49. IWbemObjectSink *pHandler,
  50. CSceStore* pSceStore,
  51. LPWSTR wszLogStorePath,
  52. LPCWSTR wszCategory,
  53. BOOL bPostFilter
  54. );
  55. HRESULT DeleteInstance(
  56. IWbemObjectSink *pHandler,
  57. CSceStore* pSceStore,
  58. LPCWSTR wszCategory
  59. );
  60. HRESULT ValidateCategory(
  61. LPCWSTR wszCategory,
  62. PSCE_PROFILE_INFO pInfo,
  63. DWORD **pReturn
  64. );
  65. HRESULT PutDataInstance(
  66. IWbemObjectSink *pHandler,
  67. PWSTR wszStoreName,
  68. PCWSTR wszCategory,
  69. DWORD dwValue,
  70. BOOL bPostFilter
  71. );
  72. };
  73. #endif // !defined(AFX_AUDIT_H__BD7570F7_9F0E_4C6B_B525_E078691B6D0E__INCLUDED_)