ReactOS 0.4.16-dev-92-g0c2cdca
CACLMulti Class Reference

#include <aclmulti.h>

Inheritance diagram for CACLMulti:
Collaboration diagram for CACLMulti:

Classes

struct  ACLMultiSublist
 

Public Member Functions

 CACLMulti ()
 
 ~CACLMulti ()
 
STDMETHOD() Next (ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched) override
 
STDMETHOD() Skip (ULONG celt) override
 
STDMETHOD() Reset () override
 
STDMETHOD() Clone (IEnumString **ppenum) override
 
STDMETHOD() Expand (LPCOLESTR pszExpand) override
 
STDMETHOD() Append (IUnknown *punk) override
 
STDMETHOD() Remove (IUnknown *punk) override
 
- 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 IEnumString
HRESULT Next ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] LPOLESTR *rgelt, [out] ULONG *pceltFetched)
 
HRESULT RemoteNext ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] LPOLESTR *rgelt, [out] ULONG *pceltFetched)
 
HRESULT Skip ([in] ULONG celt)
 
HRESULT Reset ()
 
HRESULT Clone ([out] IEnumString **ppenum)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Private Member Functions

void release_obj (struct ACLMultiSublist *obj)
 

Private Attributes

INT fObjectCount
 
INT fCurrentObject
 
struct ACLMultiSublistfObjects
 

Additional Inherited Members

- Public Types inherited from IEnumString
typedef IEnumStringLPENUMSTRING
 
- 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 24 of file aclmulti.h.

Constructor & Destructor Documentation

◆ CACLMulti()

CACLMulti::CACLMulti ( )

Definition at line 33 of file aclmulti.cpp.

34{
35 fObjectCount = 0;
37 fObjects = NULL;
38}
INT fObjectCount
Definition: aclmulti.h:39
struct ACLMultiSublist * fObjects
Definition: aclmulti.h:41
INT fCurrentObject
Definition: aclmulti.h:40
#define NULL
Definition: types.h:112

◆ ~CACLMulti()

CACLMulti::~CACLMulti ( )

Definition at line 40 of file aclmulti.cpp.

41{
42 int i;
43
44 TRACE("destroying %p\n", this);
45 for (i = 0; i < fObjectCount; i++)
48}
void release_obj(struct ACLMultiSublist *obj)
Definition: aclmulti.cpp:24
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
#define TRACE(s)
Definition: solgame.cpp:4

Member Function Documentation

◆ Append()

HRESULT STDMETHODCALLTYPE CACLMulti::Append ( IUnknown punk)
override

Definition at line 50 of file aclmulti.cpp.

51{
52 TRACE("(%p, %p)\n", this, punk);
53 if (punk == NULL)
54 return E_FAIL;
55
56 fObjects = static_cast<ACLMultiSublist *>(
57 CoTaskMemRealloc(fObjects, sizeof(fObjects[0]) * (fObjectCount + 1)));
58 fObjects[fObjectCount].punk = punk;
59 punk->AddRef();
61 fObjects[fObjectCount].pEnum = NULL;
65 return S_OK;
66}
#define E_FAIL
Definition: ddrawi.h:102
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, SIZE_T size)
Definition: ifs.c:460
ULONG AddRef()
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define S_OK
Definition: intsafe.h:52
#define IID_PPV_ARG(Itype, ppType)

◆ Clone()

HRESULT STDMETHODCALLTYPE CACLMulti::Clone ( IEnumString **  ppenum)
override

Implements IEnumString.

Definition at line 127 of file aclmulti.cpp.

128{
129 *ppOut = NULL;
130 /* native browseui 6.0 returns this: */
131 return E_OUTOFMEMORY;
132}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100

◆ Expand()

HRESULT STDMETHODCALLTYPE CACLMulti::Expand ( LPCOLESTR  pszExpand)
override

Definition at line 134 of file aclmulti.cpp.

