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);
36 const IOmNavigatorVtbl *lpIOmNavigatorVtbl;
41 #define OMNAVIGATOR(x) ((IOmNavigator*) &(x)->lpIOmNavigatorVtbl)
43 #define OMNAVIGATOR_THIS(iface) DEFINE_THIS(OmNavigator, IOmNavigator, iface)
45 static HRESULT WINAPI OmNavigator_QueryInterface(IOmNavigator *iface, REFIID riid, void **ppv)
47 OmNavigator *This = OMNAVIGATOR_THIS(iface);
51 if(IsEqualGUID(&IID_IUnknown, riid)) {
52 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
53 *ppv = OMNAVIGATOR(This);
54 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
55 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
56 *ppv = DISPATCHEX(&This->dispex);
57 }else if(IsEqualGUID(&IID_IDispatchEx, riid)) {
58 TRACE("(%p)->(IID_IDispatchEx %p)\n", This, ppv);
59 *ppv = DISPATCHEX(&This->dispex);
60 }else if(IsEqualGUID(&IID_IOmNavigator, riid)) {
61 TRACE("(%p)->(IID_IOmNavigator %p)\n", This, ppv);
62 *ppv = OMNAVIGATOR(This);
66 IUnknown_AddRef((IUnknown*)*ppv);
70 WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
74 static ULONG WINAPI OmNavigator_AddRef(IOmNavigator *iface)
76 OmNavigator *This = OMNAVIGATOR_THIS(iface);
77 LONG ref = InterlockedIncrement(&This->ref);
79 TRACE("(%p) ref=%d\n", This, ref);
84 static ULONG WINAPI OmNavigator_Release(IOmNavigator *iface)
86 OmNavigator *This = OMNAVIGATOR_THIS(iface);
87 LONG ref = InterlockedDecrement(&This->ref);
89 TRACE("(%p) ref=%d\n", This, ref);
97 static HRESULT WINAPI OmNavigator_GetTypeInfoCount(IOmNavigator *iface, UINT *pctinfo)
99 OmNavigator *This = OMNAVIGATOR_THIS(iface);
100 FIXME("(%p)->(%p)\n", This, pctinfo);
104 static HRESULT WINAPI OmNavigator_GetTypeInfo(IOmNavigator *iface, UINT iTInfo,
105 LCID lcid, ITypeInfo **ppTInfo)
107 OmNavigator *This = OMNAVIGATOR_THIS(iface);
109 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
112 static HRESULT WINAPI OmNavigator_GetIDsOfNames(IOmNavigator *iface, REFIID riid,
113 LPOLESTR *rgszNames, UINT cNames,
114 LCID lcid, DISPID *rgDispId)
116 OmNavigator *This = OMNAVIGATOR_THIS(iface);
118 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
121 static HRESULT WINAPI OmNavigator_Invoke(IOmNavigator *iface, DISPID dispIdMember,
122 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
123 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
125 OmNavigator *This = OMNAVIGATOR_THIS(iface);
127 return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid, wFlags, pDispParams,
128 pVarResult, pExcepInfo, puArgErr);
131 static HRESULT WINAPI OmNavigator_get_appCodeName(IOmNavigator *iface, BSTR *p)
133 OmNavigator *This = OMNAVIGATOR_THIS(iface);
134 FIXME("(%p)->(%p)\n", This, p);
138 static HRESULT WINAPI OmNavigator_get_appName(IOmNavigator *iface, BSTR *p)
140 OmNavigator *This = OMNAVIGATOR_THIS(iface);
141 FIXME("(%p)->(%p)\n", This, p);
145 static HRESULT WINAPI OmNavigator_get_appVersion(IOmNavigator *iface, BSTR *p)
147 OmNavigator *This = OMNAVIGATOR_THIS(iface);
148 FIXME("(%p)->(%p)\n", This, p);
152 static HRESULT WINAPI OmNavigator_get_userAgent(IOmNavigator *iface, BSTR *p)
154 OmNavigator *This = OMNAVIGATOR_THIS(iface);
155 FIXME("(%p)->(%p)\n", This, p);
159 static HRESULT WINAPI OmNavigator_javaEnabled(IOmNavigator *iface, VARIANT_BOOL *enabled)
161 OmNavigator *This = OMNAVIGATOR_THIS(iface);
162 FIXME("(%p)->(%p)\n", This, enabled);
166 static HRESULT WINAPI OmNavigator_taintEnabled(IOmNavigator *iface, VARIANT_BOOL *enabled)
168 OmNavigator *This = OMNAVIGATOR_THIS(iface);
169 FIXME("(%p)->(%p)\n", This, enabled);
173 static HRESULT WINAPI OmNavigator_get_mimeTypes(IOmNavigator *iface, IHTMLMimeTypesCollection **p)
175 OmNavigator *This = OMNAVIGATOR_THIS(iface);
176 FIXME("(%p)->(%p)\n", This, p);
180 static HRESULT WINAPI OmNavigator_get_plugins(IOmNavigator *iface, IHTMLPluginsCollection **p)
182 OmNavigator *This = OMNAVIGATOR_THIS(iface);
183 FIXME("(%p)->(%p)\n", This, p);
187 static HRESULT WINAPI OmNavigator_get_cookieEnabled(IOmNavigator *iface, VARIANT_BOOL *p)
189 OmNavigator *This = OMNAVIGATOR_THIS(iface);
190 FIXME("(%p)->(%p)\n", This, p);
194 static HRESULT WINAPI OmNavigator_get_opsProfile(IOmNavigator *iface, IHTMLOpsProfile **p)
196 OmNavigator *This = OMNAVIGATOR_THIS(iface);
197 FIXME("(%p)->(%p)\n", This, p);
201 static HRESULT WINAPI OmNavigator_toString(IOmNavigator *iface, BSTR *String)
203 OmNavigator *This = OMNAVIGATOR_THIS(iface);
204 FIXME("(%p)->(%p)\n", This, String);
208 static HRESULT WINAPI OmNavigator_get_cpuClass(IOmNavigator *iface, BSTR *p)
210 OmNavigator *This = OMNAVIGATOR_THIS(iface);
211 FIXME("(%p)->(%p)\n", This, p);
215 static HRESULT WINAPI OmNavigator_get_systemLanguage(IOmNavigator *iface, BSTR *p)
217 OmNavigator *This = OMNAVIGATOR_THIS(iface);
218 FIXME("(%p)->(%p)\n", This, p);
222 static HRESULT WINAPI OmNavigator_get_browserLanguage(IOmNavigator *iface, BSTR *p)
224 OmNavigator *This = OMNAVIGATOR_THIS(iface);
225 FIXME("(%p)->(%p)\n", This, p);
229 static HRESULT WINAPI OmNavigator_get_userLanguage(IOmNavigator *iface, BSTR *p)
231 OmNavigator *This = OMNAVIGATOR_THIS(iface);
232 FIXME("(%p)->(%p)\n", This, p);
236 static HRESULT WINAPI OmNavigator_get_platform(IOmNavigator *iface, BSTR *p)
238 OmNavigator *This = OMNAVIGATOR_THIS(iface);
239 FIXME("(%p)->(%p)\n", This, p);
243 static HRESULT WINAPI OmNavigator_get_appMinorVersion(IOmNavigator *iface, BSTR *p)
245 OmNavigator *This = OMNAVIGATOR_THIS(iface);
246 FIXME("(%p)->(%p)\n", This, p);
250 static HRESULT WINAPI OmNavigator_get_connectionSpeed(IOmNavigator *iface, long *p)
252 OmNavigator *This = OMNAVIGATOR_THIS(iface);
253 FIXME("(%p)->(%p)\n", This, p);
257 static HRESULT WINAPI OmNavigator_get_onLine(IOmNavigator *iface, VARIANT_BOOL *p)
259 OmNavigator *This = OMNAVIGATOR_THIS(iface);
260 FIXME("(%p)->(%p)\n", This, p);
264 static HRESULT WINAPI OmNavigator_get_userProfile(IOmNavigator *iface, IHTMLOpsProfile **p)
266 OmNavigator *This = OMNAVIGATOR_THIS(iface);
267 FIXME("(%p)->(%p)\n", This, p);
271 #undef OMNAVIGATOR_THIS
273 static const IOmNavigatorVtbl OmNavigatorVtbl = {
274 OmNavigator_QueryInterface,
277 OmNavigator_GetTypeInfoCount,
278 OmNavigator_GetTypeInfo,
279 OmNavigator_GetIDsOfNames,
281 OmNavigator_get_appCodeName,
282 OmNavigator_get_appName,
283 OmNavigator_get_appVersion,
284 OmNavigator_get_userAgent,
285 OmNavigator_javaEnabled,
286 OmNavigator_taintEnabled,
287 OmNavigator_get_mimeTypes,
288 OmNavigator_get_plugins,
289 OmNavigator_get_cookieEnabled,
290 OmNavigator_get_opsProfile,
291 OmNavigator_toString,
292 OmNavigator_get_cpuClass,
293 OmNavigator_get_systemLanguage,
294 OmNavigator_get_browserLanguage,
295 OmNavigator_get_userLanguage,
296 OmNavigator_get_platform,
297 OmNavigator_get_appMinorVersion,
298 OmNavigator_get_connectionSpeed,
299 OmNavigator_get_onLine,
300 OmNavigator_get_userProfile
303 static dispex_static_data_t OmNavigator_dispex = {
313 IOmNavigator *OmNavigator_Create(void)
317 ret = heap_alloc(sizeof(*ret));
318 ret->lpIOmNavigatorVtbl = &OmNavigatorVtbl;
321 init_dispex(&ret->dispex, (IUnknown*)OMNAVIGATOR(ret), &OmNavigator_dispex);
323 return OMNAVIGATOR(ret);