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.

95 lines
2.1 KiB

  1. //*************************************************************
  2. //
  3. // Copyright (c) Microsoft Corporation 1999 - 2000
  4. // All rights reserved
  5. //
  6. // pollog.hxx
  7. //
  8. // Contains declarations for classes related to the
  9. // policy log abstraction
  10. //
  11. // Created: 7-15-1999 adamed
  12. //
  13. //*************************************************************/
  14. #if !defined (_POLLOG_HXX_)
  15. #define _POLLOG_HXX_
  16. class CPolicyLog
  17. {
  18. public:
  19. CPolicyLog();
  20. virtual ~CPolicyLog(){};
  21. HRESULT
  22. InitLog(
  23. CRsopContext* pRsopContext,
  24. WCHAR* wszPolicyType);
  25. void UninitLog();
  26. HRESULT
  27. GetNextRecord(CPolicyRecord* pRecord);
  28. HRESULT
  29. OpenExistingRecord( CPolicyRecord* pRecord );
  30. HRESULT
  31. WriteNewRecord(CPolicyRecord* pRecord);
  32. HRESULT
  33. AddBlankRecord(CPolicyRecord* pRecord);
  34. HRESULT
  35. CommitRecord(CPolicyRecord* pRecord);
  36. HRESULT
  37. DeleteRecord(
  38. CPolicyRecord* pRecord,
  39. BOOL bDeleteStatus = FALSE);
  40. HRESULT
  41. DeleteStatusRecords( CPolicyRecord* pRecord );
  42. HRESULT ClearLog(
  43. WCHAR* wszSpecifiedCriteria = NULL,
  44. BOOL bDeleteStatus = FALSE);
  45. protected:
  46. CRsopContext* _pRsopContext; // context into which we're logging
  47. HRESULT GetEnum( WCHAR* wszCriteria = NULL );
  48. void FreeEnum();
  49. private:
  50. HRESULT GetRecordCreator(
  51. XBStr* pxstrClass,
  52. IWbemClassObject** ppClass);
  53. WCHAR* _wszClass; // string indicating class name as defined
  54. // by the schema
  55. XInterface<IEnumWbemClassObject> _xEnum; // interface that allows record enumeration
  56. XInterface<IWbemServices> _xWbemServices; // interface to namespace in which we will log
  57. XInterface<IWbemClassObject> _xRecordCreator; // interface that allows creation of records
  58. // of the class logged by this object
  59. };
  60. #endif // _POLLOG_HXX_