ReactOS  0.4.15-dev-1397-g19779b3
ACLCustomMRU.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS browseui
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: Custom MRU AutoComplete List
5  * COPYRIGHT: Copyright 2017 Mark Jansen (mark.jansen@reactos.org)
6  * Copyright 2020 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
7  */
8 
9 #pragma once
10 
12  public CComCoClass<CACLCustomMRU, &CLSID_ACLCustomMRU>,
13  public CComObjectRootEx<CComMultiThreadModelNoCS>,
14  public IEnumString,
15  public IACList,
16  public IACLCustomMRU
17 {
18 private:
19  CRegKey m_Key;
22  bool m_bDirty;
25 
26  void PersistMRU();
28  HRESULT LoadMRUList(DWORD dwMax);
29 
30 public:
31  CACLCustomMRU();
33 
34  // *** IEnumString methods ***
35  STDMETHODIMP Next(ULONG celt, LPWSTR *rgelt, ULONG *pceltFetched) override;
36  STDMETHODIMP Skip(ULONG celt) override;
37  STDMETHODIMP Reset() override;
38  STDMETHODIMP Clone(IEnumString ** ppenum) override;
39 
40  // *** IACList methods ***
41  STDMETHODIMP Expand(LPCOLESTR pszExpand) override;
42 
43  // *** IACLCustomMRU methods ***
44  STDMETHODIMP Initialize(LPCWSTR pwszMRURegKey, DWORD dwMax) override;
45  STDMETHODIMP AddMRUString(LPCWSTR pwszEntry) override;
46 
47 public:
48 
51 
53 
56  COM_INTERFACE_ENTRY_IID(IID_IACList, IACList)
57  COM_INTERFACE_ENTRY_IID(IID_IACLCustomMRU, IACLCustomMRU)
58  END_COM_MAP()
59 };
HRESULT LoadTypedURLs(DWORD dwMax)
STDMETHODIMP AddMRUString(LPCWSTR pwszEntry) override
const GUID IID_IEnumString
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
STDMETHODIMP Next(ULONG celt, LPWSTR *rgelt, ULONG *pceltFetched) override
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:611
CSimpleArray< CStringW > m_MRUData
Definition: ACLCustomMRU.h:21
STDMETHODIMP Clone(IEnumString **ppenum) override
#define IDR_ACLCUSTOMMRU
Definition: resource.h:106
unsigned int BOOL
Definition: ntddk_ex.h:94
#define STDMETHODIMP
Definition: basetyps.h:43
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
STDMETHODIMP Expand(LPCOLESTR pszExpand) override
STDMETHODIMP Skip(ULONG celt) override
STDMETHODIMP Initialize(LPCWSTR pwszMRURegKey, DWORD dwMax) override
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:605
HRESULT LoadMRUList(DWORD dwMax)
STDMETHODIMP Reset() override
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:639
unsigned int ULONG
Definition: retypes.h:1
CAtlStringW CStringW
Definition: atlstr.h:130
#define END_COM_MAP()
Definition: atlcom.h:552
WCHAR * LPWSTR
Definition: xmlstorage.h:184
CRegKey m_Key
Definition: ACLCustomMRU.h:19
CStringW m_MRUList
Definition: ACLCustomMRU.h:20