ReactOS 0.4.15-dev-7931-gfd331f1
mxnamespace.c
Go to the documentation of this file.
1/*
2 * IMXNamespaceManager implementation
3 *
4 * Copyright 2011-2012 Nikolay Sivov for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#define COBJMACROS
22
23#include "config.h"
24
25#include <stdarg.h>
26#ifdef HAVE_LIBXML2
27# include <libxml/parser.h>
28# include <libxml/xmlerror.h>
29# include <libxml/encoding.h>
30#endif
31
32#include "windef.h"
33#include "winbase.h"
34#include "winuser.h"
35#include "ole2.h"
36#include "msxml6.h"
37
38#include "msxml_private.h"
39
40#include "wine/debug.h"
41
43
44struct ns
45{
48};
49
51{
52 struct list entry;
53
54 struct ns *ns;
55 int count;
57};
58
59#define DEFAULT_PREFIX_ALLOC_COUNT 16
60
61static const WCHAR xmlW[] = {'x','m','l',0};
62static const WCHAR xmluriW[] = {'h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g',
63 '/','X','M','L','/','1','9','9','8','/','n','a','m','e','s','p','a','c','e',0};
64
65typedef struct
66{
68 IMXNamespaceManager IMXNamespaceManager_iface;
69 IVBMXNamespaceManager IVBMXNamespaceManager_iface;
71
72 struct list ctxts;
73
74 VARIANT_BOOL override;
76
77static inline namespacemanager *impl_from_IMXNamespaceManager( IMXNamespaceManager *iface )
78{
79 return CONTAINING_RECORD(iface, namespacemanager, IMXNamespaceManager_iface);
80}
81
82static inline namespacemanager *impl_from_IVBMXNamespaceManager( IVBMXNamespaceManager *iface )
83{
84 return CONTAINING_RECORD(iface, namespacemanager, IVBMXNamespaceManager_iface);
85}
86
87static HRESULT declare_prefix(namespacemanager *This, const WCHAR *prefix, const WCHAR *uri)
88{
89 struct nscontext *ctxt = LIST_ENTRY(list_head(&This->ctxts), struct nscontext, entry);
90 static const WCHAR emptyW[] = {0};
91 struct ns *ns;
92 int i;
93
94 if (ctxt->count == ctxt->max_alloc)
95 {
96 ctxt->max_alloc *= 2;
97 ctxt->ns = heap_realloc(ctxt->ns, ctxt->max_alloc*sizeof(*ctxt->ns));
98 }
99
100 if (!prefix) prefix = emptyW;
101
102 ns = NULL;
103 for (i = 0; i < ctxt->count; i++)
104 if (!strcmpW(ctxt->ns[i].prefix, prefix))
105 {
106 ns = &ctxt->ns[i];
107 break;
108 }
109
110 if (ns)
111 {
112 if (This->override == VARIANT_TRUE)
113 {
116 return S_FALSE;
117 }
118 else
119 return E_FAIL;
120 }
121 else
122 {
123 ctxt->ns[ctxt->count].prefix = SysAllocString(prefix);
124 ctxt->ns[ctxt->count].uri = SysAllocString(uri);
125 ctxt->count++;
126 }
127
128 return S_OK;
129}
130
131/* returned stored pointer, caller needs to copy it */
133{
134 *prefix = NULL;
135
136 if (index >= ctxt->count || index < 0) return E_FAIL;
137
138 if (index > 0) index = ctxt->count - index;
139 *prefix = ctxt->ns[index].prefix;
140
141 return S_OK;
142}
143
144/* returned stored pointer, caller needs to copy it */
145static HRESULT get_declared_prefix_uri(const struct list *ctxts, const WCHAR *uri, BSTR *prefix)
146{
147 struct nscontext *ctxt;
148
149 LIST_FOR_EACH_ENTRY(ctxt, ctxts, struct nscontext, entry)
150 {
151 int i;
152 for (i = 0; i < ctxt->count; i++)
153 if (!strcmpW(ctxt->ns[i].uri, uri))
154 {
155 *prefix = ctxt->ns[i].prefix;
156 return S_OK;
157 }
158 }
159
160 *prefix = NULL;
161 return E_FAIL;
162}
163
164static HRESULT get_uri_from_prefix(const struct nscontext *ctxt, const WCHAR *prefix, BSTR *uri)
165{
166 int i;
167
168 for (i = 0; i < ctxt->count; i++)
169 if (!strcmpW(ctxt->ns[i].prefix, prefix))
170 {
171 *uri = ctxt->ns[i].uri;
172 return S_OK;
173 }
174
175 *uri = NULL;
176 return S_FALSE;
177}
178
179static struct nscontext* alloc_ns_context(void)
180{
181 struct nscontext *ctxt;
182
183 ctxt = heap_alloc(sizeof(*ctxt));
184 if (!ctxt) return NULL;
185
186 ctxt->count = 0;
188 ctxt->ns = heap_alloc(ctxt->max_alloc*sizeof(*ctxt->ns));
189 if (!ctxt->ns)
190 {
191 heap_free(ctxt);
192 return NULL;
193 }
194
195 /* first allocated prefix is always 'xml' */
196 ctxt->ns[0].prefix = SysAllocString(xmlW);
197 ctxt->ns[0].uri = SysAllocString(xmluriW);
198 ctxt->count++;
199 if (!ctxt->ns[0].prefix || !ctxt->ns[0].uri)
200 {
201 heap_free(ctxt->ns);
202 heap_free(ctxt);
203 return NULL;
204 }
205
206 return ctxt;
207}
208
209static void free_ns_context(struct nscontext *ctxt)
210{
211 int i;
212
213 for (i = 0; i < ctxt->count; i++)
214 {
215 SysFreeString(ctxt->ns[i].prefix);
216 SysFreeString(ctxt->ns[i].uri);
217 }
218
219 heap_free(ctxt->ns);
220 heap_free(ctxt);
221}
222
223static HRESULT WINAPI namespacemanager_QueryInterface(IMXNamespaceManager *iface, REFIID riid, void **ppvObject)
224{
226 return IVBMXNamespaceManager_QueryInterface(&This->IVBMXNamespaceManager_iface, riid, ppvObject);
227}
228
229static ULONG WINAPI namespacemanager_AddRef(IMXNamespaceManager *iface)
230{
232 return IVBMXNamespaceManager_AddRef(&This->IVBMXNamespaceManager_iface);
233}
234
235static ULONG WINAPI namespacemanager_Release(IMXNamespaceManager *iface)
236{
238 return IVBMXNamespaceManager_Release(&This->IVBMXNamespaceManager_iface);
239}
240
241static HRESULT WINAPI namespacemanager_putAllowOverride(IMXNamespaceManager *iface,
242 VARIANT_BOOL override)
243{
245 return IVBMXNamespaceManager_put_allowOverride(&This->IVBMXNamespaceManager_iface, override);
246}
247
248static HRESULT WINAPI namespacemanager_getAllowOverride(IMXNamespaceManager *iface,
249 VARIANT_BOOL *override)
250{
252 return IVBMXNamespaceManager_get_allowOverride(&This->IVBMXNamespaceManager_iface, override);
253}
254
255static HRESULT WINAPI namespacemanager_reset(IMXNamespaceManager *iface)
256{
258 return IVBMXNamespaceManager_reset(&This->IVBMXNamespaceManager_iface);
259}
260
261static HRESULT WINAPI namespacemanager_pushContext(IMXNamespaceManager *iface)
262{
264 return IVBMXNamespaceManager_pushContext(&This->IVBMXNamespaceManager_iface);
265}
266
267static HRESULT WINAPI namespacemanager_pushNodeContext(IMXNamespaceManager *iface,
269{
271 return IVBMXNamespaceManager_pushNodeContext(&This->IVBMXNamespaceManager_iface, node, deep);
272}
273
274static HRESULT WINAPI namespacemanager_popContext(IMXNamespaceManager *iface)
275{
277 return IVBMXNamespaceManager_popContext(&This->IVBMXNamespaceManager_iface);
278}
279
280static HRESULT WINAPI namespacemanager_declarePrefix(IMXNamespaceManager *iface,
281 const WCHAR *prefix, const WCHAR *namespaceURI)
282{
283 static const WCHAR xmlnsW[] = {'x','m','l','n','s',0};
284
286
287 TRACE("(%p)->(%s %s)\n", This, debugstr_w(prefix), debugstr_w(namespaceURI));
288
289 if (prefix && (!strcmpW(prefix, xmlW) || !strcmpW(prefix, xmlnsW) || !namespaceURI))
290 return E_INVALIDARG;
291
292 return declare_prefix(This, prefix, namespaceURI);
293}
294
295static HRESULT WINAPI namespacemanager_getDeclaredPrefix(IMXNamespaceManager *iface,
296 LONG index, WCHAR *prefix, int *prefix_len)
297{
299 struct nscontext *ctxt;
300 HRESULT hr;
301 BSTR prfx;
302
303 TRACE("(%p)->(%d %p %p)\n", This, index, prefix, prefix_len);
304
305 if (!prefix_len) return E_POINTER;
306
307 ctxt = LIST_ENTRY(list_head(&This->ctxts), struct nscontext, entry);
308 hr = get_declared_prefix_idx(ctxt, index, &prfx);
309 if (hr != S_OK) return hr;
310
311 if (prefix)
312 {
313 if (*prefix_len < (INT)SysStringLen(prfx)) return E_XML_BUFFERTOOSMALL;
314 strcpyW(prefix, prfx);
315 }
316
317 *prefix_len = SysStringLen(prfx);
318
319 return S_OK;
320}
321
322static HRESULT WINAPI namespacemanager_getPrefix(IMXNamespaceManager *iface,
323 const WCHAR *uri, LONG index, WCHAR *prefix, int *prefix_len)
324{
326 HRESULT hr;
327 BSTR prfx;
328
329 TRACE("(%p)->(%s %d %p %p)\n", This, debugstr_w(uri), index, prefix, prefix_len);
330
331 if (!uri || !*uri || !prefix_len) return E_INVALIDARG;
332
333 hr = get_declared_prefix_uri(&This->ctxts, uri, &prfx);
334 if (hr == S_OK)
335 {
336 /* TODO: figure out what index argument is for */
337 if (index) return E_FAIL;
338
339 if (prefix)
340 {
341 if (*prefix_len < (INT)SysStringLen(prfx)) return E_XML_BUFFERTOOSMALL;
342 strcpyW(prefix, prfx);
343 }
344
345 *prefix_len = SysStringLen(prfx);
346 TRACE("prefix=%s\n", debugstr_w(prfx));
347 }
348
349 return hr;
350}
351
352static HRESULT WINAPI namespacemanager_getURI(IMXNamespaceManager *iface,
353 const WCHAR *prefix, IXMLDOMNode *node, WCHAR *uri, int *uri_len)
354{
356 struct nscontext *ctxt;
357 HRESULT hr;
358 BSTR urib;
359
360 TRACE("(%p)->(%s %p %p %p)\n", This, debugstr_w(prefix), node, uri, uri_len);
361
362 if (!prefix) return E_INVALIDARG;
363 if (!uri_len) return E_POINTER;
364
365 if (node)
366 {
367 FIXME("namespaces from DOM node not supported\n");
368 return E_NOTIMPL;
369 }
370
371 ctxt = LIST_ENTRY(list_head(&This->ctxts), struct nscontext, entry);
372 hr = get_uri_from_prefix(ctxt, prefix, &urib);
373 if (hr == S_OK)
374 {
375 if (uri)
376 {
377 if (*uri_len < (INT)SysStringLen(urib)) return E_XML_BUFFERTOOSMALL;
378 strcpyW(uri, urib);
379 }
380 }
381 else
382 if (uri) *uri = 0;
383
384 *uri_len = SysStringLen(urib);
385
386 return hr;
387}
388
389static const struct IMXNamespaceManagerVtbl MXNamespaceManagerVtbl =
390{
404};
405
406static HRESULT WINAPI vbnamespacemanager_QueryInterface(IVBMXNamespaceManager *iface, REFIID riid, void **obj)
407{
409 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj);
410
411 if ( IsEqualGUID( riid, &IID_IMXNamespaceManager) ||
413 {
414 *obj = &This->IMXNamespaceManager_iface;
415 }
416 else if ( IsEqualGUID( riid, &IID_IVBMXNamespaceManager) ||
418 {
419 *obj = &This->IVBMXNamespaceManager_iface;
420 }
421 else if (dispex_query_interface(&This->dispex, riid, obj))
422 {
423 return *obj ? S_OK : E_NOINTERFACE;
424 }
425 else
426 {
427 TRACE("Unsupported interface %s\n", debugstr_guid(riid));
428 *obj = NULL;
429 return E_NOINTERFACE;
430 }
431
432 IVBMXNamespaceManager_AddRef( iface );
433
434 return S_OK;
435}
436
437static ULONG WINAPI vbnamespacemanager_AddRef(IVBMXNamespaceManager *iface)
438{
441 TRACE("(%p)->(%u)\n", This, ref );
442 return ref;
443}
444
445static ULONG WINAPI vbnamespacemanager_Release(IVBMXNamespaceManager *iface)
446{
449
450 TRACE("(%p)->(%u)\n", This, ref );
451
452 if ( ref == 0 )
453 {
454 struct nscontext *ctxt, *ctxt2;
455
456 LIST_FOR_EACH_ENTRY_SAFE(ctxt, ctxt2, &This->ctxts, struct nscontext, entry)
457 {
458 list_remove(&ctxt->entry);
459 free_ns_context(ctxt);
460 }
461
462 heap_free( This );
463 }
464
465 return ref;
466}
467
468static HRESULT WINAPI vbnamespacemanager_GetTypeInfoCount(IVBMXNamespaceManager *iface, UINT *pctinfo)
469{
471 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
472}
473
474static HRESULT WINAPI vbnamespacemanager_GetTypeInfo(IVBMXNamespaceManager *iface, UINT iTInfo,
475 LCID lcid, ITypeInfo **ppTInfo)
476{
478 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface,
479 iTInfo, lcid, ppTInfo);
480}
481
482static HRESULT WINAPI vbnamespacemanager_GetIDsOfNames(IVBMXNamespaceManager *iface, REFIID riid,
483 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
484{
486 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface,
487 riid, rgszNames, cNames, lcid, rgDispId);
488}
489
490static HRESULT WINAPI vbnamespacemanager_Invoke(IVBMXNamespaceManager *iface, DISPID dispIdMember, REFIID riid,
491 LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
492 EXCEPINFO *pExcepInfo, UINT *puArgErr)
493{
495 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface,
496 dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
497}
498
499static HRESULT WINAPI vbnamespacemanager_put_allowOverride(IVBMXNamespaceManager *iface,
500 VARIANT_BOOL override)
501{
503
504 TRACE("(%p)->(%d)\n", This, override);
505 This->override = override;
506
507 return S_OK;
508}
509
510static HRESULT WINAPI vbnamespacemanager_get_allowOverride(IVBMXNamespaceManager *iface,
511 VARIANT_BOOL *override)
512{
514
515 TRACE("(%p)->(%p)\n", This, override);
516
517 if (!override) return E_POINTER;
518 *override = This->override;
519
520 return S_OK;
521}
522
523static HRESULT WINAPI vbnamespacemanager_reset(IVBMXNamespaceManager *iface)
524{
526 FIXME("(%p): stub\n", This);
527 return E_NOTIMPL;
528}
529
530static HRESULT WINAPI vbnamespacemanager_pushContext(IVBMXNamespaceManager *iface)
531{
533 struct nscontext *ctxt;
534
535 TRACE("(%p)\n", This);
536
537 ctxt = alloc_ns_context();
538 if (!ctxt) return E_OUTOFMEMORY;
539
540 list_add_head(&This->ctxts, &ctxt->entry);
541
542 return S_OK;
543}
544
545static HRESULT WINAPI vbnamespacemanager_pushNodeContext(IVBMXNamespaceManager *iface,
547{
549 FIXME("(%p)->(%p %d): stub\n", This, node, deep);
550 return E_NOTIMPL;
551}
552
553static HRESULT WINAPI vbnamespacemanager_popContext(IVBMXNamespaceManager *iface)
554{
556 const struct list *next;
557 struct nscontext *ctxt;
558
559 TRACE("(%p)\n", This);
560
561 next = list_next(&This->ctxts, list_head(&This->ctxts));
562 if (!next) return E_FAIL;
563
564 ctxt = LIST_ENTRY(list_head(&This->ctxts), struct nscontext, entry);
565 list_remove(list_head(&This->ctxts));
566
567 free_ns_context(ctxt);
568
569 return S_OK;
570}
571
572static HRESULT WINAPI vbnamespacemanager_declarePrefix(IVBMXNamespaceManager *iface,
573 BSTR prefix, BSTR namespaceURI)
574{
576 return IMXNamespaceManager_declarePrefix(&This->IMXNamespaceManager_iface, prefix, namespaceURI);
577}
578
579static HRESULT WINAPI vbnamespacemanager_getDeclaredPrefixes(IVBMXNamespaceManager *iface,
580 IMXNamespacePrefixes** prefixes)
581{
583 FIXME("(%p)->(%p): stub\n", This, prefixes);
584 return E_NOTIMPL;
585}
586
587static HRESULT WINAPI vbnamespacemanager_getPrefixes(IVBMXNamespaceManager *iface,
588 BSTR namespaceURI, IMXNamespacePrefixes** prefixes)
589{
591 FIXME("(%p)->(%s %p): stub\n", This, debugstr_w(namespaceURI), prefixes);
592 return E_NOTIMPL;
593}
594
595static HRESULT WINAPI vbnamespacemanager_getURI(IVBMXNamespaceManager *iface,
596 BSTR prefix, VARIANT* uri)
597{
599 FIXME("(%p)->(%s %p): stub\n", This, debugstr_w(prefix), uri);
600 return E_NOTIMPL;
601}
602
603static HRESULT WINAPI vbnamespacemanager_getURIFromNode(IVBMXNamespaceManager *iface,
604 BSTR prefix, IXMLDOMNode *node, VARIANT *uri)
605{
607 FIXME("(%p)->(%s %p %p): stub\n", This, debugstr_w(prefix), node, uri);
608 return E_NOTIMPL;
609}
610
611static const struct IVBMXNamespaceManagerVtbl VBMXNamespaceManagerVtbl =
612{
631};
632
635 0
636};
637
639 NULL,
641 NULL,
643};
644
646{
648 struct nscontext *ctxt;
649
650 TRACE("(%p)\n", obj);
651
652 This = heap_alloc( sizeof (*This) );
653 if( !This )
654 return E_OUTOFMEMORY;
655
656 This->IMXNamespaceManager_iface.lpVtbl = &MXNamespaceManagerVtbl;
657 This->IVBMXNamespaceManager_iface.lpVtbl = &VBMXNamespaceManagerVtbl;
658 This->ref = 1;
659 init_dispex(&This->dispex, (IUnknown*)&This->IVBMXNamespaceManager_iface, &namespacemanager_dispex);
660
661 list_init(&This->ctxts);
662 ctxt = alloc_ns_context();
663 if (!ctxt)
664 {
666 return E_OUTOFMEMORY;
667 }
668
669 list_add_head(&This->ctxts, &ctxt->entry);
670
671 This->override = VARIANT_TRUE;
672
673 *obj = &This->IMXNamespaceManager_iface;
674
675 TRACE("returning iface %p\n", *obj);
676
677 return S_OK;
678}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:71
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define index(s, c)
Definition: various.h:29
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76
static void list_init(struct list_entry *head)
Definition: list.h:51
const GUID IID_IUnknown
#define FIXME(fmt,...)
Definition: debug.h:111
Definition: list.h:37
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
OLECHAR * BSTR
Definition: compat.h:2293
short VARIANT_BOOL
Definition: compat.h:2290
static WCHAR xmlnsW[]
Definition: reader.c:228
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint index
Definition: glext.h:6031
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int prefixes
Definition: i386-dis.c:276
static const WCHAR emptyW[]
Definition: navigate.c:40
tid_t
Definition: ieframe.h:311
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
uint32_t entry
Definition: isohybrid.c:63
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:52
const char * uri
Definition: sec_mgr.c:1588
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
@ IVBMXNamespaceManager_tid
Definition: msxml_private.h:84
static HRESULT WINAPI vbnamespacemanager_getURI(IVBMXNamespaceManager *iface, BSTR prefix, VARIANT *uri)
Definition: mxnamespace.c:595
static const tid_t namespacemanager_iface_tids[]
Definition: mxnamespace.c:633
static HRESULT WINAPI vbnamespacemanager_pushNodeContext(IVBMXNamespaceManager *iface, IXMLDOMNode *node, VARIANT_BOOL deep)
Definition: mxnamespace.c:545
static const struct IVBMXNamespaceManagerVtbl VBMXNamespaceManagerVtbl
Definition: mxnamespace.c:611
static HRESULT WINAPI vbnamespacemanager_reset(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:523
static HRESULT WINAPI namespacemanager_pushContext(IMXNamespaceManager *iface)
Definition: mxnamespace.c:261
static HRESULT get_declared_prefix_uri(const struct list *ctxts, const WCHAR *uri, BSTR *prefix)
Definition: mxnamespace.c:145
static HRESULT WINAPI namespacemanager_getPrefix(IMXNamespaceManager *iface, const WCHAR *uri, LONG index, WCHAR *prefix, int *prefix_len)
Definition: mxnamespace.c:322
static HRESULT get_uri_from_prefix(const struct nscontext *ctxt, const WCHAR *prefix, BSTR *uri)
Definition: mxnamespace.c:164
static HRESULT WINAPI vbnamespacemanager_popContext(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:553
static HRESULT WINAPI vbnamespacemanager_pushContext(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:530
static HRESULT WINAPI vbnamespacemanager_getURIFromNode(IVBMXNamespaceManager *iface, BSTR prefix, IXMLDOMNode *node, VARIANT *uri)
Definition: mxnamespace.c:603
static const WCHAR xmluriW[]
Definition: mxnamespace.c:62
static HRESULT WINAPI namespacemanager_getURI(IMXNamespaceManager *iface, const WCHAR *prefix, IXMLDOMNode *node, WCHAR *uri, int *uri_len)
Definition: mxnamespace.c:352
static ULONG WINAPI vbnamespacemanager_AddRef(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:437
static HRESULT WINAPI namespacemanager_QueryInterface(IMXNamespaceManager *iface, REFIID riid, void **ppvObject)
Definition: mxnamespace.c:223
static HRESULT WINAPI vbnamespacemanager_get_allowOverride(IVBMXNamespaceManager *iface, VARIANT_BOOL *override)
Definition: mxnamespace.c:510
static HRESULT WINAPI vbnamespacemanager_put_allowOverride(IVBMXNamespaceManager *iface, VARIANT_BOOL override)
Definition: mxnamespace.c:499
static void free_ns_context(struct nscontext *ctxt)
Definition: mxnamespace.c:209
static struct nscontext * alloc_ns_context(void)
Definition: mxnamespace.c:179
static const struct IMXNamespaceManagerVtbl MXNamespaceManagerVtbl
Definition: mxnamespace.c:389
static HRESULT WINAPI vbnamespacemanager_getPrefixes(IVBMXNamespaceManager *iface, BSTR namespaceURI, IMXNamespacePrefixes **prefixes)
Definition: mxnamespace.c:587
HRESULT MXNamespaceManager_create(void **obj)
Definition: mxnamespace.c:645
static HRESULT WINAPI vbnamespacemanager_declarePrefix(IVBMXNamespaceManager *iface, BSTR prefix, BSTR namespaceURI)
Definition: mxnamespace.c:572
static HRESULT WINAPI vbnamespacemanager_GetTypeInfo(IVBMXNamespaceManager *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: mxnamespace.c:474
static ULONG WINAPI namespacemanager_Release(IMXNamespaceManager *iface)
Definition: mxnamespace.c:235
static HRESULT declare_prefix(namespacemanager *This, const WCHAR *prefix, const WCHAR *uri)
Definition: mxnamespace.c:87
static HRESULT get_declared_prefix_idx(const struct nscontext *ctxt, LONG index, BSTR *prefix)
Definition: mxnamespace.c:132
static HRESULT WINAPI namespacemanager_popContext(IMXNamespaceManager *iface)
Definition: mxnamespace.c:274
static ULONG WINAPI vbnamespacemanager_Release(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:445
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77
static HRESULT WINAPI namespacemanager_getDeclaredPrefix(IMXNamespaceManager *iface, LONG index, WCHAR *prefix, int *prefix_len)
Definition: mxnamespace.c:295
static HRESULT WINAPI namespacemanager_pushNodeContext(IMXNamespaceManager *iface, IXMLDOMNode *node, VARIANT_BOOL deep)
Definition: mxnamespace.c:267
static HRESULT WINAPI namespacemanager_declarePrefix(IMXNamespaceManager *iface, const WCHAR *prefix, const WCHAR *namespaceURI)
Definition: mxnamespace.c:280
static const WCHAR xmlW[]
Definition: mxnamespace.c:61
static HRESULT WINAPI namespacemanager_putAllowOverride(IMXNamespaceManager *iface, VARIANT_BOOL override)
Definition: mxnamespace.c:241
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82
static HRESULT WINAPI namespacemanager_reset(IMXNamespaceManager *iface)
Definition: mxnamespace.c:255
static dispex_static_data_t namespacemanager_dispex
Definition: mxnamespace.c:638
static HRESULT WINAPI vbnamespacemanager_GetIDsOfNames(IVBMXNamespaceManager *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: mxnamespace.c:482
static HRESULT WINAPI namespacemanager_getAllowOverride(IMXNamespaceManager *iface, VARIANT_BOOL *override)
Definition: mxnamespace.c:248
static ULONG WINAPI namespacemanager_AddRef(IMXNamespaceManager *iface)
Definition: mxnamespace.c:229
static HRESULT WINAPI vbnamespacemanager_GetTypeInfoCount(IVBMXNamespaceManager *iface, UINT *pctinfo)
Definition: mxnamespace.c:468
static HRESULT WINAPI vbnamespacemanager_QueryInterface(IVBMXNamespaceManager *iface, REFIID riid, void **obj)
Definition: mxnamespace.c:406
static HRESULT WINAPI vbnamespacemanager_Invoke(IVBMXNamespaceManager *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: mxnamespace.c:490
static HRESULT WINAPI vbnamespacemanager_getDeclaredPrefixes(IVBMXNamespaceManager *iface, IMXNamespacePrefixes **prefixes)
Definition: mxnamespace.c:579
#define DEFAULT_PREFIX_ALLOC_COUNT
Definition: mxnamespace.c:59
unsigned int UINT
Definition: ndis.h:50
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
const GUID IID_IDispatch
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
static unsigned __int64 next
Definition: rand_nt.c:6
#define strcmpW(s1, s2)
Definition: unicode.h:38
#define strcpyW(d, s)
Definition: unicode.h:29
DWORD LCID
Definition: nls.h:13
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
Definition: list.h:115
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
Definition: list.h:15
DispatchEx dispex
Definition: mxnamespace.c:67
IMXNamespaceManager IMXNamespaceManager_iface
Definition: mxnamespace.c:68
IVBMXNamespaceManager IVBMXNamespaceManager_iface
Definition: mxnamespace.c:69
Definition: mxnamespace.c:45
BSTR prefix
Definition: mxnamespace.c:46
BSTR uri
Definition: mxnamespace.c:47
struct ns * ns
Definition: mxnamespace.c:54
struct list entry
Definition: mxnamespace.c:52
int max_alloc
Definition: mxnamespace.c:56
Definition: send.c:48
#define LIST_ENTRY(type)
Definition: queue.h:175
int32_t INT
Definition: typedefs.h:58
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
Definition: dlist.c:348
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_POINTER
Definition: winerror.h:2365
__wchar_t WCHAR
Definition: xmlstorage.h:180