quartz/tests: Add test for filter priority in IFilterGraph2_Render.
[wine/gsoc_dplay.git] / dlls / mshtml / omnavigator.c
bloba579333e82ed3c7a7657f106b885a74288b70f5d
1 /*
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
19 #include <stdarg.h>
21 #define COBJMACROS
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winuser.h"
26 #include "ole2.h"
28 #include "wine/debug.h"
30 #include "mshtml_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
34 typedef struct {
35 DispatchEx dispex;
36 const IOmNavigatorVtbl *lpIOmNavigatorVtbl;
38 LONG ref;
39 } OmNavigator;
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);
49 *ppv = NULL;
51 if(IsEqualGUID(&IID_IUnknown, riid)) {
52 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
53 *ppv = OMNAVIGATOR(This);
54 }else if(IsEqualGUID(&IID_IOmNavigator, riid)) {
55 TRACE("(%p)->(IID_IOmNavigator %p)\n", This, ppv);
56 *ppv = OMNAVIGATOR(This);
57 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
58 return *ppv ? S_OK : E_NOINTERFACE;
61 if(*ppv) {
62 IUnknown_AddRef((IUnknown*)*ppv);
63 return S_OK;
66 WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
67 return E_NOINTERFACE;
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);
77 return 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);
87 if(!ref)
88 heap_free(This);
90 return ref;
93 static HRESULT WINAPI OmNavigator_GetTypeInfoCount(IOmNavigator *iface, UINT *pctinfo)
95 OmNavigator *This = OMNAVIGATOR_THIS(iface);
96 FIXME("(%p)->(%p)\n", This, pctinfo);
97 return E_NOTIMPL;
100 static HRESULT WINAPI OmNavigator_GetTypeInfo(IOmNavigator *iface, UINT iTInfo,
101 LCID lcid, ITypeInfo **ppTInfo)
103 OmNavigator *This = OMNAVIGATOR_THIS(iface);
105 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), 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);
114 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
117 static HRESULT WINAPI OmNavigator_Invoke(IOmNavigator *iface, DISPID dispIdMember,
118 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
119 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
121 OmNavigator *This = OMNAVIGATOR_THIS(iface);
123 return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid, wFlags, pDispParams,
124 pVarResult, pExcepInfo, puArgErr);
127 static HRESULT WINAPI OmNavigator_get_appCodeName(IOmNavigator *iface, BSTR *p)
129 OmNavigator *This = OMNAVIGATOR_THIS(iface);
130 FIXME("(%p)->(%p)\n", This, p);
131 return E_NOTIMPL;
134 static HRESULT WINAPI OmNavigator_get_appName(IOmNavigator *iface, BSTR *p)
136 OmNavigator *This = OMNAVIGATOR_THIS(iface);
137 FIXME("(%p)->(%p)\n", This, p);
138 return E_NOTIMPL;
141 static HRESULT WINAPI OmNavigator_get_appVersion(IOmNavigator *iface, BSTR *p)
143 OmNavigator *This = OMNAVIGATOR_THIS(iface);
144 FIXME("(%p)->(%p)\n", This, p);
145 return E_NOTIMPL;
148 static HRESULT WINAPI OmNavigator_get_userAgent(IOmNavigator *iface, BSTR *p)
150 OmNavigator *This = OMNAVIGATOR_THIS(iface);
151 FIXME("(%p)->(%p)\n", This, p);
152 return E_NOTIMPL;
155 static HRESULT WINAPI OmNavigator_javaEnabled(IOmNavigator *iface, VARIANT_BOOL *enabled)
157 OmNavigator *This = OMNAVIGATOR_THIS(iface);
158 FIXME("(%p)->(%p)\n", This, enabled);
159 return E_NOTIMPL;
162 static HRESULT WINAPI OmNavigator_taintEnabled(IOmNavigator *iface, VARIANT_BOOL *enabled)
164 OmNavigator *This = OMNAVIGATOR_THIS(iface);
165 FIXME("(%p)->(%p)\n", This, enabled);
166 return E_NOTIMPL;
169 static HRESULT WINAPI OmNavigator_get_mimeTypes(IOmNavigator *iface, IHTMLMimeTypesCollection **p)
171 OmNavigator *This = OMNAVIGATOR_THIS(iface);
172 FIXME("(%p)->(%p)\n", This, p);
173 return E_NOTIMPL;
176 static HRESULT WINAPI OmNavigator_get_plugins(IOmNavigator *iface, IHTMLPluginsCollection **p)
178 OmNavigator *This = OMNAVIGATOR_THIS(iface);
179 FIXME("(%p)->(%p)\n", This, p);
180 return E_NOTIMPL;
183 static HRESULT WINAPI OmNavigator_get_cookieEnabled(IOmNavigator *iface, VARIANT_BOOL *p)
185 OmNavigator *This = OMNAVIGATOR_THIS(iface);
186 FIXME("(%p)->(%p)\n", This, p);
187 return E_NOTIMPL;
190 static HRESULT WINAPI OmNavigator_get_opsProfile(IOmNavigator *iface, IHTMLOpsProfile **p)
192 OmNavigator *This = OMNAVIGATOR_THIS(iface);
193 FIXME("(%p)->(%p)\n", This, p);
194 return E_NOTIMPL;
197 static HRESULT WINAPI OmNavigator_toString(IOmNavigator *iface, BSTR *String)
199 OmNavigator *This = OMNAVIGATOR_THIS(iface);
200 FIXME("(%p)->(%p)\n", This, String);
201 return E_NOTIMPL;
204 static HRESULT WINAPI OmNavigator_get_cpuClass(IOmNavigator *iface, BSTR *p)
206 OmNavigator *This = OMNAVIGATOR_THIS(iface);
207 FIXME("(%p)->(%p)\n", This, p);
208 return E_NOTIMPL;
211 static HRESULT WINAPI OmNavigator_get_systemLanguage(IOmNavigator *iface, BSTR *p)
213 OmNavigator *This = OMNAVIGATOR_THIS(iface);
214 FIXME("(%p)->(%p)\n", This, p);
215 return E_NOTIMPL;
218 static HRESULT WINAPI OmNavigator_get_browserLanguage(IOmNavigator *iface, BSTR *p)
220 OmNavigator *This = OMNAVIGATOR_THIS(iface);
221 FIXME("(%p)->(%p)\n", This, p);
222 return E_NOTIMPL;
225 static HRESULT WINAPI OmNavigator_get_userLanguage(IOmNavigator *iface, BSTR *p)
227 OmNavigator *This = OMNAVIGATOR_THIS(iface);
228 FIXME("(%p)->(%p)\n", This, p);
229 return E_NOTIMPL;
232 static HRESULT WINAPI OmNavigator_get_platform(IOmNavigator *iface, BSTR *p)
234 OmNavigator *This = OMNAVIGATOR_THIS(iface);
235 FIXME("(%p)->(%p)\n", This, p);
236 return E_NOTIMPL;
239 static HRESULT WINAPI OmNavigator_get_appMinorVersion(IOmNavigator *iface, BSTR *p)
241 OmNavigator *This = OMNAVIGATOR_THIS(iface);
242 FIXME("(%p)->(%p)\n", This, p);
243 return E_NOTIMPL;
246 static HRESULT WINAPI OmNavigator_get_connectionSpeed(IOmNavigator *iface, long *p)
248 OmNavigator *This = OMNAVIGATOR_THIS(iface);
249 FIXME("(%p)->(%p)\n", This, p);
250 return E_NOTIMPL;
253 static HRESULT WINAPI OmNavigator_get_onLine(IOmNavigator *iface, VARIANT_BOOL *p)
255 OmNavigator *This = OMNAVIGATOR_THIS(iface);
256 FIXME("(%p)->(%p)\n", This, p);
257 return E_NOTIMPL;
260 static HRESULT WINAPI OmNavigator_get_userProfile(IOmNavigator *iface, IHTMLOpsProfile **p)
262 OmNavigator *This = OMNAVIGATOR_THIS(iface);
263 FIXME("(%p)->(%p)\n", This, p);
264 return E_NOTIMPL;
267 #undef OMNAVIGATOR_THIS
269 static const IOmNavigatorVtbl OmNavigatorVtbl = {
270 OmNavigator_QueryInterface,
271 OmNavigator_AddRef,
272 OmNavigator_Release,
273 OmNavigator_GetTypeInfoCount,
274 OmNavigator_GetTypeInfo,
275 OmNavigator_GetIDsOfNames,
276 OmNavigator_Invoke,
277 OmNavigator_get_appCodeName,
278 OmNavigator_get_appName,
279 OmNavigator_get_appVersion,
280 OmNavigator_get_userAgent,
281 OmNavigator_javaEnabled,
282 OmNavigator_taintEnabled,
283 OmNavigator_get_mimeTypes,
284 OmNavigator_get_plugins,
285 OmNavigator_get_cookieEnabled,
286 OmNavigator_get_opsProfile,
287 OmNavigator_toString,
288 OmNavigator_get_cpuClass,
289 OmNavigator_get_systemLanguage,
290 OmNavigator_get_browserLanguage,
291 OmNavigator_get_userLanguage,
292 OmNavigator_get_platform,
293 OmNavigator_get_appMinorVersion,
294 OmNavigator_get_connectionSpeed,
295 OmNavigator_get_onLine,
296 OmNavigator_get_userProfile
299 static const tid_t OmNavigator_iface_tids[] = {
300 IOmNavigator_tid,
303 static dispex_static_data_t OmNavigator_dispex = {
304 NULL,
305 IOmNavigator_tid,
306 NULL,
307 OmNavigator_iface_tids
310 IOmNavigator *OmNavigator_Create(void)
312 OmNavigator *ret;
314 ret = heap_alloc_zero(sizeof(*ret));
315 ret->lpIOmNavigatorVtbl = &OmNavigatorVtbl;
316 ret->ref = 1;
318 init_dispex(&ret->dispex, (IUnknown*)OMNAVIGATOR(ret), &OmNavigator_dispex);
320 return OMNAVIGATOR(ret);