ReactOS  0.4.14-dev-583-g2a1ba2c
mxnamespace.c File Reference
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "msxml6.h"
#include "msxml_private.h"
#include "wine/debug.h"
Include dependency graph for mxnamespace.c:

Go to the source code of this file.

Classes

struct  ns
 
struct  nscontext
 
struct  namespacemanager
 

Macros

#define COBJMACROS
 
#define DEFAULT_PREFIX_ALLOC_COUNT   16
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msxml)
 
static namespacemanagerimpl_from_IMXNamespaceManager (IMXNamespaceManager *iface)
 
static namespacemanagerimpl_from_IVBMXNamespaceManager (IVBMXNamespaceManager *iface)
 
static HRESULT declare_prefix (namespacemanager *This, const WCHAR *prefix, const WCHAR *uri)
 
static HRESULT get_declared_prefix_idx (const struct nscontext *ctxt, LONG index, BSTR *prefix)
 
static HRESULT get_declared_prefix_uri (const struct list *ctxts, const WCHAR *uri, BSTR *prefix)
 
static HRESULT get_uri_from_prefix (const struct nscontext *ctxt, const WCHAR *prefix, BSTR *uri)
 
static struct nscontextalloc_ns_context (void)
 
static void free_ns_context (struct nscontext *ctxt)
 
static HRESULT WINAPI namespacemanager_QueryInterface (IMXNamespaceManager *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI namespacemanager_AddRef (IMXNamespaceManager *iface)
 
static ULONG WINAPI namespacemanager_Release (IMXNamespaceManager *iface)
 
static HRESULT WINAPI namespacemanager_putAllowOverride (IMXNamespaceManager *iface, VARIANT_BOOL override)
 
static HRESULT WINAPI namespacemanager_getAllowOverride (IMXNamespaceManager *iface, VARIANT_BOOL *override)
 
static HRESULT WINAPI namespacemanager_reset (IMXNamespaceManager *iface)
 
static HRESULT WINAPI namespacemanager_pushContext (IMXNamespaceManager *iface)
 
static HRESULT WINAPI namespacemanager_pushNodeContext (IMXNamespaceManager *iface, IXMLDOMNode *node, VARIANT_BOOL deep)
 
static HRESULT WINAPI namespacemanager_popContext (IMXNamespaceManager *iface)
 
static HRESULT WINAPI namespacemanager_declarePrefix (IMXNamespaceManager *iface, const WCHAR *prefix, const WCHAR *namespaceURI)
 
static HRESULT WINAPI namespacemanager_getDeclaredPrefix (IMXNamespaceManager *iface, LONG index, WCHAR *prefix, int *prefix_len)
 
static HRESULT WINAPI namespacemanager_getPrefix (IMXNamespaceManager *iface, const WCHAR *uri, LONG index, WCHAR *prefix, int *prefix_len)
 
static HRESULT WINAPI namespacemanager_getURI (IMXNamespaceManager *iface, const WCHAR *prefix, IXMLDOMNode *node, WCHAR *uri, int *uri_len)
 
static HRESULT WINAPI vbnamespacemanager_QueryInterface (IVBMXNamespaceManager *iface, REFIID riid, void **obj)
 
static ULONG WINAPI vbnamespacemanager_AddRef (IVBMXNamespaceManager *iface)
 
static ULONG WINAPI vbnamespacemanager_Release (IVBMXNamespaceManager *iface)
 
static HRESULT WINAPI vbnamespacemanager_GetTypeInfoCount (IVBMXNamespaceManager *iface, UINT *pctinfo)
 
static HRESULT WINAPI vbnamespacemanager_GetTypeInfo (IVBMXNamespaceManager *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI vbnamespacemanager_GetIDsOfNames (IVBMXNamespaceManager *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI vbnamespacemanager_Invoke (IVBMXNamespaceManager *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI vbnamespacemanager_put_allowOverride (IVBMXNamespaceManager *iface, VARIANT_BOOL override)
 
static HRESULT WINAPI vbnamespacemanager_get_allowOverride (IVBMXNamespaceManager *iface, VARIANT_BOOL *override)
 
static HRESULT WINAPI vbnamespacemanager_reset (IVBMXNamespaceManager *iface)
 
static HRESULT WINAPI vbnamespacemanager_pushContext (IVBMXNamespaceManager *iface)
 
static HRESULT WINAPI vbnamespacemanager_pushNodeContext (IVBMXNamespaceManager *iface, IXMLDOMNode *node, VARIANT_BOOL deep)
 
static HRESULT WINAPI vbnamespacemanager_popContext (IVBMXNamespaceManager *iface)
 
static HRESULT WINAPI vbnamespacemanager_declarePrefix (IVBMXNamespaceManager *iface, BSTR prefix, BSTR namespaceURI)
 
static HRESULT WINAPI vbnamespacemanager_getDeclaredPrefixes (IVBMXNamespaceManager *iface, IMXNamespacePrefixes **prefixes)
 
static HRESULT WINAPI vbnamespacemanager_getPrefixes (IVBMXNamespaceManager *iface, BSTR namespaceURI, IMXNamespacePrefixes **prefixes)
 
static HRESULT WINAPI vbnamespacemanager_getURI (IVBMXNamespaceManager *iface, BSTR prefix, VARIANT *uri)
 
static HRESULT WINAPI vbnamespacemanager_getURIFromNode (IVBMXNamespaceManager *iface, BSTR prefix, IXMLDOMNode *node, VARIANT *uri)
 
HRESULT MXNamespaceManager_create (void **obj)
 

Variables

static const WCHAR xmlW [] = {'x','m','l',0}
 
static const WCHAR xmluriW []
 
static const struct IMXNamespaceManagerVtbl MXNamespaceManagerVtbl
 
static const struct IVBMXNamespaceManagerVtbl VBMXNamespaceManagerVtbl
 
static const tid_t namespacemanager_iface_tids []
 
static dispex_static_data_t namespacemanager_dispex
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file mxnamespace.c.

◆ DEFAULT_PREFIX_ALLOC_COUNT

#define DEFAULT_PREFIX_ALLOC_COUNT   16

Definition at line 59 of file mxnamespace.c.

Function Documentation

◆ alloc_ns_context()

static struct nscontext* alloc_ns_context ( void  )
static

Definition at line 179 of file mxnamespace.c.

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 }
static const WCHAR xmluriW[]
Definition: mxnamespace.c:62
struct ns * ns
Definition: mxnamespace.c:54
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
int max_alloc
Definition: mxnamespace.c:56
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
static const WCHAR xmlW[]
Definition: mxnamespace.c:61
#define DEFAULT_PREFIX_ALLOC_COUNT
Definition: mxnamespace.c:59
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by MXNamespaceManager_create(), and vbnamespacemanager_pushContext().

◆ declare_prefix()

static HRESULT declare_prefix ( namespacemanager This,
const WCHAR prefix,
const WCHAR uri 
)
static

Definition at line 87 of file mxnamespace.c.

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  {
114  SysFreeString(ns->uri);
115  ns->uri = SysAllocString(uri);
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 }
BSTR uri
Definition: mxnamespace.c:47
struct ns * ns
Definition: mxnamespace.c:54
const char * uri
Definition: sec_mgr.c:1594
#define E_FAIL
Definition: ddrawi.h:102
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
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
int max_alloc
Definition: mxnamespace.c:56
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
__wchar_t WCHAR
Definition: xmlstorage.h:180
Definition: mxnamespace.c:44
uint32_t entry
Definition: isohybrid.c:63
BSTR prefix
Definition: mxnamespace.c:46
#define S_OK
Definition: intsafe.h:59
static const WCHAR emptyW[]
Definition: navigate.c:40
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
#define LIST_ENTRY(type)
Definition: queue.h:175

Referenced by namespacemanager_declarePrefix().

◆ free_ns_context()

static void free_ns_context ( struct nscontext ctxt)
static

Definition at line 209 of file mxnamespace.c.

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 }
struct ns * ns
Definition: mxnamespace.c:54
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
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by vbnamespacemanager_popContext(), and vbnamespacemanager_Release().

◆ get_declared_prefix_idx()

static HRESULT get_declared_prefix_idx ( const struct nscontext ctxt,
LONG  index,
BSTR prefix 
)
static

Definition at line 132 of file mxnamespace.c.

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 }
struct ns * ns
Definition: mxnamespace.c:54
#define E_FAIL
Definition: ddrawi.h:102
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
#define index(s, c)
Definition: various.h:29
BSTR prefix
Definition: mxnamespace.c:46
#define S_OK
Definition: intsafe.h:59

Referenced by namespacemanager_getDeclaredPrefix().

◆ get_declared_prefix_uri()

static HRESULT get_declared_prefix_uri ( const struct list ctxts,
const WCHAR uri,
BSTR prefix 
)
static

Definition at line 145 of file mxnamespace.c.

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 }
struct ns * ns
Definition: mxnamespace.c:54
const char * uri
Definition: sec_mgr.c:1594
#define E_FAIL
Definition: ddrawi.h:102
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
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
smooth NULL
Definition: ftsmooth.c:416
uint32_t entry
Definition: isohybrid.c:63
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229

Referenced by namespacemanager_getPrefix().

◆ get_uri_from_prefix()

static HRESULT get_uri_from_prefix ( const struct nscontext ctxt,
const WCHAR prefix,
BSTR uri 
)
static

Definition at line 164 of file mxnamespace.c.

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 }
struct ns * ns
Definition: mxnamespace.c:54
const char * uri
Definition: sec_mgr.c:1594
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
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229

Referenced by namespacemanager_getURI().

◆ impl_from_IMXNamespaceManager()

static namespacemanager* impl_from_IMXNamespaceManager ( IMXNamespaceManager *  iface)
inlinestatic

Definition at line 77 of file mxnamespace.c.

78 {
79  return CONTAINING_RECORD(iface, namespacemanager, IMXNamespaceManager_iface);
80 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by namespacemanager_AddRef(), namespacemanager_declarePrefix(), namespacemanager_getAllowOverride(), namespacemanager_getDeclaredPrefix(), namespacemanager_getPrefix(), namespacemanager_getURI(), namespacemanager_popContext(), namespacemanager_pushContext(), namespacemanager_pushNodeContext(), namespacemanager_putAllowOverride(), namespacemanager_QueryInterface(), namespacemanager_Release(), and namespacemanager_reset().

◆ impl_from_IVBMXNamespaceManager()

◆ MXNamespaceManager_create()

HRESULT MXNamespaceManager_create ( void **  obj)

Definition at line 645 of file mxnamespace.c.

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  {
665  heap_free(This);
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 const struct IMXNamespaceManagerVtbl MXNamespaceManagerVtbl
Definition: mxnamespace.c:389
struct list entry
Definition: mxnamespace.c:52
static struct nscontext * alloc_ns_context(void)
Definition: mxnamespace.c:179
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
Definition: list.h:96
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const struct IVBMXNamespaceManagerVtbl VBMXNamespaceManagerVtbl
Definition: mxnamespace.c:611
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static dispex_static_data_t namespacemanager_dispex
Definition: mxnamespace.c:638
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ namespacemanager_AddRef()

static ULONG WINAPI namespacemanager_AddRef ( IMXNamespaceManager *  iface)
static

Definition at line 229 of file mxnamespace.c.

230 {
232  return IVBMXNamespaceManager_AddRef(&This->IVBMXNamespaceManager_iface);
233 }
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77

◆ namespacemanager_declarePrefix()

static HRESULT WINAPI namespacemanager_declarePrefix ( IMXNamespaceManager *  iface,
const WCHAR prefix,
const WCHAR namespaceURI 
)
static

Definition at line 280 of file mxnamespace.c.

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 }
static WCHAR xmlnsW[]
Definition: reader.c:226
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
static const WCHAR xmlW[]
Definition: mxnamespace.c:61
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77
static HRESULT declare_prefix(namespacemanager *This, const WCHAR *prefix, const WCHAR *uri)
Definition: mxnamespace.c:87

◆ namespacemanager_getAllowOverride()

static HRESULT WINAPI namespacemanager_getAllowOverride ( IMXNamespaceManager *  iface,
VARIANT_BOOL override 
)
static

Definition at line 248 of file mxnamespace.c.

250 {
252  return IVBMXNamespaceManager_get_allowOverride(&This->IVBMXNamespaceManager_iface, override);
253 }
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77

◆ namespacemanager_getDeclaredPrefix()

static HRESULT WINAPI namespacemanager_getDeclaredPrefix ( IMXNamespaceManager *  iface,
LONG  index,
WCHAR prefix,
int prefix_len 
)
static

Definition at line 295 of file mxnamespace.c.

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 }
HRESULT hr
Definition: shlfolder.c:183
OLECHAR * BSTR
Definition: compat.h:1942
int32_t INT
Definition: typedefs.h:56
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
uint32_t entry
Definition: isohybrid.c:63
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196
static HRESULT get_declared_prefix_idx(const struct nscontext *ctxt, LONG index, BSTR *prefix)
Definition: mxnamespace.c:132
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define LIST_ENTRY(type)
Definition: queue.h:175
#define E_POINTER
Definition: winerror.h:2365
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77

◆ namespacemanager_getPrefix()

static HRESULT WINAPI namespacemanager_getPrefix ( IMXNamespaceManager *  iface,
const WCHAR uri,
LONG  index,
WCHAR prefix,
int prefix_len 
)
static

Definition at line 322 of file mxnamespace.c.

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 }
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1594
OLECHAR * BSTR
Definition: compat.h:1942
#define E_FAIL
Definition: ddrawi.h:102
int32_t INT
Definition: typedefs.h:56
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
static HRESULT get_declared_prefix_uri(const struct list *ctxts, const WCHAR *uri, BSTR *prefix)
Definition: mxnamespace.c:145
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77

◆ namespacemanager_getURI()

static HRESULT WINAPI namespacemanager_getURI ( IMXNamespaceManager *  iface,
const WCHAR prefix,
IXMLDOMNode node,
WCHAR uri,
int uri_len 
)
static

Definition at line 352 of file mxnamespace.c.

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 }
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1594
OLECHAR * BSTR
Definition: compat.h:1942
int32_t INT
Definition: typedefs.h:56
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
static HRESULT get_uri_from_prefix(const struct nscontext *ctxt, const WCHAR *prefix, BSTR *uri)
Definition: mxnamespace.c:164
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
uint32_t entry
Definition: isohybrid.c:63
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define E_NOTIMPL
Definition: ddrawi.h:99
#define LIST_ENTRY(type)
Definition: queue.h:175
#define E_POINTER
Definition: winerror.h:2365
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77
Definition: dlist.c:348

◆ namespacemanager_popContext()

static HRESULT WINAPI namespacemanager_popContext ( IMXNamespaceManager *  iface)
static

Definition at line 274 of file mxnamespace.c.

275 {
277  return IVBMXNamespaceManager_popContext(&This->IVBMXNamespaceManager_iface);
278 }
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77

◆ namespacemanager_pushContext()

static HRESULT WINAPI namespacemanager_pushContext ( IMXNamespaceManager *  iface)
static

Definition at line 261 of file mxnamespace.c.

262 {
264  return IVBMXNamespaceManager_pushContext(&This->IVBMXNamespaceManager_iface);
265 }
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77

◆ namespacemanager_pushNodeContext()

