xref: /reactos/dll/win32/shell32/CFolder.h (revision d6eebaa4)
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     STDMETHOD(get_Title)(BSTR *pbs) override;
31     STDMETHOD(get_Application)(IDispatch **ppid) override;
32     STDMETHOD(get_Parent)(IDispatch **ppid) override;
33     STDMETHOD(get_ParentFolder)(Folder **ppsf) override;
34     STDMETHOD(Items)(FolderItems **ppid) override;
35     STDMETHOD(ParseName)(BSTR bName, FolderItem **ppid) override;
36     STDMETHOD(NewFolder)(BSTR bName, VARIANT vOptions) override;
37     STDMETHOD(MoveHere)(VARIANT vItem, VARIANT vOptions) override;
38     STDMETHOD(CopyHere)(VARIANT vItem, VARIANT vOptions) override;
39     STDMETHOD(GetDetailsOf)(VARIANT vItem, int iColumn, BSTR *pbs) override;
40 
41     // *** Folder2 methods ***
42     STDMETHOD(get_Self)(FolderItem **ppfi) override;
43     STDMETHOD(get_OfflineStatus)(LONG *pul) override;
44     STDMETHOD(Synchronize)() override;
45     STDMETHOD(get_HaveToShowWebViewBarricade)(VARIANT_BOOL *pbHaveToShowWebViewBarricade) override;
46     STDMETHOD(DismissedWebViewBarricade)() override;
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