[BROWSEUI]
authorThomas Faber <thomas.faber@reactos.org>
Wed, 9 Dec 2015 19:36:35 +0000 (19:36 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Wed, 9 Dec 2015 19:36:35 +0000 (19:36 +0000)
- Stub out CACListISF
ROSTESTS-210 #resolve

svn path=/trunk/; revision=70318

reactos/dll/win32/browseui/CMakeLists.txt
reactos/dll/win32/browseui/aclistisf.cpp [new file with mode: 0644]
reactos/dll/win32/browseui/aclistisf.h [new file with mode: 0644]
reactos/dll/win32/browseui/browseui.cpp
reactos/dll/win32/browseui/browseui.rc
reactos/dll/win32/browseui/precomp.h
reactos/dll/win32/browseui/res/shellautocomplete.rgs [new file with mode: 0644]
reactos/dll/win32/browseui/resource.h
rostests/winetests/browseui/autocomplete.c

index 81f4878..94c03db 100644 (file)
@@ -6,6 +6,7 @@ include_directories(${REACTOS_SOURCE_DIR}/lib/atl)
 spec2def(browseui.dll browseui.spec ADD_IMPORTLIB)
 
 list(APPEND SOURCE
+    aclistisf.cpp
     aclmulti.cpp
     addressband.cpp
     addresseditbox.cpp
diff --git a/reactos/dll/win32/browseui/aclistisf.cpp b/reactos/dll/win32/browseui/aclistisf.cpp
new file mode 100644 (file)
index 0000000..b1bc8b7
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ *  Shell AutoComplete list
+ *
+ *  Copyright 2015  Thomas Faber
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "precomp.h"
+
+CACListISF::CACListISF() :
+    m_dwOptions(0)
+{
+}
+
+CACListISF::~CACListISF()
+{
+}
+
+// *** IEnumString methods ***
+HRESULT STDMETHODCALLTYPE CACListISF::Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched)
+{
+    TRACE("(%p, %d, %p, %p)\n", this, celt, rgelt, pceltFetched);
+    return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CACListISF::Reset()
+{
+    TRACE("(%p)\n", this);
+    return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CACListISF::Skip(ULONG celt)
+{
+    TRACE("(%p, %d)\n", this, celt);
+    return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE CACListISF::Clone(IEnumString **ppOut)
+{
+    TRACE("(%p, %p)\n", this, ppOut);
+    *ppOut = NULL;
+    return E_NOTIMPL;
+}
+
+// *** IACList methods ***
+HRESULT STDMETHODCALLTYPE CACListISF::Expand(LPCOLESTR pszExpand)
+{
+    TRACE("(%p, %ls)\n", this, pszExpand);
+    return E_NOTIMPL;
+}
+
+// *** IACList2 methods ***
+HRESULT STDMETHODCALLTYPE CACListISF::SetOptions(DWORD dwFlag)
+{
+    TRACE("(%p, %lu)\n", this, dwFlag);
+    m_dwOptions = dwFlag;
+    return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE CACListISF::GetOptions(DWORD* pdwFlag)
+{
+    TRACE("(%p, %p)\n", this, pdwFlag);
+    *pdwFlag = m_dwOptions;
+    return S_OK;
+}
+
+// *** IShellService methods ***
+HRESULT STDMETHODCALLTYPE CACListISF::SetOwner(IUnknown *punkOwner)
+{
+    TRACE("(%p, %p)\n", this, punkOwner);
+    return E_NOTIMPL;
+}
+
+// *** IPersist methods ***
+HRESULT STDMETHODCALLTYPE CACListISF::GetClassID(CLSID *pClassID)
+{
+    TRACE("(%p, %p)\n", this, pClassID);
+    if (pClassID == NULL)
+        return E_POINTER;
+    *pClassID = CLSID_ACListISF;
+    return S_OK;
+}
+
+// *** IPersistFolder methods ***
+HRESULT STDMETHODCALLTYPE CACListISF::Initialize(LPCITEMIDLIST pidl)
+{
+    TRACE("(%p, %p)\n", this, pidl);
+    return S_OK;
+}
diff --git a/reactos/dll/win32/browseui/aclistisf.h b/reactos/dll/win32/browseui/aclistisf.h
new file mode 100644 (file)
index 0000000..e50c309
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ *  Shell AutoComplete list
+ *
+ *  Copyright 2015  Thomas Faber
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#pragma once
+
+class CACListISF :
+    public CComCoClass<CACListISF, &CLSID_ACListISF>,
+    public CComObjectRootEx<CComMultiThreadModelNoCS>,
+    public IEnumString,
+    public IACList2,
+    public IShellService,
+    public IPersistFolder
+{
+private:
+    DWORD m_dwOptions;
+
+public:
+    CACListISF();
+    ~CACListISF();
+
+    // *** IEnumString methods ***
+    virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched);
+    virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt);
+    virtual HRESULT STDMETHODCALLTYPE Reset();
+    virtual HRESULT STDMETHODCALLTYPE Clone(IEnumString **ppenum);
+
+    // *** IACList methods ***
+    virtual HRESULT STDMETHODCALLTYPE Expand(LPCOLESTR pszExpand);
+
+    // *** IACList2 methods ***
+    virtual HRESULT STDMETHODCALLTYPE SetOptions(DWORD dwFlag);
+    virtual HRESULT STDMETHODCALLTYPE GetOptions(DWORD* pdwFlag);
+
+    // *** IShellService methods ***
+    virtual HRESULT STDMETHODCALLTYPE SetOwner(IUnknown *);
+
+    // *** IPersist methods ***
+    virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
+
+    // *** IPersistFolder methods ***
+    virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidl);
+
+public:
+
+    DECLARE_REGISTRY_RESOURCEID(IDR_ACLISTISF)
+    DECLARE_NOT_AGGREGATABLE(CACListISF)
+
+    DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+    BEGIN_COM_MAP(CACListISF)
+        COM_INTERFACE_ENTRY_IID(IID_IEnumString, IEnumString)
+        COM_INTERFACE_ENTRY_IID(IID_IACList, IACList)
+        COM_INTERFACE_ENTRY_IID(IID_IACList2, IACList2)
+        COM_INTERFACE_ENTRY_IID(IID_IShellService, IShellService)
+        // Windows doesn't return this
+        //COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
+        COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder)
+    END_COM_MAP()
+};
index 26e248c..0d3070c 100644 (file)
@@ -29,6 +29,7 @@ public:
 BEGIN_OBJECT_MAP(ObjectMap)
 OBJECT_ENTRY(CLSID_AutoComplete, CAutoComplete)
 OBJECT_ENTRY(CLSID_ACLMulti, CACLMulti)
+OBJECT_ENTRY(CLSID_ACListISF, CACListISF)
 OBJECT_ENTRY(CLSID_SH_AddressBand, CAddressBand)
 OBJECT_ENTRY(CLSID_AddressEditBox, CAddressEditBox)
 OBJECT_ENTRY(CLSID_BandProxy, CBandProxy)
index 69424cf..854c625 100644 (file)
@@ -44,6 +44,7 @@ IDR_REGTREEOPTIONS REGISTRY "res/regtreeoptions.rgs"
 IDR_EXPLORERBAND REGISTRY "res/explorerband.rgs"
 IDR_PROGRESSDIALOG REGISTRY "res/progressdialog.rgs"
 IDR_AUTOCOMPLETE REGISTRY "res/autocomplete.rgs"
+IDR_ACLISTISF REGISTRY "res/shellautocomplete.rgs"
 
 #include <reactos/manifest_dll.rc>
 
index 603a6c7..d2ded2e 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "resource.h"
 
+#include "aclistisf.h"
 #include "aclmulti.h"
 #include "addressband.h"
 #include "addresseditbox.h"
diff --git a/reactos/dll/win32/browseui/res/shellautocomplete.rgs b/reactos/dll/win32/browseui/res/shellautocomplete.rgs
new file mode 100644 (file)
index 0000000..9cca111
--- /dev/null
@@ -0,0 +1,13 @@
+HKCR\r
+{\r
+       NoRemove CLSID\r
+       {\r
+               ForceRemove {03C036F1-A186-11D0-824A-00AA005B4383} = s 'ReactOS Shell AutoComplete List'\r
+               {\r
+                       InprocServer32 = s '%MODULE%'\r
+                       {\r
+                               val ThreadingModel = s 'Apartment'\r
+                       }\r
+               }\r
+       }\r
+}\r
index d5b8945..ad82428 100644 (file)
@@ -85,6 +85,7 @@
 #define IDR_EXPLORERBAND         139
 #define IDR_PROGRESSDIALOG       140
 #define IDR_AUTOCOMPLETE         141
+#define IDR_ACLISTISF            142
 
 #define IDS_SMALLICONS           12301
 #define IDS_LARGEICONS           12302
index e14f587..e50e9c2 100644 (file)
@@ -394,11 +394,7 @@ START_TEST(autocomplete)
     CoInitialize(NULL);
 
     test_ACLMulti();
-
-    if (!winetest_interactive)
-        skip("ROSTESTS-210: Skipping test_ACListISF().\n");
-    else
-        test_ACListISF();
+    test_ACListISF();
 
     CoUninitialize();
 }