135{
136 HRESULT res = S_OK;
137 int i;
138
139 for (i = 0; i < fObjectCount; i++)
140 {
141 if (!fObjects[i].pACL)
142 continue;
143 res = fObjects[i].pACL->Expand(wstr);
144 if (res == S_OK)
145 break;
146 }
147 return res;
148}
GLuint res
Definition: glext.h:9613

◆ Next()

HRESULT STDMETHODCALLTYPE CACLMulti::Next ( ULONG  celt,
LPOLESTR rgelt,
ULONG pceltFetched 
)
override

Implements IEnumString.

Definition at line 87 of file aclmulti.cpp.

88{
89 TRACE("(%p, %d, %p, %p)\n", this, celt, rgelt, pceltFetched);
91 {
92 if (fObjects[fCurrentObject].pEnum)
93 {
94 /* native browseui 6.0 also returns only one element */
95 HRESULT ret = fObjects[fCurrentObject].pEnum->Next(1, rgelt, pceltFetched);
96 if (ret != S_FALSE)
97 return ret;
98 }
100 }
101
102 if (pceltFetched)
103 *pceltFetched = 0;
104 *rgelt = NULL;
105 return S_FALSE;
106}
HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] STATPROPSETSTG *rgelt, [out] ULONG *pceltFetched)
int ret
#define S_FALSE
Definition: winerror.h:2357

◆ release_obj()

void CACLMulti::release_obj ( struct ACLMultiSublist obj)
private

Definition at line 24 of file aclmulti.cpp.

25{
26 obj->punk->Release();
27 if (obj->pEnum)
28 obj->pEnum->Release();
29 if (obj->pACL)
30 obj->pACL->Release();
31}

Referenced by Remove(), and ~CACLMulti().

◆ Remove()

HRESULT STDMETHODCALLTYPE CACLMulti::Remove ( IUnknown punk)
override

Definition at line 68 of file aclmulti.cpp.

69{
70 int i;
71
72 TRACE("(%p, %p)\n", this, punk);
73 for (i = 0; i < fObjectCount; i++)
74 if (fObjects[i].punk == punk)
75 {
77 MoveMemory(&fObjects[i], &fObjects[i + 1], (fObjectCount - i - 1) * sizeof(ACLMultiSublist));
79 fObjects = static_cast<ACLMultiSublist *>(
81 return S_OK;
82 }
83
84 return E_FAIL;
85}
#define MoveMemory
Definition: winbase.h:1709

◆ Reset()

HRESULT STDMETHODCALLTYPE CACLMulti::Reset ( )
override

Implements IEnumString.

Definition at line 108 of file aclmulti.cpp.

109{
110 int i;
111
112 fCurrentObject = 0;
113 for (i = 0; i < fObjectCount; i++)
114 {
115 if (fObjects[i].pEnum)
116 fObjects[i].pEnum->Reset();
117 }
118 return S_OK;
119}
HRESULT Reset()

◆ Skip()

HRESULT STDMETHODCALLTYPE CACLMulti::Skip ( ULONG  celt)
override

Implements IEnumString.

Definition at line 121 of file aclmulti.cpp.

122{
123 /* native browseui 6.0 returns this: */
124 return E_NOTIMPL;
125}
#define E_NOTIMPL
Definition: ddrawi.h:99

Member Data Documentation

◆ fCurrentObject

INT CACLMulti::fCurrentObject
private

Definition at line 40 of file aclmulti.h.

Referenced by CACLMulti(), Next(), and Reset().

◆ fObjectCount

INT CACLMulti::fObjectCount
private

Definition at line 39 of file aclmulti.h.

Referenced by Append(), CACLMulti(), Expand(), Next(), Remove(), Reset(), and ~CACLMulti().

◆ fObjects

struct ACLMultiSublist* CACLMulti::fObjects
private

Definition at line 41 of file aclmulti.h.

Referenced by Append(), CACLMulti(), Expand(), Next(), Remove(), Reset(), and ~CACLMulti().


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