windows-nt/Source/XPSP1/NT/shell/browseui/aclmulti.h
2020-09-26 16:20:57 +08:00

65 lines
2.1 KiB
C++

/* Copyright 1996 Microsoft */
#ifndef _ACLMULTI_H_
#define _ACLMULTI_H_
//
// CACLMulti is an AutoComplete List that simply contains
// other AutoComplete Lists. Objects are added via IObjMgr
// methods, and each IEnumString method is
// just passed on to each sub list in turn.
//
class CACLMulti
: public IEnumACString
, public IObjMgr
, public IACList
{
public:
//////////////////////////////////////////////////////
// Public Interfaces
//////////////////////////////////////////////////////
// *** IUnknown ***
virtual STDMETHODIMP_(ULONG) AddRef(void);
virtual STDMETHODIMP_(ULONG) Release(void);
virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppvObj);
// *** IEnumString ***
virtual STDMETHODIMP Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched);
virtual STDMETHODIMP Skip(ULONG celt);
virtual STDMETHODIMP Reset(void);
virtual STDMETHODIMP Clone(IEnumString **ppenum);
// *** IEnumACString **
virtual STDMETHODIMP NextItem(LPOLESTR pszUrl, ULONG cchMax, ULONG* pulSortIndex);
virtual STDMETHODIMP SetEnumOptions(DWORD dwOptions) { return E_NOTIMPL; };
virtual STDMETHODIMP GetEnumOptions(DWORD *pdwOptions) { return E_NOTIMPL; };
// *** IObjMgr ***
virtual STDMETHODIMP Append(IUnknown *punk);
virtual STDMETHODIMP Remove(IUnknown *punk);
// *** IACList ***
virtual STDMETHODIMP Expand(LPCOLESTR pszExpand);
protected:
// Constructor / Destructor (protected so we can't create on stack)
CACLMulti(void);
~CACLMulti(void);
// Instance creator
friend HRESULT CACLMulti_CreateInstance(IUnknown *punkOuter, IUnknown **ppunk, LPCOBJECTINFO poi);
friend HRESULT CACLMulti_Create(IEnumString **ppenum, CACLMulti * paclMultiToCopy);
// Private variables
DWORD _cRef; // COM reference count
int _iSubList; // Current sublist for Next() operations
HDSA _hdsa; // HDSA of sublists
// Private methods
static int _FreeListItem(LPVOID p, LPVOID d);
};
#endif // _ACLMULTI_H_