ReactOS 0.4.16-dev-2216-ga08d639
attribute.c File Reference
#include <stdarg.h>
#include <libxml/parser.h>
#include <libxml/xmlerror.h>
#include <libxml/HTMLtree.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 attribute.c:

Go to the source code of this file.

Classes

struct  _domattr
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct _domattr domattr
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msxml)
 
static domattrimpl_from_IXMLDOMAttribute (IXMLDOMAttribute *iface)
 
static HRESULT WINAPI domattr_QueryInterface (IXMLDOMAttribute *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI domattr_AddRef (IXMLDOMAttribute *iface)
 
static ULONG WINAPI domattr_Release (IXMLDOMAttribute *iface)
 
static HRESULT WINAPI domattr_GetTypeInfoCount (IXMLDOMAttribute *iface, UINT *pctinfo)
 
static HRESULT WINAPI domattr_GetTypeInfo (IXMLDOMAttribute *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI domattr_GetIDsOfNames (IXMLDOMAttribute *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI domattr_Invoke (IXMLDOMAttribute *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI domattr_get_nodeName (IXMLDOMAttribute *iface, BSTR *p)
 
static HRESULT WINAPI domattr_get_nodeValue (IXMLDOMAttribute *iface, VARIANT *value)
 
static HRESULT WINAPI domattr_put_nodeValue (IXMLDOMAttribute *iface, VARIANT value)
 
static HRESULT WINAPI domattr_get_nodeType (IXMLDOMAttribute *iface, DOMNodeType *domNodeType)
 
static HRESULT WINAPI domattr_get_parentNode (IXMLDOMAttribute *iface, IXMLDOMNode **parent)
 
static HRESULT WINAPI domattr_get_childNodes (IXMLDOMAttribute *iface, IXMLDOMNodeList **outList)
 
static HRESULT WINAPI domattr_get_firstChild (IXMLDOMAttribute *iface, IXMLDOMNode **domNode)
 
static HRESULT WINAPI domattr_get_lastChild (IXMLDOMAttribute *iface, IXMLDOMNode **domNode)
 
static HRESULT WINAPI domattr_get_previousSibling (IXMLDOMAttribute *iface, IXMLDOMNode **domNode)
 
static HRESULT WINAPI domattr_get_nextSibling (IXMLDOMAttribute *iface, IXMLDOMNode **domNode)
 
static HRESULT WINAPI domattr_get_attributes (IXMLDOMAttribute *iface, IXMLDOMNamedNodeMap **attributeMap)
 
static HRESULT WINAPI domattr_insertBefore (IXMLDOMAttribute *iface, IXMLDOMNode *newNode, VARIANT refChild, IXMLDOMNode **old_node)
 
static HRESULT WINAPI domattr_replaceChild (IXMLDOMAttribute *iface, IXMLDOMNode *newNode, IXMLDOMNode *oldNode, IXMLDOMNode **outOldNode)
 
static HRESULT WINAPI domattr_removeChild (IXMLDOMAttribute *iface, IXMLDOMNode *child, IXMLDOMNode **oldChild)
 
static HRESULT WINAPI domattr_appendChild (IXMLDOMAttribute *iface, IXMLDOMNode *child, IXMLDOMNode **outChild)
 
static HRESULT WINAPI domattr_hasChildNodes (IXMLDOMAttribute *iface, VARIANT_BOOL *ret)
 
static HRESULT WINAPI domattr_get_ownerDocument (IXMLDOMAttribute *iface, IXMLDOMDocument **doc)
 
static HRESULT WINAPI domattr_cloneNode (IXMLDOMAttribute *iface, VARIANT_BOOL deep, IXMLDOMNode **outNode)
 
static HRESULT WINAPI domattr_get_nodeTypeString (IXMLDOMAttribute *iface, BSTR *p)
 
static HRESULT WINAPI domattr_get_text (IXMLDOMAttribute *iface, BSTR *p)
 
static HRESULT WINAPI domattr_put_text (IXMLDOMAttribute *iface, BSTR p)
 
static HRESULT WINAPI domattr_get_specified (IXMLDOMAttribute *iface, VARIANT_BOOL *isSpecified)
 
static HRESULT WINAPI domattr_get_definition (IXMLDOMAttribute *iface, IXMLDOMNode **definitionNode)
 
static HRESULT WINAPI domattr_get_nodeTypedValue (IXMLDOMAttribute *iface, VARIANT *value)
 
static HRESULT WINAPI domattr_put_nodeTypedValue (IXMLDOMAttribute *iface, VARIANT typedValue)
 
static HRESULT WINAPI domattr_get_dataType (IXMLDOMAttribute *iface, VARIANT *typename)
 
static HRESULT WINAPI domattr_put_dataType (IXMLDOMAttribute *iface, BSTR p)
 
static HRESULT WINAPI domattr_get_xml (IXMLDOMAttribute *iface, BSTR *p)
 
static HRESULT WINAPI domattr_transformNode (IXMLDOMAttribute *iface, IXMLDOMNode *node, BSTR *p)
 
static HRESULT WINAPI domattr_selectNodes (IXMLDOMAttribute *iface, BSTR p, IXMLDOMNodeList **outList)
 
static HRESULT WINAPI domattr_selectSingleNode (IXMLDOMAttribute *iface, BSTR p, IXMLDOMNode **outNode)
 
static HRESULT WINAPI domattr_get_parsed (IXMLDOMAttribute *iface, VARIANT_BOOL *isParsed)
 
static HRESULT WINAPI domattr_get_namespaceURI (IXMLDOMAttribute *iface, BSTR *p)
 
static HRESULT WINAPI domattr_get_prefix (IXMLDOMAttribute *iface, BSTR *prefix)
 
static HRESULT WINAPI domattr_get_baseName (IXMLDOMAttribute *iface, BSTR *name)
 
static HRESULT WINAPI domattr_transformNodeToObject (IXMLDOMAttribute *iface, IXMLDOMNode *domNode, VARIANT var1)
 
static HRESULT WINAPI domattr_get_name (IXMLDOMAttribute *iface, BSTR *p)
 
static HRESULT WINAPI domattr_get_value (IXMLDOMAttribute *iface, VARIANT *value)
 
static HRESULT WINAPI domattr_put_value (IXMLDOMAttribute *iface, VARIANT value)
 
IUnknowncreate_attribute (xmlNodePtr attribute, BOOL floating)
 

Variables

static const xmlChar xmlns [] = "xmlns"
 
static const tid_t domattr_se_tids []
 
static const struct IXMLDOMAttributeVtbl domattr_vtbl
 
static const tid_t domattr_iface_tids []
 
static dispex_static_data_t domattr_dispex
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file attribute.c.

Typedef Documentation

◆ domattr

Function Documentation

◆ create_attribute()

IUnknown * create_attribute ( xmlNodePtr  attribute,
BOOL  floating 
)

Definition at line 730 of file attribute.c.

731{
732 domattr *This;
733
734 This = malloc(sizeof(*This));
735 if ( !This )
736 return NULL;
737
738 This->IXMLDOMAttribute_iface.lpVtbl = &domattr_vtbl;
739 This->ref = 1;
740 This->floating = floating;
741
742 init_xmlnode(&This->node, attribute, (IXMLDOMNode*)&This->IXMLDOMAttribute_iface, &domattr_dispex);
743
744 return (IUnknown*)&This->IXMLDOMAttribute_iface;
745}
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
static dispex_static_data_t domattr_dispex
Definition: attribute.c:723
static const struct IXMLDOMAttributeVtbl domattr_vtbl
Definition: attribute.c:668
void init_xmlnode(xmlnode *, xmlNodePtr, IXMLDOMNode *, dispex_static_data_t *)
Definition: node.c:1647

Referenced by create_node(), domelem_get_item(), and domelem_getAttributeNode().

◆ domattr_AddRef()

static ULONG WINAPI domattr_AddRef ( IXMLDOMAttribute iface)
static

Definition at line 95 of file attribute.c.

97{
100 TRACE("%p, refcount %lu.\n", iface, ref);
101 return ref;
102}
#define InterlockedIncrement
Definition: armddk.h:53
static domattr * impl_from_IXMLDOMAttribute(IXMLDOMAttribute *iface)
Definition: attribute.c:56
#define TRACE(s)
Definition: solgame.cpp:4
Definition: cookie.c:202
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ domattr_appendChild()

static HRESULT WINAPI domattr_appendChild ( IXMLDOMAttribute iface,
IXMLDOMNode child,
IXMLDOMNode **  outChild 
)
static

Definition at line 339 of file attribute.c.

342{
344 TRACE("(%p)->(%p %p)\n", This, child, outChild);
345 return node_append_child(&This->node, child, outChild);
346}
static HWND child
Definition: cursoricon.c:298
HRESULT node_append_child(xmlnode *, IXMLDOMNode *, IXMLDOMNode **)
Definition: node.c:639

◆ domattr_cloneNode()

static HRESULT WINAPI domattr_cloneNode ( IXMLDOMAttribute iface,
VARIANT_BOOL  deep,
IXMLDOMNode **  outNode 
)
static

Definition at line 366 of file attribute.c.

369{
371 TRACE("(%p)->(%d %p)\n", This, deep, outNode);
372 return node_clone( &This->node, deep, outNode );
373}
HRESULT node_clone(xmlnode *, VARIANT_BOOL, IXMLDOMNode **)
Definition: node.c:679

◆ domattr_get_attributes()

static HRESULT WINAPI domattr_get_attributes ( IXMLDOMAttribute iface,
IXMLDOMNamedNodeMap **  attributeMap 
)
static

Definition at line 275 of file attribute.c.

278{
280
281 TRACE("(%p)->(%p)\n", This, attributeMap);
282
283 return return_null_ptr((void**)attributeMap);
284}
static HRESULT return_null_ptr(void **p)

◆ domattr_get_baseName()

static HRESULT WINAPI domattr_get_baseName ( IXMLDOMAttribute iface,
BSTR name 
)
static

Definition at line 617 of file attribute.c.

620{
622 TRACE("(%p)->(%p)\n", This, name);
623 return node_get_base_name( &This->node, name );
624}
HRESULT node_get_base_name(xmlnode *, BSTR *)
Definition: node.c:1622
Definition: name.c:39

◆ domattr_get_childNodes()

static HRESULT WINAPI domattr_get_childNodes ( IXMLDOMAttribute iface,
IXMLDOMNodeList **  outList 
)
static

Definition at line 220 of file attribute.c.

223{
225
226 TRACE("(%p)->(%p)\n", This, outList);
227
228 return node_get_child_nodes(&This->node, outList);
229}
HRESULT node_get_child_nodes(xmlnode *, IXMLDOMNodeList **)
Definition: node.c:353

◆ domattr_get_dataType()

static HRESULT WINAPI domattr_get_dataType ( IXMLDOMAttribute iface,
VARIANT typename 
)
static

Definition at line 471 of file attribute.c.

474{
476 TRACE("(%p)->(%p)\n", This, typename);
477 return return_null_var( typename );
478}
static HRESULT return_null_var(VARIANT *p)

◆ domattr_get_definition()

static HRESULT WINAPI domattr_get_definition ( IXMLDOMAttribute iface,
IXMLDOMNode **  definitionNode 
)
static

Definition at line 415 of file attribute.c.

418{
420 FIXME("(%p)->(%p)\n", This, definitionNode);
421 return E_NOTIMPL;
422}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ domattr_get_firstChild()

static HRESULT WINAPI domattr_get_firstChild ( IXMLDOMAttribute iface,
IXMLDOMNode **  domNode 
)
static

Definition at line 231 of file attribute.c.

234{
236
237 TRACE("(%p)->(%p)\n", This, domNode);
238
239 return node_get_first_child(&This->node, domNode);
240}
HRESULT node_get_first_child(xmlnode *, IXMLDOMNode **)
Definition: node.c:365

◆ domattr_get_lastChild()

static HRESULT WINAPI domattr_get_lastChild ( IXMLDOMAttribute iface,
IXMLDOMNode **  domNode 
)
static

Definition at line 242 of file attribute.c.

245{
247
248 TRACE("(%p)->(%p)\n", This, domNode);
249
250 return node_get_last_child(&This->node, domNode);
251}
HRESULT node_get_last_child(xmlnode *, IXMLDOMNode **)
Definition: node.c:370

◆ domattr_get_name()

static HRESULT WINAPI domattr_get_name ( IXMLDOMAttribute iface,
BSTR p 
)
static

Definition at line 635 of file attribute.c.

638{
640
641 TRACE("(%p)->(%p)\n", This, p);
642
643 return node_get_nodeName(&This->node, p);
644}
GLfloat GLfloat p
Definition: glext.h:8902
HRESULT node_get_nodeName(xmlnode *, BSTR *)
Definition: node.c:178

◆ domattr_get_namespaceURI()

static HRESULT WINAPI domattr_get_namespaceURI ( IXMLDOMAttribute iface,
BSTR p 
)
static

Definition at line 542 of file attribute.c.

545{
547 xmlNsPtr ns = This->node.node->ns;
548 BSTR nodename, pfx;
549 BOOL is6, isdefault;
550 HRESULT hr;
551
552 TRACE("(%p)->(%p)\n", This, p);
553
554 if (!p)
555 return E_INVALIDARG;
556
557 *p = NULL;
558 nodename = NULL;
559 hr = IXMLDOMAttribute_get_nodeName(iface, &nodename);
560 if (FAILED(hr))
561 return hr;
562
563 pfx = NULL;
564 hr = IXMLDOMAttribute_get_prefix(iface, &pfx);
565 if (FAILED(hr))
566 {
567 SysFreeString(nodename);
568 return hr;
569 }
570
571 is6 = xmldoc_version(This->node.node->doc) == MSXML6;
572 isdefault = !wcscmp(nodename, L"xmlns");
573 if (isdefault || (pfx && !wcscmp(L"xmlns", pfx)))
574 {
575 if (is6)
576 *p = SysAllocString(L"http://www.w3.org/2000/xmlns/");
577 else if (!ns || !isdefault)
578 *p = SysAllocStringLen(NULL, 0);
579 else
580 *p = SysAllocString(L"xmlns");
581 }
582 else if (ns && ns->href)
583 *p = bstr_from_xmlChar(ns->href);
584
585 SysFreeString(nodename);
586 SysFreeString(pfx);
587
588 TRACE("uri: %s\n", debugstr_w(*p));
589
590 return *p ? S_OK : S_FALSE;
591}
#define E_INVALIDARG
Definition: ddrawi.h:101
OLECHAR * BSTR
Definition: compat.h:2293
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:1972
MSXML_VERSION xmldoc_version(xmlDocPtr doc)
Definition: domdoc.c:414
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_w
Definition: kernel32.h:32
@ MSXML6
Definition: msxml_dispex.h:33
static BSTR bstr_from_xmlChar(const xmlChar *str)
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
HRESULT hr
Definition: shlfolder.c:183
Definition: mxnamespace.c:38
#define S_FALSE
Definition: winerror.h:3451

◆ domattr_get_nextSibling()

static HRESULT WINAPI domattr_get_nextSibling ( IXMLDOMAttribute iface,
IXMLDOMNode **  domNode 
)
static

Definition at line 264 of file attribute.c.

267{
269
270 TRACE("(%p)->(%p)\n", This, domNode);
271
272 return return_null_node(domNode);
273}
static HRESULT return_null_node(IXMLDOMNode **p)

◆ domattr_get_nodeName()

static HRESULT WINAPI domattr_get_nodeName ( IXMLDOMAttribute iface,
BSTR p 
)
static

Definition at line 164 of file attribute.c.

167{
169
170 TRACE("(%p)->(%p)\n", This, p);
171
172 return node_get_nodeName(&This->node, p);
173}

◆ domattr_get_nodeType()

static HRESULT WINAPI domattr_get_nodeType ( IXMLDOMAttribute iface,
DOMNodeType domNodeType 
)
static

Definition at line 197 of file attribute.c.

200{
202
203 TRACE("(%p)->(%p)\n", This, domNodeType);
204
205 *domNodeType = NODE_ATTRIBUTE;
206 return S_OK;
207}
@ NODE_ATTRIBUTE
Definition: msxml6.idl:114

◆ domattr_get_nodeTypedValue()

static HRESULT WINAPI domattr_get_nodeTypedValue ( IXMLDOMAttribute iface,
VARIANT value 
)
static

Definition at line 424 of file attribute.c.

427{
429 IXMLDOMDocument *doc;
430 HRESULT hr;
431
432 TRACE("(%p)->(%p)\n", This, value);
433
434 hr = IXMLDOMAttribute_get_ownerDocument(iface, &doc);
435 if (hr == S_OK)
436 {
437 IXMLDOMDocument3 *doc3;
438
439 hr = IXMLDOMDocument_QueryInterface(doc, &IID_IXMLDOMDocument3, (void**)&doc3);
440 IXMLDOMDocument_Release(doc);
441
442 if (hr == S_OK)
443 {
444 VARIANT schemas;
445
446 hr = IXMLDOMDocument3_get_schemas(doc3, &schemas);
447 IXMLDOMDocument3_Release(doc3);
448
449 if (hr != S_OK)
450 return IXMLDOMAttribute_get_value(iface, value);
451 else
452 {
453 FIXME("need to query schema for attribute type\n");
454 VariantClear(&schemas);
455 }
456 }
457 }
458
459 return return_null_var(value);
460}
Definition: pdh_main.c:96
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648

◆ domattr_get_nodeTypeString()

static HRESULT WINAPI domattr_get_nodeTypeString ( IXMLDOMAttribute iface,
BSTR p 
)
static

Definition at line 375 of file attribute.c.

378{
380 static const WCHAR attributeW[] = {'a','t','t','r','i','b','u','t','e',0};
381
382 TRACE("(%p)->(%p)\n", This, p);
383
384 return return_bstr(attributeW, p);
385}
static HRESULT return_bstr(const WCHAR *value, BSTR *p)
Definition: msxml_dispex.h:115
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ domattr_get_nodeValue()

static HRESULT WINAPI domattr_get_nodeValue ( IXMLDOMAttribute iface,
VARIANT value 
)
static

Definition at line 175 of file attribute.c.

178{
180
181 TRACE("(%p)->(%p)\n", This, value);
182
183 return node_get_content(&This->node, value);
184}
HRESULT node_get_content(xmlnode *, VARIANT *)
Definition: node.c:225

◆ domattr_get_ownerDocument()

static HRESULT WINAPI domattr_get_ownerDocument ( IXMLDOMAttribute iface,
IXMLDOMDocument **  doc 
)
static

Definition at line 357 of file attribute.c.

360{
362 TRACE("(%p)->(%p)\n", This, doc);
363 return node_get_owner_doc(&This->node, doc);
364}
HRESULT node_get_owner_doc(const xmlnode *, IXMLDOMDocument **)
Definition: node.c:672

◆ domattr_get_parentNode()

static HRESULT WINAPI domattr_get_parentNode ( IXMLDOMAttribute iface,
IXMLDOMNode **  parent 
)
static

Definition at line 209 of file attribute.c.

212{
214 TRACE("(%p)->(%p)\n", This, parent);
215 if (!parent) return E_INVALIDARG;
216 *parent = NULL;
217 return S_FALSE;
218}
r parent
Definition: btrfs.c:3010

◆ domattr_get_parsed()

static HRESULT WINAPI domattr_get_parsed ( IXMLDOMAttribute iface,
VARIANT_BOOL isParsed 
)
static

Definition at line 532 of file attribute.c.

535{
537 FIXME("(%p)->(%p) stub!\n", This, isParsed);
538 *isParsed = VARIANT_TRUE;
539 return S_OK;
540}

◆ domattr_get_prefix()

static HRESULT WINAPI domattr_get_prefix ( IXMLDOMAttribute iface,
BSTR prefix 
)
static

Definition at line 593 of file attribute.c.

596{
598 xmlNsPtr ns = This->node.node->ns;
599
600 TRACE("(%p)->(%p)\n", This, prefix);
601
602 if (!prefix) return E_INVALIDARG;
603
604 *prefix = NULL;
605
606 if (xmldoc_version(This->node.node->doc) != MSXML6 &&
607 xmlStrEqual(This->node.node->name, xmlns))
609 else if (ns && ns->prefix)
611
612 TRACE("prefix: %s\n", debugstr_w(*prefix));
613
614 return *prefix ? S_OK : S_FALSE;
615}
static const xmlChar xmlns[]
Definition: attribute.c:40
BSTR prefix
Definition: mxnamespace.c:39
Character const *const prefix
Definition: tempnam.cpp:195
XMLPUBFUN int xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
Definition: xmlstring.c:162

◆ domattr_get_previousSibling()

static HRESULT WINAPI domattr_get_previousSibling ( IXMLDOMAttribute iface,
IXMLDOMNode **  domNode 
)
static

Definition at line 253 of file attribute.c.

256{
258
259 TRACE("(%p)->(%p)\n", This, domNode);
260
261 return return_null_node(domNode);
262}

◆ domattr_get_specified()

static HRESULT WINAPI domattr_get_specified ( IXMLDOMAttribute iface,
VARIANT_BOOL isSpecified 
)
static

Definition at line 405 of file attribute.c.

408{
410 FIXME("(%p)->(%p) stub!\n", This, isSpecified);
411 *isSpecified = VARIANT_TRUE;
412 return S_OK;
413}

◆ domattr_get_text()

static HRESULT WINAPI domattr_get_text ( IXMLDOMAttribute iface,
BSTR p 
)
static

Definition at line 387 of file attribute.c.

390{
392 TRACE("(%p)->(%p)\n", This, p);
393 return node_get_text(&This->node, p);
394}
HRESULT node_get_text(const xmlnode *, BSTR *)
Definition: node.c:842

◆ domattr_get_value()

static HRESULT WINAPI domattr_get_value ( IXMLDOMAttribute iface,
VARIANT value 
)
static

Definition at line 646 of file attribute.c.

649{
651
652 TRACE("(%p)->(%p)\n", This, value);
653
654 return node_get_content(&This->node, value);
655}

◆ domattr_get_xml()

static HRESULT WINAPI domattr_get_xml ( IXMLDOMAttribute iface,
BSTR p 
)
static

Definition at line 494 of file attribute.c.

497{
499
500 TRACE("(%p)->(%p)\n", This, p);
501
502 return node_get_xml(&This->node, FALSE, p);
503}
#define FALSE
Definition: types.h:117
HRESULT node_get_xml(xmlnode *, BOOL, BSTR *)
Definition: node.c:936

◆ domattr_GetIDsOfNames()

static HRESULT WINAPI domattr_GetIDsOfNames ( IXMLDOMAttribute iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 143 of file attribute.c.

147{
149 return IDispatchEx_GetIDsOfNames(&This->node.dispex.IDispatchEx_iface,
150 riid, rgszNames, cNames, lcid, rgDispId);
151}
LCID lcid
Definition: locale.c:5656
REFIID riid
Definition: atlbase.h:39

◆ domattr_GetTypeInfo()

static HRESULT WINAPI domattr_GetTypeInfo ( IXMLDOMAttribute iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 133 of file attribute.c.

137{
139 return IDispatchEx_GetTypeInfo(&This->node.dispex.IDispatchEx_iface,
140 iTInfo, lcid, ppTInfo);
141}

◆ domattr_GetTypeInfoCount()

static HRESULT WINAPI domattr_GetTypeInfoCount ( IXMLDOMAttribute iface,
UINT pctinfo 
)
static

Definition at line 125 of file attribute.c.

128{
130 return IDispatchEx_GetTypeInfoCount(&This->node.dispex.IDispatchEx_iface, pctinfo);
131}

◆ domattr_hasChildNodes()

static HRESULT WINAPI domattr_hasChildNodes ( IXMLDOMAttribute iface,
VARIANT_BOOL ret 
)
static

Definition at line 348 of file attribute.c.

351{
353 TRACE("(%p)->(%p)\n", This, ret);
354 return node_has_childnodes(&This->node, ret);
355}
return ret
Definition: mutex.c:146
HRESULT node_has_childnodes(const xmlnode *, VARIANT_BOOL *)
Definition: node.c:658

◆ domattr_insertBefore()

static HRESULT WINAPI domattr_insertBefore ( IXMLDOMAttribute iface,
IXMLDOMNode newNode,
VARIANT  refChild,
IXMLDOMNode **  old_node 
)
static

Definition at line 286 of file attribute.c.

290{
293 HRESULT hr;
294
295 FIXME("(%p)->(%p %s %p) needs test\n", This, newNode, debugstr_variant(&refChild), old_node);
296
297 if (!newNode) return E_INVALIDARG;
298
299 hr = IXMLDOMNode_get_nodeType(newNode, &type);
300 if (hr != S_OK) return hr;
301
302 TRACE("new node type %d\n", type);
303 switch (type)
304 {
305 case NODE_ATTRIBUTE:
307 case NODE_COMMENT:
308 case NODE_ELEMENT:
310 if (old_node) *old_node = NULL;
311 return E_FAIL;
312 default:
313 return node_insert_before(&This->node, newNode, &refChild, old_node);
314 }
315}
#define E_FAIL
Definition: ddrawi.h:102
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
enum tagDOMNodeType DOMNodeType
@ NODE_PROCESSING_INSTRUCTION
Definition: msxml6.idl:119
@ NODE_COMMENT
Definition: msxml6.idl:120
@ NODE_ELEMENT
Definition: msxml6.idl:113
@ NODE_CDATA_SECTION
Definition: msxml6.idl:116
HRESULT node_insert_before(xmlnode *, IXMLDOMNode *, const VARIANT *, IXMLDOMNode **)
Definition: node.c:432

◆ domattr_Invoke()

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

Definition at line 153 of file attribute.c.

158{
160 return IDispatchEx_Invoke(&This->node.dispex.IDispatchEx_iface,
161 dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
162}
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337

◆ domattr_put_dataType()

static HRESULT WINAPI domattr_put_dataType ( IXMLDOMAttribute iface,
BSTR  p 
)
static

Definition at line 480 of file attribute.c.

483{
485
486 FIXME("(%p)->(%s)\n", This, debugstr_w(p));
487
488 if(!p)
489 return E_INVALIDARG;
490
491 return E_FAIL;
492}

◆ domattr_put_nodeTypedValue()

static HRESULT WINAPI domattr_put_nodeTypedValue ( IXMLDOMAttribute iface,
VARIANT  typedValue 
)
static

Definition at line 462 of file attribute.c.

465{
467 FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue));
468 return E_NOTIMPL;
469}

◆ domattr_put_nodeValue()

static HRESULT WINAPI domattr_put_nodeValue ( IXMLDOMAttribute iface,
VARIANT  value 
)
static

Definition at line 186 of file attribute.c.

189{
191
192 TRACE("(%p)->(%s)\n", This, debugstr_variant(&value));
193
194 return node_put_value_escaped(&This->node, &value);
195}
HRESULT node_put_value_escaped(xmlnode *, VARIANT *)
Definition: node.c:303

◆ domattr_put_text()

static HRESULT WINAPI domattr_put_text ( IXMLDOMAttribute iface,
BSTR  p 
)
static

Definition at line 396 of file attribute.c.

399{
401 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
402 return node_put_text( &This->node, p );
403}
HRESULT node_put_text(xmlnode *, BSTR)
Definition: node.c:867

◆ domattr_put_value()

static HRESULT WINAPI domattr_put_value ( IXMLDOMAttribute iface,
VARIANT  value 
)
static

Definition at line 657 of file attribute.c.

660{
662
663 TRACE("(%p)->(%s)\n", This, debugstr_variant(&value));
664
665 return node_put_value_escaped(&This->node, &value);
666}

◆ domattr_QueryInterface()

static HRESULT WINAPI domattr_QueryInterface ( IXMLDOMAttribute iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 61 of file attribute.c.

65{
67 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
68
69 if ( IsEqualGUID( riid, &IID_IXMLDOMAttribute ) ||
70 IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
73 {
74 *ppvObject = iface;
75 }
76 else if(node_query_interface(&This->node, riid, ppvObject))
77 {
78 return *ppvObject ? S_OK : E_NOINTERFACE;
79 }
80 else if(IsEqualGUID( riid, &IID_ISupportErrorInfo ))
81 {
83 }
84 else
85 {
86 TRACE("Unsupported interface %s\n", debugstr_guid(riid));
87 *ppvObject = NULL;
88 return E_NOINTERFACE;
89 }
90
91 IXMLDOMAttribute_AddRef(iface);
92 return S_OK;
93}
const GUID IID_IUnknown
static const tid_t domattr_se_tids[]
Definition: attribute.c:50
#define debugstr_guid
Definition: kernel32.h:35
BOOL node_query_interface(xmlnode *, REFIID, void **)
Definition: node.c:66
HRESULT node_create_supporterrorinfo(const tid_t *, void **)
const GUID IID_IDispatch
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ domattr_Release()

static ULONG WINAPI domattr_Release ( IXMLDOMAttribute iface)
static

Definition at line 104 of file attribute.c.

106{
109
110 TRACE("%p, refcount %lu.\n", iface, ref);
111 if ( ref == 0 )
112 {
113 destroy_xmlnode(&This->node);
114 if ( This->floating )
115 {
116 xmlFreeNs( This->node.node->ns );
117 xmlFreeNode( This->node.node );
118 }
119 free( This );
120 }
121
122 return ref;
123}
#define InterlockedDecrement
Definition: armddk.h:52
#define free
Definition: debug_ros.c:5
void destroy_xmlnode(xmlnode *)
Definition: node.c:1638

◆ domattr_removeChild()

static HRESULT WINAPI domattr_removeChild ( IXMLDOMAttribute iface,
IXMLDOMNode child,
IXMLDOMNode **  oldChild 
)
static

Definition at line 330 of file attribute.c.

333{
335 TRACE("(%p)->(%p %p)\n", This, child, oldChild);
336 return node_remove_child(&This->node, child, oldChild);
337}
HRESULT node_remove_child(xmlnode *, IXMLDOMNode *, IXMLDOMNode **)
Definition: node.c:608

◆ domattr_replaceChild()

static HRESULT WINAPI domattr_replaceChild ( IXMLDOMAttribute iface,
IXMLDOMNode newNode,
IXMLDOMNode oldNode,
IXMLDOMNode **  outOldNode 
)
static

Definition at line 317 of file attribute.c.

322{
324
325 FIXME("(%p)->(%p %p %p) needs tests\n", This, newNode, oldNode, outOldNode);
326
327 return node_replace_child(&This->node, newNode, oldNode, outOldNode);
328}
HRESULT node_replace_child(xmlnode *, IXMLDOMNode *, IXMLDOMNode *, IXMLDOMNode **)
Definition: node.c:543

◆ domattr_selectNodes()

static HRESULT WINAPI domattr_selectNodes ( IXMLDOMAttribute iface,
BSTR  p,
IXMLDOMNodeList **  outList 
)
static

Definition at line 514 of file attribute.c.

517{
519 TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
520 return node_select_nodes(&This->node, p, outList);
521}
HRESULT node_select_nodes(const xmlnode *, BSTR, IXMLDOMNodeList **)
Definition: node.c:1558

◆ domattr_selectSingleNode()

static HRESULT WINAPI domattr_selectSingleNode ( IXMLDOMAttribute iface,
BSTR  p,
IXMLDOMNode **  outNode 
)
static

Definition at line 523 of file attribute.c.

526{
528 TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode);
529 return node_select_singlenode(&This->node, p, outNode);
530}
HRESULT node_select_singlenode(const xmlnode *, BSTR, IXMLDOMNode **)
Definition: node.c:1572

◆ domattr_transformNode()

static HRESULT WINAPI domattr_transformNode ( IXMLDOMAttribute iface,
IXMLDOMNode node,
BSTR p 
)
static

Definition at line 505 of file attribute.c.

508{
510 TRACE("(%p)->(%p %p)\n", This, node, p);
511 return node_transform_node(&This->node, node, p);
512}
HRESULT node_transform_node(const xmlnode *, IXMLDOMNode *, BSTR *)
Definition: node.c:1553
Definition: dlist.c:348

◆ domattr_transformNodeToObject()

static HRESULT WINAPI domattr_transformNodeToObject ( IXMLDOMAttribute iface,
IXMLDOMNode domNode,
VARIANT  var1 
)
static

Definition at line 626 of file attribute.c.

629{
631 FIXME("(%p)->(%p %s)\n", This, domNode, debugstr_variant(&var1));
632 return E_NOTIMPL;
633}

◆ impl_from_IXMLDOMAttribute()

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msxml  )

Variable Documentation

◆ domattr_dispex

dispex_static_data_t domattr_dispex
static
Initial value:
= {
}
static const tid_t domattr_iface_tids[]
Definition: attribute.c:718
@ IXMLDOMAttribute_tid
Definition: msxml_dispex.h:39

Definition at line 723 of file attribute.c.

Referenced by create_attribute().

◆ domattr_iface_tids

const tid_t domattr_iface_tids[]
static
Initial value:

Definition at line 718 of file attribute.c.

◆ domattr_se_tids

const tid_t domattr_se_tids[]
static
Initial value:

Definition at line 50 of file attribute.c.

Referenced by domattr_QueryInterface().

◆ domattr_vtbl

const struct IXMLDOMAttributeVtbl domattr_vtbl
static

Definition at line 668 of file attribute.c.

Referenced by create_attribute().

◆ xmlns

const xmlChar xmlns[] = "xmlns"
static

Definition at line 40 of file attribute.c.

Referenced by domattr_get_prefix(), domelem_get_item(), and SAXAttributes_populate().