ReactOS 0.4.16-dev-2284-g3529151
CStoreList Class Reference

#include <CStoreList.hpp>

Public Member Functions

 CStoreList (StoreType type)
 
void LoadStores ()
 
DWORD StoreTypeFlags () const
 
template<typename Fn >
void ForEach (Fn callback)
 

Static Private Member Functions

static BOOL CALLBACK s_StoreCallback (const void *pvSystemStore, DWORD dwFlags, PCERT_SYSTEM_STORE_INFO pStoreInfo, void *pvReserved, void *pvArg)
 

Private Attributes

CAtlList< CStore * > m_Stores
 
StoreType m_Type
 

Detailed Description

Definition at line 15 of file CStoreList.hpp.

Constructor & Destructor Documentation

◆ CStoreList()

CStoreList::CStoreList ( StoreType  type)
explicit

Definition at line 10 of file CStoreList.cpp.

10 : m_Type(type)
11{
12}
StoreType m_Type
Definition: CStoreList.hpp:19
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

Member Function Documentation

◆ ForEach()

template<typename Fn >
void CStoreList::ForEach ( Fn  callback)
inline

Definition at line 39 of file CStoreList.hpp.

40 {
41 if (m_Stores.IsEmpty())
42 LoadStores();
43
44 for (POSITION it = m_Stores.GetHeadPosition(); it; m_Stores.GetNext(it))
45 {
46 CStore *current = m_Stores.GetAt(it);
47
49 }
50 }
void LoadStores()
Definition: CStoreList.cpp:46
CAtlList< CStore * > m_Stores
Definition: CStoreList.hpp:18
Definition: CStore.hpp:9
struct task_struct * current
Definition: linux.c:32
static IPrintDialogCallback callback
Definition: printdlg.c:326

Referenced by CCertMgrProperties::OnInitDialog().

◆ LoadStores()

void CStoreList::LoadStores ( )

Definition at line 46 of file CStoreList.cpp.

47{
49}
DWORD StoreTypeFlags() const
Definition: CStoreList.cpp:15
static BOOL CALLBACK s_StoreCallback(const void *pvSystemStore, DWORD dwFlags, PCERT_SYSTEM_STORE_INFO pStoreInfo, void *pvReserved, void *pvArg)
Definition: CStoreList.cpp:31
#define NULL
Definition: types.h:112
BOOL WINAPI CertEnumSystemStore(DWORD dwFlags, void *pvSystemStoreLocationPara, void *pvArg, PFN_CERT_ENUM_SYSTEM_STORE pfnEnum)
Definition: store.c:1321

Referenced by ForEach().

◆ s_StoreCallback()

BOOL CALLBACK CStoreList::s_StoreCallback ( const void pvSystemStore,
DWORD  dwFlags,
PCERT_SYSTEM_STORE_INFO  pStoreInfo,
void pvReserved,
void pvArg 
)
staticprivate

Definition at line 31 of file CStoreList.cpp.

37{
38 CStoreList *storeList = static_cast<CStoreList *>(pvArg);
39 const wchar_t *storeName = static_cast<const wchar_t *>(pvSystemStore);
40 CStore *newStore = new CStore(storeName, storeList->StoreTypeFlags());
41 storeList->m_Stores.AddTail(newStore);
42 return TRUE; // Continue enumeration
43}
#define TRUE
Definition: types.h:120

Referenced by LoadStores().

◆ StoreTypeFlags()

DWORD CStoreList::StoreTypeFlags ( ) const

Definition at line 15 of file CStoreList.cpp.

16{
17 switch (m_Type)
18 {
19 case StoreType::User:
21 case StoreType::Service:
23 case StoreType::Computer:
25 default:
26 return 0;
27 }
28}
#define CERT_SYSTEM_STORE_SERVICES
Definition: wincrypt.h:2534
#define CERT_SYSTEM_STORE_LOCAL_MACHINE
Definition: wincrypt.h:2530
#define CERT_SYSTEM_STORE_CURRENT_USER
Definition: wincrypt.h:2528

Referenced by LoadStores(), and s_StoreCallback().

Member Data Documentation

◆ m_Stores

CAtlList<CStore *> CStoreList::m_Stores
private

Definition at line 18 of file CStoreList.hpp.

Referenced by ForEach(), and s_StoreCallback().

◆ m_Type

StoreType CStoreList::m_Type
private

Definition at line 19 of file CStoreList.hpp.

Referenced by StoreTypeFlags().


The documentation for this class was generated from the following files: