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.

127 lines
2.5 KiB

  1. //*************************************************************
  2. //
  3. // Copyright (c) Microsoft Corporation 1998
  4. // All rights reserved
  5. //
  6. // applist.hxx
  7. //
  8. //*************************************************************
  9. #ifndef _APPLIST_HXX_
  10. #define _APPLIST_HXX_
  11. #define RSOP_ARP_CONTEXT_QUERY L"EntryType = 3"
  12. #define RSOP_POLICY_CONTEXT_QUERY L"EntryType = 2"
  13. #define RSOP_PURGE_QUERY L"EntryType = 1"
  14. //
  15. // RSoP Removal query criteria -- used to remove an installed app
  16. // from the RSoP database due to an uninstall
  17. //
  18. #define RSOP_REMOVAL_QUERY_CRITERIA L"EntryType = %d AND Id = \"%s\""
  19. // RSoP Query criteria maximum constants
  20. #define MAXLEN_RSOPREMOVAL_QUERY_CRITERIA ( sizeof( RSOP_REMOVAL_QUERY_CRITERIA ) / sizeof( WCHAR ) )
  21. #define MAXLEN_RSOPENTRYTYPE_DECIMAL_REPRESENTATION 10
  22. #define MAXLEN_RSOPPACKAGEID_GUID_REPRESENTATION MAX_SZGUID_LEN
  23. class CRsopAppContext;
  24. class CAppList : public CList, public CPolicyLog
  25. {
  26. friend class CManagedAppProcessor;
  27. public:
  28. enum
  29. {
  30. RSOP_FILTER_ALL,
  31. RSOP_FILTER_REMOVALSONLY
  32. };
  33. CAppList(
  34. CManagedAppProcessor * pManApp,
  35. CRsopAppContext * pRsopContext = NULL );
  36. ~CAppList();
  37. DWORD
  38. SetAppActions();
  39. DWORD
  40. ProcessPolicy();
  41. DWORD
  42. ProcessARPList();
  43. DWORD
  44. Count(
  45. DWORD Flags
  46. );
  47. CAppInfo *
  48. Find(
  49. GUID DeploymentId
  50. );
  51. HRESULT
  52. WriteLog( DWORD dwFilter = RSOP_FILTER_ALL );
  53. HRESULT
  54. WriteAppToRsopLog( CAppInfo* pAppInfo );
  55. HRESULT
  56. MarkRSOPEntryAsRemoved(
  57. CAppInfo* pAppInfo,
  58. BOOL bRemoveInstances);
  59. private:
  60. HRESULT
  61. PurgeEntries();
  62. HRESULT
  63. GetUserApplyCause(
  64. CPolicyRecord* pRecord,
  65. CAppInfo* pAppInfo
  66. );
  67. HRESULT
  68. FindRsopAppEntry(
  69. CAppInfo* pAppInfo,
  70. WCHAR** ppwszCriteria );
  71. HRESULT
  72. WriteConflicts( CAppInfo* pAppInfo );
  73. HRESULT
  74. InitRsopLog();
  75. WCHAR*
  76. GetRsopListCriteria();
  77. CManagedAppProcessor * _pManApp; // The machine or user global state object.
  78. CRsopAppContext* _pRsopContext; // RSoP Logging context
  79. HRESULT _hrRsopInit; // Status of attempt to initialize RSoP
  80. BOOL _bRsopInitialized; // TRUE if RSoP logging has been initialized
  81. };
  82. #endif