Source code of Windows XP (NT5)
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.

78 lines
2.4 KiB

  1. //=============================================================================
  2. //
  3. // Copyright (c) 1996-1999, Microsoft Corporation, All rights reserved
  4. //
  5. // STDTRIG.H
  6. //
  7. // This files defines the classes for event filters corresponding to standard
  8. // event filters the users will create
  9. //
  10. // Classes defined:
  11. //
  12. // CBuiltinEventFilter Base class for standard filters
  13. //
  14. // History:
  15. //
  16. // 11/27/96 a-levn Compiles
  17. //
  18. //=============================================================================
  19. #ifndef __BUILTIN_FILTER__H_
  20. #define __BUILTIN_FILTER__H_
  21. #include "eventrep.h"
  22. #include "binding.h"
  23. #include "aggreg.h"
  24. #include "filter.h"
  25. class CEssNamespace;
  26. class CPermanentFilter : public CGenericFilter
  27. {
  28. protected:
  29. CCompressedString* m_pcsQuery;
  30. CInternalString m_isEventNamespace;
  31. PSECURITY_DESCRIPTOR m_pEventAccessRelativeSD;
  32. SECURITY_DESCRIPTOR m_EventAccessAbsoluteSD;
  33. static long mstatic_lNameHandle;
  34. static long mstatic_lLanguageHandle;
  35. static long mstatic_lQueryHandle;
  36. static long mstatic_lEventNamespaceHandle;
  37. static long mstatic_lEventAccessHandle;
  38. static long mstatic_lSidHandle;
  39. static bool mstatic_bHandlesInitialized;
  40. static long mstatic_lGuardNamespaceHandle;
  41. static long mstatic_lGuardHandle;
  42. static HRESULT InitializeHandles(_IWmiObject* pObject);
  43. protected:
  44. static SYSFREE_ME BSTR GetBSTR(READ_ONLY IWbemClassObject* pObject,
  45. READ_ONLY LPWSTR wszName);
  46. HRESULT RetrieveQuery(DELETE_ME LPWSTR& wszQuery);
  47. public:
  48. CPermanentFilter(CEssNamespace* pNamespace);
  49. HRESULT Initialize(IWbemClassObject* pFilterObj);
  50. virtual ~CPermanentFilter();
  51. BOOL IsPermanent() {return TRUE;}
  52. virtual HRESULT SetThreadSecurity() {return S_OK;}
  53. HRESULT ObtainToken(IWbemToken** ppToken);
  54. virtual const PSECURITY_DESCRIPTOR GetEventAccessSD();
  55. virtual HRESULT GetCoveringQuery(DELETE_ME LPWSTR& wszQueryLanguage,
  56. DELETE_ME LPWSTR& wszQuery, BOOL& bExact,
  57. DELETE_ME QL_LEVEL_1_RPN_EXPRESSION** ppExp);
  58. virtual DWORD GetForceFlags() {return 0;}
  59. virtual HRESULT GetEventNamespace(DELETE_ME LPWSTR* pwszNamespace);
  60. static SYSFREE_ME BSTR ComputeKeyFromObj(IWbemClassObject* pFilterObj);
  61. static SYSFREE_ME BSTR ComputeKeyFromPath(LPCWSTR wszPath);
  62. static HRESULT CheckValidity( IWbemClassObject* pFilterObj);
  63. void Park();
  64. };
  65. #endif