ReactOS 0.4.15-dev-7889-g76290a6
CEnumZipContents Class Reference
Inheritance diagram for CEnumZipContents:
Collaboration diagram for CEnumZipContents:

Public Member Functions

 CEnumZipContents ()
 
STDMETHODIMP Initialize (IZip *zip, DWORD flags, PCWSTR prefix)
 
STDMETHODIMP Next (ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched)
 
STDMETHODIMP Skip (ULONG celt)
 
STDMETHODIMP Reset ()
 
STDMETHODIMP Clone (IEnumIDList **ppenum)
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
- Public Member Functions inherited from IEnumIDList
HRESULT Next ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] PITEMID_CHILD *rgelt, [out] ULONG *pceltFetched)
 
HRESULT Skip ([in] ULONG celt)
 
HRESULT Reset ()
 
HRESULT Clone ([out] IEnumIDList **ppenum)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Private Attributes

CZipEnumerator mEnumerator
 
DWORD dwFlags
 
CStringW m_Prefix
 

Additional Inherited Members

- Public Types inherited from IEnumIDList
typedef IEnumIDListLPENUMIDLIST
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Detailed Description

Definition at line 11 of file CEnumZipContents.cpp.

Constructor & Destructor Documentation

◆ CEnumZipContents()

CEnumZipContents::CEnumZipContents ( )
inline

Definition at line 20 of file CEnumZipContents.cpp.

21 :dwFlags(0)
22 {
23 }

Member Function Documentation

◆ Clone()

STDMETHODIMP CEnumZipContents::Clone ( IEnumIDList **  ppenum)
inline

Implements IEnumIDList.

Definition at line 89 of file CEnumZipContents.cpp.

90 {
91 return E_NOTIMPL;
92 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Initialize()

STDMETHODIMP CEnumZipContents::Initialize ( IZip zip,
DWORD  flags,
PCWSTR  prefix 
)
inline

Definition at line 25 of file CEnumZipContents.cpp.

26 {
27 dwFlags = flags;
28 m_Prefix = prefix;
29 if (mEnumerator.initialize(zip))
30 return S_OK;
31 return E_FAIL;
32 }
CZipEnumerator mEnumerator
#define E_FAIL
Definition: ddrawi.h:102
GLbitfield flags
Definition: glext.h:7161
#define S_OK
Definition: intsafe.h:52
bool initialize(IZip *zip)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

◆ Next()

STDMETHODIMP CEnumZipContents::Next ( ULONG  celt,
LPITEMIDLIST rgelt,
ULONG pceltFetched 
)
inline

Definition at line 35 of file CEnumZipContents.cpp.

36 {
37 if (!rgelt || (!pceltFetched && celt != 1))
38 return E_POINTER;
39
40 HRESULT hr = S_OK;
41 ULONG fetched = 0;
44 bool dir;
46
47 while (fetched < celt)
48 {
50 {
52 if (!item)
53 {
54 hr = fetched ? S_FALSE : E_OUTOFMEMORY;
55 break;
56 }
57 rgelt[fetched++] = item;
58 }
59 else
60 {
61 hr = S_FALSE;
62 break;
63 }
64 }
65
66 if (pceltFetched)
67 *pceltFetched = fetched;
68 return hr;
69 }
unsigned int dir
Definition: maze.c:112
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
LPITEMIDLIST _ILCreate(LPCWSTR lpString, ULONG Index)
Definition: fontpidl.cpp:10
static ATOM item
Definition: dde.c:856
HRESULT hr
Definition: shlfolder.c:183
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
bool next_unique(PCWSTR prefix, CStringW &name, bool &folder, unz_file_info64 &info)
Definition: name.c:39
uint32_t ULONG
Definition: typedefs.h:59
#define S_FALSE
Definition: winerror.h:2357
#define E_POINTER
Definition: winerror.h:2365
@ ZIP_PIDL_FILE
Definition: zippidl.hpp:13
@ ZIP_PIDL_DIRECTORY
Definition: zippidl.hpp:12

◆ Reset()

STDMETHODIMP CEnumZipContents::Reset ( )
inline

Implements IEnumIDList.

Definition at line 83 of file CEnumZipContents.cpp.

84 {
85 if (mEnumerator.reset())
86 return S_OK;
87 return E_FAIL;
88 }

◆ Skip()

STDMETHODIMP CEnumZipContents::Skip ( ULONG  celt)
inline

Implements IEnumIDList.

Definition at line 70 of file CEnumZipContents.cpp.

71 {
73 bool dir;
75 while (celt--)
76 {
78 return E_FAIL;
79 ;
80 }
81 return S_OK;
82 }

Member Data Documentation

◆ dwFlags

DWORD CEnumZipContents::dwFlags
private

Definition at line 17 of file CEnumZipContents.cpp.

◆ m_Prefix

CStringW CEnumZipContents::m_Prefix
private

Definition at line 18 of file CEnumZipContents.cpp.

Referenced by Initialize(), Next(), and Skip().

◆ mEnumerator

CZipEnumerator CEnumZipContents::mEnumerator
private

Definition at line 16 of file CEnumZipContents.cpp.

Referenced by Initialize(), Next(), Reset(), and Skip().


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