ReactOS  0.4.15-dev-439-g292f67a
CFolderItems.h
Go to the documentation of this file.
1 /*
2  * PROJECT: shell32
3  * LICENSE: LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+)
4  * PURPOSE: FolderItem(s) implementation
5  * COPYRIGHT: Copyright 2015-2018 Mark Jansen (mark.jansen@reactos.org)
6  */
7 
8 #ifndef _FOLDERITEM_H_
9 #define _FOLDERITEM_H_
10 
11 
13  public CComCoClass<CFolderItem>,
14  public CComObjectRootEx<CComMultiThreadModelNoCS>,
15  public IDispatchImpl<FolderItem, &IID_FolderItem>
16 {
17 private:
18  CComHeapPtr<ITEMIDLIST> m_idlist;
19  CComPtr<Folder> m_Folder;
20 
21 public:
22  CFolderItem();
23  ~CFolderItem();
24 
25  HRESULT Initialize(Folder* folder, LPITEMIDLIST idlist);
26 
27 
28  // *** FolderItem methods ***
31  virtual HRESULT STDMETHODCALLTYPE get_Name(BSTR *pbs);
33  virtual HRESULT STDMETHODCALLTYPE get_Path(BSTR *pbs);
42  virtual HRESULT STDMETHODCALLTYPE get_Size(LONG *pul);
43  virtual HRESULT STDMETHODCALLTYPE get_Type(BSTR *pbs);
44  virtual HRESULT STDMETHODCALLTYPE Verbs(FolderItemVerbs **ppfic);
46 
47 
50 
52  COM_INTERFACE_ENTRY_IID(IID_FolderItem, FolderItem)
55 };
56 
58  public CComCoClass<CFolderItems>,
59  public CComObjectRootEx<CComMultiThreadModelNoCS>,
60  public IDispatchImpl<FolderItems, &IID_FolderItems>
61 {
62 private:
63  CComHeapPtr<ITEMIDLIST> m_idlist;
64  CComPtr<IEnumIDList> m_EnumIDList;
65  CComPtr<Folder> m_Folder;
66  long m_Count;
67 
68 public:
69  CFolderItems();
70  ~CFolderItems();
71 
72  // Please note: CFolderItems takes ownership of idlist.
73  HRESULT Initialize(LPITEMIDLIST idlist, Folder* parent);
74 
75  // *** FolderItems methods ***
76  virtual HRESULT STDMETHODCALLTYPE get_Count(long *plCount);
79  virtual HRESULT STDMETHODCALLTYPE Item(VARIANT index, FolderItem **ppid);
80  virtual HRESULT STDMETHODCALLTYPE _NewEnum(IUnknown **ppunk);
81 
84 
86  COM_INTERFACE_ENTRY_IID(IID_FolderItems, FolderItems)
89 };
90 
91 #endif
CComPtr< Folder > m_Folder
Definition: CFolderItems.h:65
Definition: fci.c:115
CComHeapPtr< ITEMIDLIST > m_idlist
Definition: CFolderItems.h:18
virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **ppid)
virtual HRESULT STDMETHODCALLTYPE get_Size(LONG *pul)
CComPtr< Folder > m_Folder
Definition: CFolderItems.h:19
virtual HRESULT STDMETHODCALLTYPE Verbs(FolderItemVerbs **ppfic)
double DATE
Definition: compat.h:1903
HRESULT Initialize(Folder *folder, LPITEMIDLIST idlist)
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:611
virtual HRESULT STDMETHODCALLTYPE put_ModifyDate(DATE dt)
virtual HRESULT STDMETHODCALLTYPE get_GetFolder(IDispatch **ppid)
OLECHAR * BSTR
Definition: compat.h:1943
virtual HRESULT STDMETHODCALLTYPE get_IsLink(VARIANT_BOOL *pb)
short VARIANT_BOOL
Definition: compat.h:1940
long LONG
Definition: pedump.c:60
virtual HRESULT STDMETHODCALLTYPE InvokeVerb(VARIANT vVerb)
GLuint index
Definition: glext.h:6031
coclass Shell32::ShellFolderViewOC FolderItem
virtual HRESULT STDMETHODCALLTYPE get_Path(BSTR *pbs)
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
CComPtr< IEnumIDList > m_EnumIDList
Definition: CFolderItems.h:64
r parent
Definition: btrfs.c:2944
LONG HRESULT
Definition: typedefs.h:78
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
const GUID IID_IDispatch
virtual HRESULT STDMETHODCALLTYPE get_Type(BSTR *pbs)
virtual HRESULT STDMETHODCALLTYPE put_Name(BSTR bs)
virtual HRESULT STDMETHODCALLTYPE get_ModifyDate(DATE *pdt)
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
virtual HRESULT STDMETHODCALLTYPE get_IsBrowsable(VARIANT_BOOL *pb)
virtual HRESULT STDMETHODCALLTYPE get_Name(BSTR *pbs)
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:639
const WCHAR * class
Definition: main.c:68
virtual HRESULT STDMETHODCALLTYPE get_IsFolder(VARIANT_BOOL *pb)
CComHeapPtr< ITEMIDLIST > m_idlist
Definition: CFolderItems.h:63
#define END_COM_MAP()
Definition: atlcom.h:552
static struct msdos_boot_sector bs
Definition: mkdosfs.c:539
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid)
virtual HRESULT STDMETHODCALLTYPE get_IsFileSystem(VARIANT_BOOL *pb)
virtual HRESULT STDMETHODCALLTYPE get_GetLink(IDispatch **ppid)