2011-05-15 15:55:49 +00:00
|
|
|
/*
|
|
|
|
* IShellItem implementation
|
|
|
|
*
|
|
|
|
* Copyright 2008 Vincent Povirk for CodeWeavers
|
|
|
|
* Copyright 2009 Andrew Hill
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SHELLITEM_H_
|
|
|
|
#define _SHELLITEM_H_
|
|
|
|
|
2011-12-19 12:01:22 +00:00
|
|
|
class CShellItem :
|
2013-04-21 22:10:36 +00:00
|
|
|
public CComCoClass<CShellItem, &CLSID_ShellItem>,
|
|
|
|
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
|
|
|
public IShellItem,
|
|
|
|
public IPersistIDList
|
2011-05-15 15:55:49 +00:00
|
|
|
{
|
|
|
|
private:
|
2013-04-21 22:10:36 +00:00
|
|
|
LPITEMIDLIST m_pidl;
|
|
|
|
|
2011-05-15 15:55:49 +00:00
|
|
|
public:
|
2013-04-21 22:10:36 +00:00
|
|
|
CShellItem();
|
|
|
|
~CShellItem();
|
|
|
|
HRESULT get_parent_pidl(LPITEMIDLIST *parent_pidl);
|
|
|
|
HRESULT get_parent_shellfolder(IShellFolder **ppsf);
|
|
|
|
|
|
|
|
// IShellItem
|
|
|
|
virtual HRESULT WINAPI BindToHandler(IBindCtx *pbc, REFGUID rbhid, REFIID riid, void **ppvOut);
|
|
|
|
virtual HRESULT WINAPI GetParent(IShellItem **ppsi);
|
|
|
|
virtual HRESULT WINAPI GetDisplayName(SIGDN sigdnName, LPWSTR *ppszName);
|
|
|
|
virtual HRESULT WINAPI GetAttributes(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs);
|
|
|
|
virtual HRESULT WINAPI Compare(IShellItem *oth, SICHINTF hint, int *piOrder);
|
|
|
|
|
|
|
|
// IPersistIDList
|
|
|
|
virtual HRESULT WINAPI GetClassID(CLSID *pClassID);
|
|
|
|
virtual HRESULT WINAPI SetIDList(LPCITEMIDLIST pidl);
|
|
|
|
virtual HRESULT WINAPI GetIDList(LPITEMIDLIST *ppidl);
|
2011-05-15 15:55:49 +00:00
|
|
|
|
|
|
|
DECLARE_NO_REGISTRY()
|
2011-12-19 12:01:22 +00:00
|
|
|
DECLARE_NOT_AGGREGATABLE(CShellItem)
|
2011-05-15 15:55:49 +00:00
|
|
|
|
|
|
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
|
|
|
|
2011-12-19 12:01:22 +00:00
|
|
|
BEGIN_COM_MAP(CShellItem)
|
2013-04-21 22:10:36 +00:00
|
|
|
COM_INTERFACE_ENTRY_IID(IID_IShellItem, IShellItem)
|
|
|
|
COM_INTERFACE_ENTRY_IID(IID_IPersistIDList, IPersistIDList)
|
2011-05-15 15:55:49 +00:00
|
|
|
END_COM_MAP()
|
|
|
|
};
|
|
|
|
|
2014-01-25 17:24:24 +00:00
|
|
|
#endif /* _SHELLITEM_H_ */
|