2 * Copyright 2008 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
28 #include "wine/debug.h"
30 #include "mshtml_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
35 const IOmNavigatorVtbl *lpIOmNavigatorVtbl;
40 #define OMNAVIGATOR(x) ((IOmNavigator*) &(x)->lpIOmNavigatorVtbl)
42 #define OMNAVIGATOR_THIS(iface) DEFINE_THIS(OmNavigator, IOmNavigator, iface)
44 static HRESULT WINAPI OmNavigator_QueryInterface(IOmNavigator *iface, REFIID riid, void **ppv)
46 OmNavigator *This = OMNAVIGATOR_THIS(iface);
50 if(IsEqualGUID(&IID_IUnknown, riid)) {
51 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
52 *ppv = OMNAVIGATOR(This);
53 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
54 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
55 *ppv = OMNAVIGATOR(This);
56 }else if(IsEqualGUID(&IID_IOmNavigator, riid)) {
57 TRACE("(%p)->(IID_IOmNavigator %p)\n", This, ppv);
58 *ppv = OMNAVIGATOR(This);
62 IUnknown_AddRef((IUnknown*)*ppv);
66 WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
70 static ULONG WINAPI OmNavigator_AddRef(IOmNavigator *iface)
72 OmNavigator *This = OMNAVIGATOR_THIS(iface);
73 LONG ref = InterlockedIncrement(&This->ref);
75 TRACE("(%p) ref=%d\n", This, ref);
80 static ULONG WINAPI OmNavigator_Release(IOmNavigator *iface)
82 OmNavigator *This = OMNAVIGATOR_THIS(iface);
83 LONG ref = InterlockedDecrement(&This->ref);
85 TRACE("(%p) ref=%d\n", This, ref);
93 static HRESULT WINAPI OmNavigator_GetTypeInfoCount(IOmNavigator *iface, UINT *pctinfo)
95 OmNavigator *This = OMNAVIGATOR_THIS(iface);
96 FIXME("(%p)->(%p)\n", This, pctinfo);
100 static HRESULT WINAPI OmNavigator_GetTypeInfo(IOmNavigator *iface, UINT iTInfo,
101 LCID lcid, ITypeInfo **ppTInfo)
103 OmNavigator *This = OMNAVIGATOR_THIS(iface);
104 FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
108 static HRESULT WINAPI OmNavigator_GetIDsOfNames(IOmNavigator *iface, REFIID riid,
109 LPOLESTR *rgszNames, UINT cNames,
110 LCID lcid, DISPID *rgDispId)
112 OmNavigator *This = OMNAVIGATOR_THIS(iface);
113 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
118 static HRESULT WINAPI OmNavigator_Invoke(IOmNavigator *iface, DISPID dispIdMember,
119 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
120 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
122 OmNavigator *This = OMNAVIGATOR_THIS(iface);
123 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
124 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
128 static HRESULT WINAPI OmNavigator_get_appCodeName(IOmNavigator *iface, BSTR *p)
130 OmNavigator *This = OMNAVIGATOR_THIS(iface);
131 FIXME("(%p)->(%p)\n", This, p);
135 static HRESULT WINAPI OmNavigator_get_appName(IOmNavigator *iface, BSTR *p)
137 OmNavigator *This = OMNAVIGATOR_THIS(iface);
138 FIXME("(%p)->(%p)\n", This, p);
142 static HRESULT WINAPI OmNavigator_get_appVersion(IOmNavigator *iface, BSTR *p)
144 OmNavigator *This = OMNAVIGATOR_THIS(iface);
145 FIXME("(%p)->(%p)\n", This, p);
149 static HRESULT WINAPI OmNavigator_get_userAgent(IOmNavigator *iface, BSTR *p)
151 OmNavigator *This = OMNAVIGATOR_THIS(iface);
152 FIXME("(%p)->(%p)\n", This, p);
156 static HRESULT WINAPI OmNavigator_javaEnabled(IOmNavigator *iface, VARIANT_BOOL *enabled)
158 OmNavigator *This = OMNAVIGATOR_THIS(iface);
159 FIXME("(%p)->(%p)\n", This, enabled);
163 static HRESULT WINAPI OmNavigator_taintEnabled(IOmNavigator *iface, VARIANT_BOOL *enabled)
165 OmNavigator *This = OMNAVIGATOR_THIS(iface);
166 FIXME("(%p)->(%p)\n", This, enabled);
170 static HRESULT WINAPI OmNavigator_get_mimeTypes(IOmNavigator *iface, IHTMLMimeTypesCollection **p)
172 OmNavigator *This = OMNAVIGATOR_THIS(iface);
173 FIXME("(%p)->(%p)\n", This, p);
177 static HRESULT WINAPI OmNavigator_get_plugins(IOmNavigator *iface, IHTMLPluginsCollection **p)
179 OmNavigator *This = OMNAVIGATOR_THIS(iface);
180 FIXME("(%p)->(%p)\n", This, p);
184 static HRESULT WINAPI OmNavigator_get_cookieEnabled(IOmNavigator *iface, VARIANT_BOOL *p)
186 OmNavigator *This = OMNAVIGATOR_THIS(iface);
187 FIXME("(%p)->(%p)\n", This, p);
191 static HRESULT WINAPI OmNavigator_get_opsProfile(IOmNavigator *iface, IHTMLOpsProfile **p)
193 OmNavigator *This = OMNAVIGATOR_THIS(iface);
194 FIXME("(%p)->(%p)\n", This, p);
198 static HRESULT WINAPI OmNavigator_toString(IOmNavigator *iface, BSTR *String)
200 OmNavigator *This = OMNAVIGATOR_THIS(iface);
201 FIXME("(%p)->(%p)\n", This, String);
205 static HRESULT WINAPI OmNavigator_get_cpuClass(IOmNavigator *iface, BSTR *p)
207 OmNavigator *This = OMNAVIGATOR_THIS(iface);
208 FIXME("(%p)->(%p)\n", This, p);
212 static HRESULT WINAPI OmNavigator_get_systemLanguage(IOmNavigator *iface, BSTR *p)
214 OmNavigator *This = OMNAVIGATOR_THIS(iface);
215 FIXME("(%p)->(%p)\n", This, p);
219 static HRESULT WINAPI OmNavigator_get_browserLanguage(IOmNavigator *iface, BSTR *p)
221 OmNavigator *This = OMNAVIGATOR_THIS(iface);
222 FIXME("(%p)->(%p)\n", This, p);
226 static HRESULT WINAPI OmNavigator_get_userLanguage(IOmNavigator *iface, BSTR *p)
228 OmNavigator *This = OMNAVIGATOR_THIS(iface);
229 FIXME("(%p)->(%p)\n", This, p);
233 static HRESULT WINAPI OmNavigator_get_platform(IOmNavigator *iface, BSTR *p)
235 OmNavigator *This = OMNAVIGATOR_THIS(iface);
236 FIXME("(%p)->(%p)\n", This, p);
240 static HRESULT WINAPI OmNavigator_get_appMinorVersion(IOmNavigator *iface, BSTR *p)
242 OmNavigator *This = OMNAVIGATOR_THIS(iface);
243 FIXME("(%p)->(%p)\n", This, p);
247 static HRESULT WINAPI OmNavigator_get_connectionSpeed(IOmNavigator *iface, long *p)
249 OmNavigator *This = OMNAVIGATOR_THIS(iface);
250 FIXME("(%p)->(%p)\n", This, p);
254 static HRESULT WINAPI OmNavigator_get_onLine(IOmNavigator *iface, VARIANT_BOOL *p)
256 OmNavigator *This = OMNAVIGATOR_THIS(iface);
257 FIXME("(%p)->(%p)\n", This, p);
261 static HRESULT WINAPI OmNavigator_get_userProfile(IOmNavigator *iface, IHTMLOpsProfile **p)
263 OmNavigator *This = OMNAVIGATOR_THIS(iface);
264 FIXME("(%p)->(%p)\n", This, p);
268 #undef OMNAVIGATOR_THIS
270 static const IOmNavigatorVtbl OmNavigatorVtbl = {
271 OmNavigator_QueryInterface,
274 OmNavigator_GetTypeInfoCount,
275 OmNavigator_GetTypeInfo,
276 OmNavigator_GetIDsOfNames,
278 OmNavigator_get_appCodeName,
279 OmNavigator_get_appName,
280 OmNavigator_get_appVersion,
281 OmNavigator_get_userAgent,
282 OmNavigator_javaEnabled,
283 OmNavigator_taintEnabled,
284 OmNavigator_get_mimeTypes,
285 OmNavigator_get_plugins,
286 OmNavigator_get_cookieEnabled,
287 OmNavigator_get_opsProfile,
288 OmNavigator_toString,
289 OmNavigator_get_cpuClass,
290 OmNavigator_get_systemLanguage,
291 OmNavigator_get_browserLanguage,
292 OmNavigator_get_userLanguage,
293 OmNavigator_get_platform,
294 OmNavigator_get_appMinorVersion,
295 OmNavigator_get_connectionSpeed,
296 OmNavigator_get_onLine,
297 OmNavigator_get_userProfile
300 IOmNavigator *OmNavigator_Create(void)
304 ret = heap_alloc(sizeof(*ret));
305 ret->lpIOmNavigatorVtbl = &OmNavigatorVtbl;
308 return OMNAVIGATOR(ret);