static HRESULT WINAPI namespacemanager_pushNodeContext ( IMXNamespaceManager *  iface,
IXMLDOMNode node,
VARIANT_BOOL  deep 
)
static

Definition at line 267 of file mxnamespace.c.

269 {
271  return IVBMXNamespaceManager_pushNodeContext(&This->IVBMXNamespaceManager_iface, node, deep);
272 }
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77
Definition: dlist.c:348

◆ namespacemanager_putAllowOverride()

static HRESULT WINAPI namespacemanager_putAllowOverride ( IMXNamespaceManager *  iface,
VARIANT_BOOL  override 
)
static

Definition at line 241 of file mxnamespace.c.

243 {
245  return IVBMXNamespaceManager_put_allowOverride(&This->IVBMXNamespaceManager_iface, override);
246 }
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77

◆ namespacemanager_QueryInterface()

static HRESULT WINAPI namespacemanager_QueryInterface ( IMXNamespaceManager *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 223 of file mxnamespace.c.

224 {
226  return IVBMXNamespaceManager_QueryInterface(&This->IVBMXNamespaceManager_iface, riid, ppvObject);
227 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppvObject
Definition: precomp.h:44
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77

◆ namespacemanager_Release()

static ULONG WINAPI namespacemanager_Release ( IMXNamespaceManager *  iface)
static

Definition at line 235 of file mxnamespace.c.

236 {
238  return IVBMXNamespaceManager_Release(&This->IVBMXNamespaceManager_iface);
239 }
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77

◆ namespacemanager_reset()

static HRESULT WINAPI namespacemanager_reset ( IMXNamespaceManager *  iface)
static

Definition at line 255 of file mxnamespace.c.

256 {
258  return IVBMXNamespaceManager_reset(&This->IVBMXNamespaceManager_iface);
259 }
static namespacemanager * impl_from_IMXNamespaceManager(IMXNamespaceManager *iface)
Definition: mxnamespace.c:77

◆ vbnamespacemanager_AddRef()

static ULONG WINAPI vbnamespacemanager_AddRef ( IVBMXNamespaceManager *  iface)
static

Definition at line 437 of file mxnamespace.c.

438 {
440  ULONG ref = InterlockedIncrement( &This->ref );
441  TRACE("(%p)->(%u)\n", This, ref );
442  return ref;
443 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82
unsigned int ULONG
Definition: retypes.h:1

◆ vbnamespacemanager_declarePrefix()

static HRESULT WINAPI vbnamespacemanager_declarePrefix ( IVBMXNamespaceManager *  iface,
BSTR  prefix,
BSTR  namespaceURI 
)
static

Definition at line 572 of file mxnamespace.c.

574 {
576  return IMXNamespaceManager_declarePrefix(&This->IMXNamespaceManager_iface, prefix, namespaceURI);
577 }
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82

◆ vbnamespacemanager_get_allowOverride()

static HRESULT WINAPI vbnamespacemanager_get_allowOverride ( IVBMXNamespaceManager *  iface,
VARIANT_BOOL override 
)
static

Definition at line 510 of file mxnamespace.c.

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 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82
#define E_POINTER
Definition: winerror.h:2365

◆ vbnamespacemanager_getDeclaredPrefixes()

static HRESULT WINAPI vbnamespacemanager_getDeclaredPrefixes ( IVBMXNamespaceManager *  iface,
IMXNamespacePrefixes **  prefixes 
)
static

Definition at line 579 of file mxnamespace.c.

581 {
583  FIXME("(%p)->(%p): stub\n", This, prefixes);
584  return E_NOTIMPL;
585 }
static int prefixes
Definition: i386-dis.c:266
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82

◆ vbnamespacemanager_GetIDsOfNames()

static HRESULT WINAPI vbnamespacemanager_GetIDsOfNames ( IVBMXNamespaceManager *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 482 of file mxnamespace.c.

484 {
486  return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface,
487  riid, rgszNames, cNames, lcid, rgDispId);
488 }
REFIID riid
Definition: precomp.h:44
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82

◆ vbnamespacemanager_getPrefixes()

static HRESULT WINAPI vbnamespacemanager_getPrefixes ( IVBMXNamespaceManager *  iface,
BSTR  namespaceURI,
IMXNamespacePrefixes **  prefixes 
)
static

Definition at line 587 of file mxnamespace.c.

589 {
591  FIXME("(%p)->(%s %p): stub\n", This, debugstr_w(namespaceURI), prefixes);
592  return E_NOTIMPL;
593 }
static int prefixes
Definition: i386-dis.c:266
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82

◆ vbnamespacemanager_GetTypeInfo()

static HRESULT WINAPI vbnamespacemanager_GetTypeInfo ( IVBMXNamespaceManager *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 474 of file mxnamespace.c.

476 {
478  return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface,
479  iTInfo, lcid, ppTInfo);
480 }
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82

◆ vbnamespacemanager_GetTypeInfoCount()

static HRESULT WINAPI vbnamespacemanager_GetTypeInfoCount ( IVBMXNamespaceManager *  iface,
UINT pctinfo 
)
static

Definition at line 468 of file mxnamespace.c.

469 {
471  return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
472 }
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82

◆ vbnamespacemanager_getURI()

static HRESULT WINAPI vbnamespacemanager_getURI ( IVBMXNamespaceManager *  iface,
BSTR  prefix,
VARIANT uri 
)
static

Definition at line 595 of file mxnamespace.c.

597 {
599  FIXME("(%p)->(%s %p): stub\n", This, debugstr_w(prefix), uri);
600  return E_NOTIMPL;
601 }
const char * uri
Definition: sec_mgr.c:1594
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82

◆ vbnamespacemanager_getURIFromNode()

static HRESULT WINAPI vbnamespacemanager_getURIFromNode ( IVBMXNamespaceManager *  iface,
BSTR  prefix,
IXMLDOMNode node,
VARIANT uri 
)
static

Definition at line 603 of file mxnamespace.c.

605 {
607  FIXME("(%p)->(%s %p %p): stub\n", This, debugstr_w(prefix), node, uri);
608  return E_NOTIMPL;
609 }
const char * uri
Definition: sec_mgr.c:1594
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82
Definition: dlist.c:348

◆ vbnamespacemanager_Invoke()

static HRESULT WINAPI vbnamespacemanager_Invoke ( IVBMXNamespaceManager *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 490 of file mxnamespace.c.

493 {
495  return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface,
496  dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
497 }
REFIID riid
Definition: precomp.h:44
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82

◆ vbnamespacemanager_popContext()

static HRESULT WINAPI vbnamespacemanager_popContext ( IVBMXNamespaceManager *  iface)
static

Definition at line 553 of file mxnamespace.c.

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 }
#define E_FAIL
Definition: ddrawi.h:102
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
Definition: list.h:15
static void free_ns_context(struct nscontext *ctxt)
Definition: mxnamespace.c:209
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define TRACE(s)
Definition: solgame.cpp:4
uint32_t entry
Definition: isohybrid.c:63
Definition: _list.h:228
#define S_OK
Definition: intsafe.h:59
static unsigned __int64 next
Definition: rand_nt.c:6
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
Definition: list.h:115
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82
#define LIST_ENTRY(type)
Definition: queue.h:175

◆ vbnamespacemanager_pushContext()

static HRESULT WINAPI vbnamespacemanager_pushContext ( IVBMXNamespaceManager *  iface)
static

Definition at line 530 of file mxnamespace.c.

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 }
struct list entry
Definition: mxnamespace.c:52
static struct nscontext * alloc_ns_context(void)
Definition: mxnamespace.c:179
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
Definition: list.h:96
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82

◆ vbnamespacemanager_pushNodeContext()

static HRESULT WINAPI vbnamespacemanager_pushNodeContext ( IVBMXNamespaceManager *  iface,
IXMLDOMNode node,
VARIANT_BOOL  deep 
)
static

Definition at line 545 of file mxnamespace.c.

547 {
549  FIXME("(%p)->(%p %d): stub\n", This, node, deep);
550  return E_NOTIMPL;
551 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82
Definition: dlist.c:348

◆ vbnamespacemanager_put_allowOverride()

static HRESULT WINAPI vbnamespacemanager_put_allowOverride ( IVBMXNamespaceManager *  iface,
VARIANT_BOOL  override 
)
static

Definition at line 499 of file mxnamespace.c.

501 {
503 
504  TRACE("(%p)->(%d)\n", This, override);
505  This->override = override;
506 
507  return S_OK;
508 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82

◆ vbnamespacemanager_QueryInterface()

static HRESULT WINAPI vbnamespacemanager_QueryInterface ( IVBMXNamespaceManager *  iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 406 of file mxnamespace.c.

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 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
#define S_OK
Definition: intsafe.h:59
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82

◆ vbnamespacemanager_Release()

static ULONG WINAPI vbnamespacemanager_Release ( IVBMXNamespaceManager *  iface)
static

Definition at line 445 of file mxnamespace.c.

446 {
448  ULONG ref = InterlockedDecrement( &This->ref );
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 }
struct list entry
Definition: mxnamespace.c:52
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
static void free_ns_context(struct nscontext *ctxt)
Definition: mxnamespace.c:209
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
uint32_t entry
Definition: isohybrid.c:63
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82
unsigned int ULONG
Definition: retypes.h:1
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ vbnamespacemanager_reset()

static HRESULT WINAPI vbnamespacemanager_reset ( IVBMXNamespaceManager *  iface)
static

Definition at line 523 of file mxnamespace.c.

524 {
526  FIXME("(%p): stub\n", This);
527  return E_NOTIMPL;
528 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static namespacemanager * impl_from_IVBMXNamespaceManager(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:82

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msxml  )

Variable Documentation

◆ MXNamespaceManagerVtbl

const struct IMXNamespaceManagerVtbl MXNamespaceManagerVtbl
static
Initial value:
=
{
}
static ULONG WINAPI namespacemanager_AddRef(IMXNamespaceManager *iface)
Definition: mxnamespace.c:229
static ULONG WINAPI namespacemanager_Release(IMXNamespaceManager *iface)
Definition: mxnamespace.c:235
static HRESULT WINAPI namespacemanager_declarePrefix(IMXNamespaceManager *iface, const WCHAR *prefix, const WCHAR *namespaceURI)
Definition: mxnamespace.c:280
static HRESULT WINAPI namespacemanager_popContext(IMXNamespaceManager *iface)
Definition: mxnamespace.c:274
static HRESULT WINAPI namespacemanager_getAllowOverride(IMXNamespaceManager *iface, VARIANT_BOOL *override)
Definition: mxnamespace.c:248
static HRESULT WINAPI namespacemanager_pushContext(IMXNamespaceManager *iface)
Definition: mxnamespace.c:261
static HRESULT WINAPI namespacemanager_getPrefix(IMXNamespaceManager *iface, const WCHAR *uri, LONG index, WCHAR *prefix, int *prefix_len)
Definition: mxnamespace.c:322
static HRESULT WINAPI namespacemanager_putAllowOverride(IMXNamespaceManager *iface, VARIANT_BOOL override)
Definition: mxnamespace.c:241
static HRESULT WINAPI namespacemanager_reset(IMXNamespaceManager *iface)
Definition: mxnamespace.c:255
static HRESULT WINAPI namespacemanager_QueryInterface(IMXNamespaceManager *iface, REFIID riid, void **ppvObject)
Definition: mxnamespace.c:223
static HRESULT WINAPI namespacemanager_getDeclaredPrefix(IMXNamespaceManager *iface, LONG index, WCHAR *prefix, int *prefix_len)
Definition: mxnamespace.c:295
static HRESULT WINAPI namespacemanager_getURI(IMXNamespaceManager *iface, const WCHAR *prefix, IXMLDOMNode *node, WCHAR *uri, int *uri_len)
Definition: mxnamespace.c:352
static HRESULT WINAPI namespacemanager_pushNodeContext(IMXNamespaceManager *iface, IXMLDOMNode *node, VARIANT_BOOL deep)
Definition: mxnamespace.c:267

Definition at line 389 of file mxnamespace.c.

Referenced by MXNamespaceManager_create().

◆ namespacemanager_dispex

dispex_static_data_t namespacemanager_dispex
static
Initial value:

Definition at line 638 of file mxnamespace.c.

Referenced by MXNamespaceManager_create().

◆ namespacemanager_iface_tids

const tid_t namespacemanager_iface_tids[]
static
Initial value:

Definition at line 633 of file mxnamespace.c.

◆ VBMXNamespaceManagerVtbl

const struct IVBMXNamespaceManagerVtbl VBMXNamespaceManagerVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI vbnamespacemanager_getPrefixes(IVBMXNamespaceManager *iface, BSTR namespaceURI, IMXNamespacePrefixes **prefixes)
Definition: mxnamespace.c:587
static HRESULT WINAPI vbnamespacemanager_GetIDsOfNames(IVBMXNamespaceManager *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: mxnamespace.c:482
static HRESULT WINAPI vbnamespacemanager_pushNodeContext(IVBMXNamespaceManager *iface, IXMLDOMNode *node, VARIANT_BOOL deep)
Definition: mxnamespace.c:545
static HRESULT WINAPI vbnamespacemanager_getURI(IVBMXNamespaceManager *iface, BSTR prefix, VARIANT *uri)
Definition: mxnamespace.c:595
static HRESULT WINAPI vbnamespacemanager_GetTypeInfo(IVBMXNamespaceManager *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: mxnamespace.c:474
static HRESULT WINAPI vbnamespacemanager_put_allowOverride(IVBMXNamespaceManager *iface, VARIANT_BOOL override)
Definition: mxnamespace.c:499
static HRESULT WINAPI vbnamespacemanager_get_allowOverride(IVBMXNamespaceManager *iface, VARIANT_BOOL *override)
Definition: mxnamespace.c:510
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_GetTypeInfoCount(IVBMXNamespaceManager *iface, UINT *pctinfo)
Definition: mxnamespace.c:468
static ULONG WINAPI vbnamespacemanager_Release(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:445
static HRESULT WINAPI vbnamespacemanager_popContext(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:553
static ULONG WINAPI vbnamespacemanager_AddRef(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:437
static HRESULT WINAPI vbnamespacemanager_getURIFromNode(IVBMXNamespaceManager *iface, BSTR prefix, IXMLDOMNode *node, VARIANT *uri)
Definition: mxnamespace.c:603
static HRESULT WINAPI vbnamespacemanager_reset(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:523
static HRESULT WINAPI vbnamespacemanager_declarePrefix(IVBMXNamespaceManager *iface, BSTR prefix, BSTR namespaceURI)
Definition: mxnamespace.c:572
static HRESULT WINAPI vbnamespacemanager_getDeclaredPrefixes(IVBMXNamespaceManager *iface, IMXNamespacePrefixes **prefixes)
Definition: mxnamespace.c:579
static HRESULT WINAPI vbnamespacemanager_pushContext(IVBMXNamespaceManager *iface)
Definition: mxnamespace.c:530

Definition at line 611 of file mxnamespace.c.

Referenced by MXNamespaceManager_create().

◆ xmluriW

const WCHAR xmluriW[]
static
Initial value:
= {'h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g',
'/','X','M','L','/','1','9','9','8','/','n','a','m','e','s','p','a','c','e',0}

Definition at line 62 of file mxnamespace.c.

Referenced by alloc_ns_context().

◆ xmlW