ReactOS 0.4.15-dev-7934-g1dc8d80
aclistisf.h
Go to the documentation of this file.
1/*
2 * Shell AutoComplete list
3 *
4 * Copyright 2015 Thomas Faber
5 * Copyright 2020 Katayama Hirofumi MZ
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#pragma once
23
25 public CComCoClass<CACListISF, &CLSID_ACListISF>,
26 public CComObjectRootEx<CComMultiThreadModelNoCS>,
27 public IEnumString,
28 public IACList2,
29 public ICurrentWorkingDirectory,
30 public IShellService,
31 public IPersistFolder
32{
33private:
35 {
40 LT_MAX
41 };
42
46 CStringW m_szRawPath;
47 CStringW m_szExpanded;
48 CComHeapPtr<ITEMIDLIST> m_pidlLocation;
49 CComHeapPtr<ITEMIDLIST> m_pidlCurDir;
50 CComPtr<IEnumIDList> m_pEnumIDList;
51 CComPtr<IShellFolder> m_pShellFolder;
52 CComPtr<IBrowserService> m_pBrowserService;
53
54public:
55 CACListISF();
57
60 HRESULT GetDisplayName(LPCITEMIDLIST pidlChild, CComHeapPtr<WCHAR>& pszChild);
61 HRESULT GetPaths(LPCITEMIDLIST pidlChild, CComHeapPtr<WCHAR>& pszRaw,
62 CComHeapPtr<WCHAR>& pszExpanded);
63
64 // *** IEnumString methods ***
65 STDMETHOD(Next)(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched) override;
66 STDMETHOD(Skip)(ULONG celt) override;
67 STDMETHOD(Reset)() override;
68 STDMETHOD(Clone)(IEnumString **ppenum) override;
69
70 // *** IACList methods ***
71 STDMETHOD(Expand)(LPCOLESTR pszExpand) override;
72
73 // *** IACList2 methods ***
74 STDMETHOD(SetOptions)(DWORD dwFlag) override;
75 STDMETHOD(GetOptions)(DWORD* pdwFlag) override;
76
77 // *** IShellService methods ***
78 STDMETHOD(SetOwner)(IUnknown *punkOwner) override;
79
80 // *** IPersist methods ***
81 STDMETHOD(GetClassID)(CLSID *pClassID) override;
82
83 // *** IPersistFolder methods ***
85
86 // *** ICurrentWorkingDirectory methods ***
87 STDMETHOD(GetDirectory)(LPWSTR pwzPath, DWORD cchSize) override;
88 STDMETHOD(SetDirectory)(LPCWSTR pwzPath) override;
89
90public:
93
95
98 COM_INTERFACE_ENTRY_IID(IID_IACList, IACList)
99 COM_INTERFACE_ENTRY_IID(IID_IACList2, IACList2)
100 COM_INTERFACE_ENTRY_IID(IID_IShellService, IShellService)
101 // Windows doesn't return this
102 //COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
103 COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder)
104 COM_INTERFACE_ENTRY_IID(IID_ICurrentWorkingDirectory, ICurrentWorkingDirectory)
106};
#define STDMETHOD(m)
Definition: basetyps.h:62
CStringW m_szExpanded
Definition: aclistisf.h:47
CComPtr< IEnumIDList > m_pEnumIDList
Definition: aclistisf.h:50
STDMETHOD() Reset() override
Definition: aclistisf.cpp:274
STDMETHOD() GetDirectory(LPWSTR pwzPath, DWORD cchSize) override
Definition: aclistisf.cpp:422
CComPtr< IShellFolder > m_pShellFolder
Definition: aclistisf.h:51
BOOL m_fShowHidden
Definition: aclistisf.h:45
@ LT_DIRECTORY
Definition: aclistisf.h:36
@ LT_FAVORITES
Definition: aclistisf.h:39
@ LT_MYCOMPUTER
Definition: aclistisf.h:38
@ LT_DESKTOP
Definition: aclistisf.h:37
HRESULT SetLocation(LPITEMIDLIST pidl)
Definition: aclistisf.cpp:109
STDMETHOD() GetOptions(DWORD *pdwFlag) override
Definition: aclistisf.cpp:373
STDMETHOD() Skip(ULONG celt) override
Definition: aclistisf.cpp:301
STDMETHOD() GetClassID(CLSID *pClassID) override
Definition: aclistisf.cpp:394
CComHeapPtr< ITEMIDLIST > m_pidlCurDir
Definition: aclistisf.h:49
STDMETHOD() Expand(LPCOLESTR pszExpand) override
Definition: aclistisf.cpp:315
LOCATION_TYPE m_iNextLocation
Definition: aclistisf.h:44
CComPtr< IBrowserService > m_pBrowserService
Definition: aclistisf.h:52
STDMETHOD() SetDirectory(LPCWSTR pwzPath) override
Definition: aclistisf.cpp:428
CStringW m_szRawPath
Definition: aclistisf.h:46
STDMETHOD() SetOwner(IUnknown *punkOwner) override
Definition: aclistisf.cpp:385
STDMETHOD() Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched) override
Definition: aclistisf.cpp:210
STDMETHOD() Clone(IEnumString **ppenum) override
Definition: aclistisf.cpp:307
HRESULT GetPaths(LPCITEMIDLIST pidlChild, CComHeapPtr< WCHAR > &pszRaw, CComHeapPtr< WCHAR > &pszExpanded)
Definition: aclistisf.cpp:178
HRESULT NextLocation()
Definition: aclistisf.cpp:35
DWORD m_dwOptions
Definition: aclistisf.h:43
HRESULT GetDisplayName(LPCITEMIDLIST pidlChild, CComHeapPtr< WCHAR > &pszChild)
Definition: aclistisf.cpp:153
CComHeapPtr< ITEMIDLIST > m_pidlLocation
Definition: aclistisf.h:48
STDMETHOD() SetOptions(DWORD dwFlag) override
Definition: aclistisf.cpp:366
#define IDR_ACLISTISF
Definition: resource.h:104
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:679
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:651
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:645
#define END_COM_MAP()
Definition: atlcom.h:592
static LPOLESTR
Definition: stg_prop.c:27
const GUID IID_IEnumString
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
uint32_t ULONG
Definition: typedefs.h:59
static void Initialize()
Definition: xlate.c:212
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185