[SHELL32] Fix the grouping of folder options radiobuttons CORE-10837
[reactos.git] / reactos / dll / win32 / shell32 / CShellItem.h
1 /*
2 * IShellItem implementation
3 *
4 * Copyright 2008 Vincent Povirk for CodeWeavers
5 * Copyright 2009 Andrew Hill
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22 #ifndef _SHELLITEM_H_
23 #define _SHELLITEM_H_
24
25 class CShellItem :
26 public CComCoClass<CShellItem, &CLSID_ShellItem>,
27 public CComObjectRootEx<CComMultiThreadModelNoCS>,
28 public IShellItem,
29 public IPersistIDList
30 {
31 private:
32 LPITEMIDLIST m_pidl;
33
34 public:
35 CShellItem();
36 ~CShellItem();
37 HRESULT get_parent_pidl(LPITEMIDLIST *parent_pidl);
38 HRESULT get_parent_shellfolder(IShellFolder **ppsf);
39
40 // IShellItem
41 virtual HRESULT WINAPI BindToHandler(IBindCtx *pbc, REFGUID rbhid, REFIID riid, void **ppvOut);
42 virtual HRESULT WINAPI GetParent(IShellItem **ppsi);
43 virtual HRESULT WINAPI GetDisplayName(SIGDN sigdnName, LPWSTR *ppszName);
44 virtual HRESULT WINAPI GetAttributes(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs);
45 virtual HRESULT WINAPI Compare(IShellItem *oth, SICHINTF hint, int *piOrder);
46
47 // IPersistIDList
48 virtual HRESULT WINAPI GetClassID(CLSID *pClassID);
49 virtual HRESULT WINAPI SetIDList(LPCITEMIDLIST pidl);
50 virtual HRESULT WINAPI GetIDList(LPITEMIDLIST *ppidl);
51
52 DECLARE_NO_REGISTRY()
53 DECLARE_NOT_AGGREGATABLE(CShellItem)
54
55 DECLARE_PROTECT_FINAL_CONSTRUCT()
56
57 BEGIN_COM_MAP(CShellItem)
58 COM_INTERFACE_ENTRY_IID(IID_IShellItem, IShellItem)
59 COM_INTERFACE_ENTRY_IID(IID_IPersistIDList, IPersistIDList)
60 END_COM_MAP()
61 };
62
63 #endif /* _SHELLITEM_H_ */