2 * Copyright 2016 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 #include "wine/debug.h"
27 WINE_DEFAULT_DEBUG_CHANNEL(wpc
);
29 static HRESULT WINAPI
WindowsParentalControls_QueryInterface(IWindowsParentalControls
*iface
, REFIID riid
, void **ppv
)
31 if(IsEqualGUID(riid
, &IID_IUnknown
)) {
32 TRACE("(IID_IUnknown %p)\n", ppv
);
34 }else if(IsEqualGUID(riid
, &IID_IWindowsParentalControlsCore
)) {
35 TRACE("(IID_IWindowsParentalControlsCore %p)\n", ppv
);
37 }else if(IsEqualGUID(riid
, &IID_IWindowsParentalControls
)) {
38 TRACE("(IID_IWindowsParentalControls %p)\n", ppv
);
41 FIXME("unsupported iface %s\n", debugstr_guid(riid
));
46 IUnknown_AddRef((IUnknown
*)*ppv
);
50 static ULONG WINAPI
WindowsParentalControls_AddRef(IWindowsParentalControls
*iface
)
55 static ULONG WINAPI
WindowsParentalControls_Release(IWindowsParentalControls
*iface
)
60 static HRESULT WINAPI
WindowsParentalControls_GetVisibility(IWindowsParentalControls
*iface
, WPCFLAG_VISIBILITY
*visibility
)
62 FIXME("(%p)\n", visibility
);
66 static HRESULT WINAPI
WindowsParentalControls_GetUserSettings(IWindowsParentalControls
*iface
, const WCHAR
*sid
, IWPCSettings
**settings
)
68 FIXME("(%s %p)\n", debugstr_w(sid
), settings
);
72 static HRESULT WINAPI
WindowsParentalControls_GetWebSettings(IWindowsParentalControls
*iface
, const WCHAR
*sid
, IWPCWebSettings
**settings
)
74 FIXME("(%s %p)\n", debugstr_w(sid
), settings
);
78 static HRESULT WINAPI
WindowsParentalControls_GetWebFilterInfo(IWindowsParentalControls
*iface
, GUID
*id
, WCHAR
**name
)
80 FIXME("(%p %p)\n", id
, name
);
84 static HRESULT WINAPI
WindowsParentalControls_GetGamesSettings(IWindowsParentalControls
*iface
, const WCHAR
*sid
, IWPCGamesSettings
**settings
)
86 FIXME("(%s %p)\n", debugstr_w(sid
), settings
);
90 static const IWindowsParentalControlsVtbl WindowsParentalControlsVtbl
= {
91 WindowsParentalControls_QueryInterface
,
92 WindowsParentalControls_AddRef
,
93 WindowsParentalControls_Release
,
94 WindowsParentalControls_GetVisibility
,
95 WindowsParentalControls_GetUserSettings
,
96 WindowsParentalControls_GetWebSettings
,
97 WindowsParentalControls_GetWebFilterInfo
,
98 WindowsParentalControls_GetGamesSettings
101 static HRESULT WINAPI
WindowsParentalControls_CreateInstance(IClassFactory
*iface
, IUnknown
*outer
, REFIID riid
, void **ppv
)
103 static IWindowsParentalControls wpc
= { &WindowsParentalControlsVtbl
};
105 TRACE("(%p %s %p)\n", outer
, debugstr_guid(riid
), ppv
);
107 return IWindowsParentalControls_QueryInterface(&wpc
, riid
, ppv
);
110 static HRESULT WINAPI
ClassFactory_QueryInterface(IClassFactory
*iface
, REFIID riid
, void **ppv
)
114 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
115 TRACE("(%p)->(IID_IUnknown %p)\n", iface
, ppv
);
117 }else if(IsEqualGUID(&IID_IClassFactory
, riid
)) {
118 TRACE("(%p)->(IID_IClassFactory %p)\n", iface
, ppv
);
123 IUnknown_AddRef((IUnknown
*)*ppv
);
127 FIXME("(%p)->(%s %p)\n", iface
, debugstr_guid(riid
), ppv
);
128 return E_NOINTERFACE
;
131 static ULONG WINAPI
ClassFactory_AddRef(IClassFactory
*iface
)
133 TRACE("(%p)\n", iface
);
137 static ULONG WINAPI
ClassFactory_Release(IClassFactory
*iface
)
139 TRACE("(%p)\n", iface
);
143 static HRESULT WINAPI
ClassFactory_LockServer(IClassFactory
*iface
, BOOL fLock
)
145 TRACE("(%p)->(%x)\n", iface
, fLock
);
149 static const IClassFactoryVtbl WPCFactoryVtbl
= {
150 ClassFactory_QueryInterface
,
152 ClassFactory_Release
,
153 WindowsParentalControls_CreateInstance
,
154 ClassFactory_LockServer
157 static IClassFactory WPCFactory
= { &WPCFactoryVtbl
};
159 /***********************************************************************
160 * DllGetClassObject (wpc.@)
162 HRESULT WINAPI
DllGetClassObject(REFCLSID rclsid
, REFIID riid
, void **ppv
)
164 if(IsEqualGUID(&CLSID_WindowsParentalControls
, rclsid
)) {
165 TRACE("(CLSID_WindowsParentalControls %s %p)\n", debugstr_guid(riid
), ppv
);
166 return IClassFactory_QueryInterface(&WPCFactory
, riid
, ppv
);
169 FIXME("Unknown object %s (iface %s)\n", debugstr_guid(rclsid
), debugstr_guid(riid
));
170 return CLASS_E_CLASSNOTAVAILABLE
;