Jacek Caban : wpc: Added IWindowsParentalControls stub implementation.
Alexandre Julliard
julliard at winehq.org
Wed Aug 24 12:05:17 CDT 2016
Module: wine
Branch: master
Commit: fec49b9af6160b3f3008ca069c116b0d1a76cc8d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fec49b9af6160b3f3008ca069c116b0d1a76cc8d
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Aug 24 12:40:42 2016 +0200
wpc: Added IWindowsParentalControls stub implementation.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wpc/tests/wpc.c | 2 +-
dlls/wpc/wpc.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 78 insertions(+), 3 deletions(-)
diff --git a/dlls/wpc/tests/wpc.c b/dlls/wpc/tests/wpc.c
index 9fcc3f2..2cf35cc 100644
--- a/dlls/wpc/tests/wpc.c
+++ b/dlls/wpc/tests/wpc.c
@@ -32,7 +32,7 @@ static void test_wpc(void)
if(hres == REGDB_E_CLASSNOTREG)
win_skip("CLSID_WindowsParentalControls not registered\n");
else
- todo_wine ok(hres == S_OK, "Could not create CLSID_WindowsParentalControls instance: %08x\n", hres);
+ ok(hres == S_OK, "Could not create CLSID_WindowsParentalControls instance: %08x\n", hres);
if(FAILED(hres))
return;
diff --git a/dlls/wpc/wpc.c b/dlls/wpc/wpc.c
index 20db3fc..10468e9 100644
--- a/dlls/wpc/wpc.c
+++ b/dlls/wpc/wpc.c
@@ -28,12 +28,87 @@ WINE_DEFAULT_DEBUG_CHANNEL(wpc);
static HINSTANCE wpc_instance;
-static HRESULT WINAPI WindowsParentalControls_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
+static HRESULT WINAPI WindowsParentalControls_QueryInterface(IWindowsParentalControls *iface, REFIID riid, void **ppv)
+{
+ if(IsEqualGUID(riid, &IID_IUnknown)) {
+ TRACE("(IID_IUnknown %p)\n", ppv);
+ *ppv = iface;
+ }else if(IsEqualGUID(riid, &IID_IWindowsParentalControlsCore)) {
+ TRACE("(IID_IWindowsParentalControlsCore %p)\n", ppv);
+ *ppv = iface;
+ }else if(IsEqualGUID(riid, &IID_IWindowsParentalControls)) {
+ TRACE("(IID_IWindowsParentalControls %p)\n", ppv);
+ *ppv = iface;
+ }else {
+ FIXME("unsupported iface %s\n", debugstr_guid(riid));
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }
+
+ IUnknown_AddRef((IUnknown*)*ppv);
+ return S_OK;
+}
+
+static ULONG WINAPI WindowsParentalControls_AddRef(IWindowsParentalControls *iface)
+{
+ return 2;
+}
+
+static ULONG WINAPI WindowsParentalControls_Release(IWindowsParentalControls *iface)
+{
+ return 1;
+}
+
+static HRESULT WINAPI WindowsParentalControls_GetVisibility(IWindowsParentalControls *iface, WPCFLAG_VISIBILITY *visibility)
+{
+ FIXME("(%p)\n", visibility);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI WindowsParentalControls_GetUserSettings(IWindowsParentalControls *iface, const WCHAR *sid, IWPCSettings **settings)
+{
+ FIXME("(%s %p)\n", debugstr_w(sid), settings);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI WindowsParentalControls_GetWebSettings(IWindowsParentalControls *iface, const WCHAR *sid, IWPCWebSettings **settings)
{
- FIXME("(%s %p %p)\n", debugstr_guid(riid), outer, ppv);
+ FIXME("(%s %p)\n", debugstr_w(sid), settings);
return E_NOTIMPL;
}
+static HRESULT WINAPI WindowsParentalControls_GetWebFilterInfo(IWindowsParentalControls *iface, GUID *id, WCHAR **name)
+{
+ FIXME("(%p %p)\n", id, name);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI WindowsParentalControls_GetGamesSettings(IWindowsParentalControls *iface, const WCHAR *sid, IWPCGamesSettings **settings)
+{
+ FIXME("(%s %p)\n", debugstr_w(sid), settings);
+ return E_NOTIMPL;
+}
+
+static const IWindowsParentalControlsVtbl WindowsParentalControlsVtbl = {
+ WindowsParentalControls_QueryInterface,
+ WindowsParentalControls_AddRef,
+ WindowsParentalControls_Release,
+ WindowsParentalControls_GetVisibility,
+ WindowsParentalControls_GetUserSettings,
+ WindowsParentalControls_GetWebSettings,
+ WindowsParentalControls_GetWebFilterInfo,
+ WindowsParentalControls_GetGamesSettings
+};
+
+static HRESULT WINAPI WindowsParentalControls_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
+{
+ static IWindowsParentalControls wpc = { &WindowsParentalControlsVtbl };
+
+ TRACE("(%s %p %p)\n", debugstr_guid(riid), outer, ppv);
+
+ return IWindowsParentalControls_QueryInterface(&wpc, riid, ppv);
+}
+
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
{
*ppv = NULL;
More information about the wine-cvs
mailing list