- Sync with trunk r58248 to bring the latest changes from Amine (headers) and others...
[reactos.git] / dll / win32 / shell32 / enumidlist.h
1 /*
2 * This library is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU Lesser General Public
4 * License as published by the Free Software Foundation; either
5 * version 2.1 of the License, or (at your option) any later version.
6 *
7 * This library is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details.
11 *
12 * You should have received a copy of the GNU Lesser General Public
13 * License along with this library; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
15 */
16 #ifndef __ENUMIDLIST_H__
17 #define __ENUMIDLIST_H__
18
19 struct ENUMLIST
20 {
21 ENUMLIST *pNext;
22 LPITEMIDLIST pidl;
23 };
24
25 class IEnumIDListImpl :
26 public CComObjectRootEx<CComMultiThreadModelNoCS>,
27 public IEnumIDList
28 {
29 private:
30 ENUMLIST *mpFirst;
31 ENUMLIST *mpLast;
32 ENUMLIST *mpCurrent;
33 public:
34 IEnumIDListImpl();
35 ~IEnumIDListImpl();
36 BOOL AddToEnumList(LPITEMIDLIST pidl);
37 BOOL DeleteList();
38 BOOL HasItemWithCLSID(LPITEMIDLIST pidl);
39 BOOL CreateFolderEnumList(LPCWSTR lpszPath, DWORD dwFlags);
40
41 // *** IEnumIDList methods ***
42 virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched);
43 virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt);
44 virtual HRESULT STDMETHODCALLTYPE Reset();
45 virtual HRESULT STDMETHODCALLTYPE Clone(IEnumIDList **ppenum);
46
47 BEGIN_COM_MAP(IEnumIDListImpl)
48 COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList)
49 END_COM_MAP()
50 };
51
52 #endif /* ndef __ENUMIDLIST_H__ */