windows-nt/Source/XPSP1/NT/net/homenet/alg/exe/collectionalgmodules.h

89 lines
1.2 KiB
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
#pragma once
#include "ScopeCriticalSection.h"
#include "AlgModule.h"
#include <list>
#include <algorithm>
typedef std::list<CAlgModule*> LISTOF_ALGMODULE;
//
//
//
class CCollectionAlgModules
{
//
// Properties
//
public:
CComAutoCriticalSection m_AutoCS;
LISTOF_ALGMODULE m_ThisCollection;
//
// Methods
//
public:
//
// standard destructor
//
~CCollectionAlgModules();
int // Returns the total number of ISV ALG loaded or -1 if could not load them or 0 is none where setup
Load();
HRESULT
Unload();
HRESULT
UnloadDisabledModule();
//
// Make sure that ALG modules reflect the curren configuration
//
void
Refresh()
{
MYTRACE_ENTER("CCollectionAlgModules::Refresh()");
UnloadDisabledModule();
Load();
}
private:
//
// Add a new control channel (Thread safe)
//
CAlgModule*
CCollectionAlgModules::AddUniqueAndStart(
CRegKey& KeyEnumISV,
LPCTSTR pszAlgID
);
//
// Remove a channel from the list (Thead safe)
//
HRESULT
Remove(
CAlgModule* pAglToRemove
);
};