ReactOS  0.4.15-dev-5446-g3f3714b
CFolder.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: Folder implementation
5  * COPYRIGHT: Copyright 2015-2018 Mark Jansen (mark.jansen@reactos.org)
6  */
7 
8 #ifndef _FOLDER_H_
9 #define _FOLDER_H_
10 
11 
12 class CFolder:
13  public CComCoClass<CFolder>,
14  public CComObjectRootEx<CComMultiThreadModelNoCS>,
15  public IDispatchImpl<Folder2, &IID_Folder2>
16 {
17 private:
18  HRESULT GetShellFolder(CComPtr<IShellFolder>& psfCurrent);
19 
20  CComHeapPtr<ITEMIDLIST> m_idlist;
21  CComPtr<IShellDispatch> m_Application;
22 
23 public:
24  CFolder();
25  ~CFolder();
26 
28 
29  // *** Folder methods ***
33  virtual HRESULT STDMETHODCALLTYPE get_ParentFolder(Folder **ppsf);
34  virtual HRESULT STDMETHODCALLTYPE Items(FolderItems **ppid);
35  virtual HRESULT STDMETHODCALLTYPE ParseName(BSTR bName, FolderItem **ppid);
36  virtual HRESULT STDMETHODCALLTYPE NewFolder(BSTR bName, VARIANT vOptions);
37  virtual HRESULT STDMETHODCALLTYPE MoveHere(VARIANT vItem, VARIANT vOptions);
38  virtual HRESULT STDMETHODCALLTYPE CopyHere(VARIANT vItem, VARIANT vOptions);
39  virtual HRESULT STDMETHODCALLTYPE GetDetailsOf(VARIANT vItem, int iColumn, BSTR *pbs);
40 
41  // *** Folder2 methods ***
45  virtual HRESULT STDMETHODCALLTYPE get_HaveToShowWebViewBarricade(VARIANT_BOOL *pbHaveToShowWebViewBarricade);
47 
50 
52  COM_INTERFACE_ENTRY_IID(IID_Folder2, Folder2)
53  COM_INTERFACE_ENTRY_IID(IID_Folder, Folder)
56 
57 };
58 
59 
60 #endif
virtual HRESULT STDMETHODCALLTYPE NewFolder(BSTR bName, VARIANT vOptions)
Definition: CFolder.cpp:114
virtual HRESULT STDMETHODCALLTYPE Synchronize()
Definition: CFolder.cpp:155
HRESULT GetShellFolder(CComPtr< IShellFolder > &psfCurrent)
Definition: CFolder.cpp:27
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:612
OLECHAR * BSTR
Definition: compat.h:2293
short VARIANT_BOOL
Definition: compat.h:2290
virtual HRESULT STDMETHODCALLTYPE get_HaveToShowWebViewBarricade(VARIANT_BOOL *pbHaveToShowWebViewBarricade)
Definition: CFolder.cpp:161
virtual HRESULT STDMETHODCALLTYPE ParseName(BSTR bName, FolderItem **ppid)
Definition: CFolder.cpp:91
virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **ppid)
Definition: CFolder.cpp:66
HRESULT Initialize(LPITEMIDLIST idlist)
Definition: CFolder.cpp:21
CComHeapPtr< ITEMIDLIST > m_idlist
Definition: CFolder.h:20
long LONG
Definition: pedump.c:60
virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid)
Definition: CFolder.cpp:53
virtual HRESULT STDMETHODCALLTYPE get_Self(FolderItem **ppfi)
Definition: CFolder.cpp:140
virtual HRESULT STDMETHODCALLTYPE get_OfflineStatus(LONG *pul)
Definition: CFolder.cpp:149
coclass Shell32::ShellFolderViewOC FolderItem
virtual HRESULT STDMETHODCALLTYPE GetDetailsOf(VARIANT vItem, int iColumn, BSTR *pbs)
Definition: CFolder.cpp:132
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:542
virtual HRESULT STDMETHODCALLTYPE get_Title(BSTR *pbs)
Definition: CFolder.cpp:39
virtual HRESULT STDMETHODCALLTYPE get_ParentFolder(Folder **ppsf)
Definition: CFolder.cpp:76
LONG HRESULT
Definition: typedefs.h:79
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
const GUID IID_IDispatch
CComPtr< IShellDispatch > m_Application
Definition: CFolder.h:21
~CFolder()
Definition: CFolder.cpp:17
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:562
CFolder()
Definition: CFolder.cpp:13
virtual HRESULT STDMETHODCALLTYPE DismissedWebViewBarricade()
Definition: CFolder.cpp:167
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:640
#define END_COM_MAP()
Definition: atlcom.h:553
virtual HRESULT STDMETHODCALLTYPE CopyHere(VARIANT vItem, VARIANT vOptions)
Definition: CFolder.cpp:126
virtual HRESULT STDMETHODCALLTYPE Items(FolderItems **ppid)
Definition: CFolder.cpp:85
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
virtual HRESULT STDMETHODCALLTYPE MoveHere(VARIANT vItem, VARIANT vOptions)
Definition: CFolder.cpp:120