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.

88 lines
1.2 KiB

  1. #pragma once
  2. #include "ScopeCriticalSection.h"
  3. #include "AlgModule.h"
  4. #include <list>
  5. #include <algorithm>
  6. typedef std::list<CAlgModule*> LISTOF_ALGMODULE;
  7. //
  8. //
  9. //
  10. class CCollectionAlgModules
  11. {
  12. //
  13. // Properties
  14. //
  15. public:
  16. CComAutoCriticalSection m_AutoCS;
  17. LISTOF_ALGMODULE m_ThisCollection;
  18. //
  19. // Methods
  20. //
  21. public:
  22. //
  23. // standard destructor
  24. //
  25. ~CCollectionAlgModules();
  26. int // Returns the total number of ISV ALG loaded or -1 if could not load them or 0 is none where setup
  27. Load();
  28. HRESULT
  29. Unload();
  30. HRESULT
  31. UnloadDisabledModule();
  32. //
  33. // Make sure that ALG modules reflect the curren configuration
  34. //
  35. void
  36. Refresh()
  37. {
  38. MYTRACE_ENTER("CCollectionAlgModules::Refresh()");
  39. UnloadDisabledModule();
  40. Load();
  41. }
  42. private:
  43. //
  44. // Add a new control channel (Thread safe)
  45. //
  46. CAlgModule*
  47. CCollectionAlgModules::AddUniqueAndStart(
  48. CRegKey& KeyEnumISV,
  49. LPCTSTR pszAlgID
  50. );
  51. //
  52. // Remove a channel from the list (Thead safe)
  53. //
  54. HRESULT
  55. Remove(
  56. CAlgModule* pAglToRemove
  57. );
  58. };