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.

230 lines
7.1 KiB

  1. //***********************************************
  2. //
  3. // Resultant set of policy
  4. //
  5. // Microsoft Confidential
  6. // Copyright (c) Microsoft Corporation 1995
  7. // All rights reserved
  8. //
  9. // History: 7-Jun-99 SitaramR Created
  10. //
  11. //*************************************************************
  12. #include "..\rsoputil\smartptr.h"
  13. #include <initguid.h>
  14. class CSessionLogger
  15. {
  16. public:
  17. CSessionLogger( IWbemServices *pWbemServices );
  18. BOOL Log(LPRSOPSESSIONDATA lprsopSessionData );
  19. private:
  20. BOOL m_bInitialized;
  21. XBStr m_xbstrId;
  22. XBStr m_xbstrVersion;
  23. XBStr m_xbstrTargetName;
  24. XBStr m_xbstrSOM;
  25. XBStr m_xbstrSecurityGroups;
  26. XBStr m_xbstrSite;
  27. XBStr m_xbstrCreationTime;
  28. XBStr m_xbstrIsSlowLink;
  29. XBStr m_xbstrClass;
  30. XInterface<IWbemClassObject> m_xClass;
  31. IWbemServices * m_pWbemServices;
  32. };
  33. class CSOMLogger
  34. {
  35. public:
  36. CSOMLogger( DWORD dwFlags, IWbemServices *pWbemServices );
  37. BOOL Log( SCOPEOFMGMT *pSOM, DWORD dwOrder, BOOL bLoopback );
  38. private:
  39. BOOL m_bInitialized;
  40. DWORD m_dwFlags;
  41. XBStr m_xbstrId;
  42. XBStr m_xbstrType;
  43. XBStr m_xbstrOrder;
  44. XBStr m_xbstrBlocking;
  45. XBStr m_xbstrBlocked;
  46. XBStr m_xbstrReason;
  47. XBStr m_xbstrClass;
  48. XInterface<IWbemClassObject> m_xClass;
  49. XInterface<IWbemClassObject> m_pInstance;
  50. IWbemServices * m_pWbemServices;
  51. };
  52. class CGpoLogger
  53. {
  54. public:
  55. CGpoLogger( DWORD dwFlags, IWbemServices *pWbemServices );
  56. BOOL Log( GPCONTAINER *pGpContainer );
  57. private:
  58. BOOL m_bInitialized;
  59. DWORD m_dwFlags;
  60. XBStr m_xbstrId;
  61. XBStr m_xbstrGuidName;
  62. XBStr m_xbstrDisplayName;
  63. XBStr m_xbstrFileSysPath;
  64. XBStr m_xbstrVer;
  65. XBStr m_xbstrAccessDenied;
  66. XBStr m_xbstrEnabled;
  67. XBStr m_xbstrSD;
  68. XBStr m_xbstrFilterAllowed;
  69. XBStr m_xbstrFilterId;
  70. XBStr m_xbstrClass;
  71. XInterface<IWbemClassObject> m_xClass;
  72. XInterface<IWbemClassObject> m_pInstance;
  73. IWbemServices * m_pWbemServices;
  74. };
  75. class CGpLinkLogger
  76. {
  77. public:
  78. CGpLinkLogger( IWbemServices *pWbemServices );
  79. BOOL Log( WCHAR *pwszSOMId, BOOL bLoopback, GPLINK *pGpLink, DWORD dwSomOrder,
  80. DWORD dwLinkOrder, DWORD dwAppliedOrder );
  81. private:
  82. BOOL m_bInitialized;
  83. XBStr m_xbstrSOM;
  84. XBStr m_xbstrGPO;
  85. XBStr m_xbstrOrder;
  86. XBStr m_xbstrLinkOrder;
  87. XBStr m_xbstrAppliedOrder;
  88. XBStr m_xbstrEnabled;
  89. XBStr m_xbstrEnforced;
  90. XBStr m_xbstrClass;
  91. XInterface<IWbemClassObject> m_xClass;
  92. XInterface<IWbemClassObject> m_pInstance;
  93. IWbemServices * m_pWbemServices;
  94. };
  95. /*
  96. class CGpLinkListLogger
  97. {
  98. public:
  99. CGpLinkListLogger( DWORD dwFlags, IWbemServices *pWbemServices );
  100. BOOL Log( PGROUP_POLICY_OBJECT pGPO, DWORD dwSOMOrder, BOOL bLoopback, DWORD dwTypeOrder );
  101. private:
  102. BOOL m_bInitialized;
  103. DWORD m_dwFlags;
  104. XBStr m_xbstrGpLink;
  105. XBStr m_xbstrOrder;
  106. XBStr m_xbstrClass;
  107. XInterface<IWbemClassObject> m_xClass;
  108. XInterface<IWbemClassObject> m_pInstance;
  109. IWbemServices * m_pWbemServices;
  110. };
  111. */
  112. WCHAR *StripPrefix( WCHAR *pwszPath );
  113. WCHAR *StripLinkPrefix( WCHAR *pwszPath );
  114. class CRegistryLogger
  115. {
  116. public:
  117. CRegistryLogger( DWORD dwFlags, IWbemServices *pWbemServices );
  118. BOOL Log( WCHAR *pwszKeyName, WCHAR *pwszValueName,
  119. REGDATAENTRY *pDataEntry, DWORD dwOrder );
  120. private:
  121. BOOL m_bInitialized;
  122. DWORD m_dwFlags;
  123. XBStr m_xbstrClass;
  124. XInterface<IWbemClassObject> m_xClass;
  125. IWbemServices * m_pWbemServices;
  126. //
  127. // Strings for parent policy object
  128. //
  129. XBStr m_xbstrId;
  130. XBStr m_xbstrName;
  131. XBStr m_xbstrGPO;
  132. XBStr m_xbstrSOM;
  133. XBStr m_xbstrPrecedence;
  134. //
  135. // Strings for registry policy object
  136. //
  137. XBStr m_xbstrKey;
  138. XBStr m_xbstrValueName;
  139. XBStr m_xbstrDeleted;
  140. XBStr m_xbstrValueType;
  141. XBStr m_xbstrValue;
  142. XBStr m_xbstrCommand;
  143. };
  144. BOOL LogBlobProperty( IWbemClassObject *pInstance, BSTR bstrPropName, BYTE *pbBlob,
  145. DWORD dwLen );
  146. class CAdmFileLogger
  147. {
  148. public:
  149. CAdmFileLogger( IWbemServices *pWbemServices );
  150. BOOL Log( ADMFILEINFO *pAdmInfo );
  151. private:
  152. BOOL m_bInitialized;
  153. IWbemServices * m_pWbemServices;
  154. //
  155. // Strings for Adm policy object
  156. //
  157. XBStr m_xbstrName;
  158. XBStr m_xbstrGpoId;
  159. XBStr m_xbstrWriteTime;
  160. XBStr m_xbstrData;
  161. XBStr m_xbstrClass;
  162. XInterface<IWbemClassObject> m_xClass;
  163. };
  164. class CExtSessionLogger
  165. {
  166. public:
  167. CExtSessionLogger( IWbemServices *pWbemServices );
  168. BOOL Log( LPGPEXT lpExt, BOOL bSupported );
  169. BOOL Update( LPTSTR lpExtKeyName, BOOL bLoggingIncomplete, DWORD dwErr );
  170. BOOL Set( LPGPEXT lpExt, BOOL bSupported, LPRSOPEXTSTATUS lpRsopExtStatus );
  171. private:
  172. BOOL m_bInitialized;
  173. IWbemServices * m_pWbemServices;
  174. //
  175. // Strings for ExtSession Status policy object
  176. //
  177. XBStr m_xbstrExtGuid;
  178. XBStr m_xbstrDisplayName;
  179. XBStr m_xbstrPolicyBeginTime;
  180. XBStr m_xbstrPolicyEndTime;
  181. XBStr m_xbstrStatus;
  182. XBStr m_xbstrError;
  183. XBStr m_xbstrClass;
  184. XInterface<IWbemClassObject> m_xClass;
  185. WCHAR m_szGPCoreNameBuf[100];
  186. };
  187. extern BOOL DeleteInstances( WCHAR *pwszClass, IWbemServices *pWbemServices );