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 27 HRESULT Initialize(LPITEMIDLIST idlist); 28 29 // *** Folder methods *** 30 virtual HRESULT STDMETHODCALLTYPE get_Title(BSTR *pbs); 31 virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid); 32 virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **ppid); 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 *** 42 virtual HRESULT STDMETHODCALLTYPE get_Self(FolderItem **ppfi); 43 virtual HRESULT STDMETHODCALLTYPE get_OfflineStatus(LONG *pul); 44 virtual HRESULT STDMETHODCALLTYPE Synchronize(); 45 virtual HRESULT STDMETHODCALLTYPE get_HaveToShowWebViewBarricade(VARIANT_BOOL *pbHaveToShowWebViewBarricade); 46 virtual HRESULT STDMETHODCALLTYPE DismissedWebViewBarricade(); 47 48 DECLARE_NOT_AGGREGATABLE(CFolder) 49 DECLARE_PROTECT_FINAL_CONSTRUCT() 50 51 BEGIN_COM_MAP(CFolder) 52 COM_INTERFACE_ENTRY_IID(IID_Folder2, Folder2) 53 COM_INTERFACE_ENTRY_IID(IID_Folder, Folder) 54 COM_INTERFACE_ENTRY_IID(IID_IDispatch, IDispatch) 55 END_COM_MAP() 56 57 }; 58 59 60 #endif 61