ReactOS 0.4.16-dev-2208-g6350669
xmlparser.c File Reference
#include <stdarg.h>
#include "ole2.h"
#include "initguid.h"
#include "xmlparser.h"
#include "wine/debug.h"
Include dependency graph for xmlparser.c:

Go to the source code of this file.

Classes

struct  _xmlparser
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct _xmlparser xmlparser
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msxml)
 
static xmlparserimpl_from_IXMLParser (IXMLParser *iface)
 
static HRESULT WINAPI xmlparser_QueryInterface (IXMLParser *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI xmlparser_AddRef (IXMLParser *iface)
 
static ULONG WINAPI xmlparser_Release (IXMLParser *iface)
 
static HRESULT WINAPI xmlparser_SetFactory (IXMLParser *iface, IXMLNodeFactory *pNodeFactory)
 
static HRESULT WINAPI xmlparser_GetFactory (IXMLParser *iface, IXMLNodeFactory **ppNodeFactory)
 
static HRESULT WINAPI xmlparser_Abort (IXMLParser *iface, BSTR bstrErrorInfo)
 
static ULONG WINAPI xmlparser_GetLineNumber (IXMLParser *iface)
 
static ULONG WINAPI xmlparser_GetLinePosition (IXMLParser *iface)
 
static ULONG WINAPI xmlparser_GetAbsolutePosition (IXMLParser *iface)
 
static HRESULT WINAPI xmlparser_GetLineBuffer (IXMLParser *iface, const WCHAR **ppBuf, ULONG *len, ULONG *startPos)
 
static HRESULT WINAPI xmlparser_GetLastError (IXMLParser *iface)
 
static HRESULT WINAPI xmlparser_GetErrorInfo (IXMLParser *iface, BSTR *pErrorInfo)
 
static ULONG WINAPI xmlparser_GetFlags (IXMLParser *iface)
 
static HRESULT WINAPI xmlparser_GetURL (IXMLParser *iface, const WCHAR **ppBuf)
 
static HRESULT WINAPI xmlparser_SetURL (IXMLParser *iface, const WCHAR *pszBaseUrl, const WCHAR *relativeUrl, BOOL async)
 
static HRESULT WINAPI xmlparser_Load (IXMLParser *iface, BOOL bFullyAvailable, IMoniker *pMon, LPBC pBC, DWORD dwMode)
 
static HRESULT WINAPI xmlparser_SetInput (IXMLParser *iface, IUnknown *pStm)
 
static HRESULT WINAPI xmlparser_PushData (IXMLParser *iface, const char *pData, ULONG nChars, BOOL fLastBuffer)
 
static HRESULT WINAPI xmlparser_LoadDTD (IXMLParser *iface, const WCHAR *baseUrl, const WCHAR *relativeUrl)
 
static HRESULT WINAPI xmlparser_LoadEntity (IXMLParser *iface, const WCHAR *baseUrl, const WCHAR *relativeUrl, BOOL fpe)
 
static HRESULT WINAPI xmlparser_ParseEntity (IXMLParser *iface, const WCHAR *text, ULONG len, BOOL fpe)
 
static HRESULT WINAPI xmlparser_ExpandEntity (IXMLParser *iface, const WCHAR *text, ULONG len)
 
static HRESULT WINAPI xmlparser_SetRoot (IXMLParser *iface, PVOID pRoot)
 
static HRESULT WINAPI xmlparser_GetRoot (IXMLParser *iface, PVOID *ppRoot)
 
static HRESULT WINAPI xmlparser_Run (IXMLParser *iface, LONG chars)
 
static HRESULT WINAPI xmlparser_GetParserState (IXMLParser *iface)
 
static HRESULT WINAPI xmlparser_Suspend (IXMLParser *iface)
 
static HRESULT WINAPI xmlparser_Reset (IXMLParser *iface)
 
static HRESULT WINAPI xmlparser_SetFlags (IXMLParser *iface, ULONG flags)
 
static HRESULT WINAPI xmlparser_SetSecureBaseURL (IXMLParser *iface, const WCHAR *baseUrl)
 
static HRESULT WINAPI xmlparser_GetSecureBaseURL (IXMLParser *iface, const WCHAR **ppBuf)
 
HRESULT XMLParser_create (void **ppObj)
 

Variables

static const struct IXMLParserVtbl xmlparser_vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 20 of file xmlparser.c.

Typedef Documentation

◆ xmlparser

Function Documentation

◆ impl_from_IXMLParser()

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msxml  )

◆ xmlparser_Abort()

static HRESULT WINAPI xmlparser_Abort ( IXMLParser *  iface,
BSTR  bstrErrorInfo 
)
static

Definition at line 134 of file xmlparser.c.

135{
137
138 FIXME("(%p, %s)\n", This, debugstr_w(bstrErrorInfo));
139
140 return E_NOTIMPL;
141}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_NOTIMPL
Definition: ddrawi.h:99
static xmlparser * impl_from_IXMLParser(IXMLParser *iface)
Definition: xmlparser.c:44
#define debugstr_w
Definition: kernel32.h:32

◆ xmlparser_AddRef()

static ULONG WINAPI xmlparser_AddRef ( IXMLParser *  iface)
static

Definition at line 72 of file xmlparser.c.

73{
76 TRACE("%p, refcount %lu.\n", iface, ref);
77 return ref;
78}
#define InterlockedIncrement
Definition: armddk.h:53
#define TRACE(s)
Definition: solgame.cpp:4
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ XMLParser_create()

HRESULT XMLParser_create ( void **  ppObj)

Definition at line 414 of file xmlparser.c.

415{
417
418 TRACE("(%p)\n", ppObj);
419
420 This = malloc(sizeof(xmlparser));
421 if(!This)
422 return E_OUTOFMEMORY;
423
424 This->IXMLParser_iface.lpVtbl = &xmlparser_vtbl;
425 This->nodefactory = NULL;
426 This->input = NULL;
427 This->flags = 0;
428 This->state = XMLPARSER_IDLE;
429 This->ref = 1;
430
431 *ppObj = &This->IXMLParser_iface;
432
433 TRACE("returning iface %p\n", *ppObj);
434
435 return S_OK;
436}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
static const struct IXMLParserVtbl xmlparser_vtbl
Definition: xmlparser.c:379
@ XMLPARSER_IDLE
Definition: xmlparser.idl:195
#define S_OK
Definition: intsafe.h:52

◆ xmlparser_ExpandEntity()

static HRESULT WINAPI xmlparser_ExpandEntity ( IXMLParser *  iface,
const WCHAR text,
ULONG  len 
)
static

Definition at line 289 of file xmlparser.c.

291{
292 FIXME("%p, %s, %ld.\n", iface, debugstr_w(text), len);
293
294 return E_NOTIMPL;
295}
const WCHAR * text
Definition: package.c:1794
GLenum GLsizei len
Definition: glext.h:6722

◆ xmlparser_GetAbsolutePosition()

static ULONG WINAPI xmlparser_GetAbsolutePosition ( IXMLParser *  iface)
static

Definition at line 161 of file xmlparser.c.

162{
164
165 FIXME("(%p)\n", This);
166
167 return 0;
168}

◆ xmlparser_GetErrorInfo()

static HRESULT WINAPI xmlparser_GetErrorInfo ( IXMLParser *  iface,
BSTR pErrorInfo 
)
static

Definition at line 189 of file xmlparser.c.

190{
192
193 FIXME("(%p %p)\n", This, pErrorInfo);
194
195 return E_NOTIMPL;
196}

◆ xmlparser_GetFactory()

static HRESULT WINAPI xmlparser_GetFactory ( IXMLParser *  iface,
IXMLNodeFactory **  ppNodeFactory 
)
static

Definition at line 117 of file xmlparser.c.

118{
120
121 TRACE("(%p, %p)\n", This, ppNodeFactory);
122
123 if(!ppNodeFactory)
124 return E_INVALIDARG;
125
126 *ppNodeFactory = This->nodefactory;
127
128 if(*ppNodeFactory)
129 IXMLNodeFactory_AddRef(*ppNodeFactory);
130
131 return S_OK;
132}
#define E_INVALIDARG
Definition: ddrawi.h:101

◆ xmlparser_GetFlags()

static ULONG WINAPI xmlparser_GetFlags ( IXMLParser *  iface)
static

Definition at line 198 of file xmlparser.c.

199{
201
202 TRACE("(%p)\n", This);
203
204 return This->flags;
205}

◆ xmlparser_GetLastError()

static HRESULT WINAPI xmlparser_GetLastError ( IXMLParser *  iface)
static

Definition at line 180 of file xmlparser.c.

181{
183
184 FIXME("(%p)\n", This);
185
186 return E_NOTIMPL;
187}

◆ xmlparser_GetLineBuffer()

static HRESULT WINAPI xmlparser_GetLineBuffer ( IXMLParser *  iface,
const WCHAR **  ppBuf,
ULONG len,
ULONG startPos 
)
static

Definition at line 170 of file xmlparser.c.

172{
174
175 FIXME("(%p %p %p %p)\n", This, ppBuf, len, startPos);
176
177 return 0;
178}

◆ xmlparser_GetLineNumber()

static ULONG WINAPI xmlparser_GetLineNumber ( IXMLParser *  iface)
static

Definition at line 143 of file xmlparser.c.

144{
146
147 FIXME("(%p)\n", This);
148
149 return 0;
150}

◆ xmlparser_GetLinePosition()

static ULONG WINAPI xmlparser_GetLinePosition ( IXMLParser *  iface)
static

Definition at line 152 of file xmlparser.c.

153{
155
156 FIXME("(%p)\n", This);
157
158 return 0;
159}

◆ xmlparser_GetParserState()

static HRESULT WINAPI xmlparser_GetParserState ( IXMLParser *  iface)
static

Definition at line 322 of file xmlparser.c.

323{
325
326 TRACE("(%p)\n", This);
327
328 return This->state;
329}

◆ xmlparser_GetRoot()

static HRESULT WINAPI xmlparser_GetRoot ( IXMLParser *  iface,
PVOID ppRoot 
)
static

Definition at line 306 of file xmlparser.c.

307{
309
310 FIXME("(%p %p)\n", This, ppRoot);
311
312 return E_NOTIMPL;
313}

◆ xmlparser_GetSecureBaseURL()

static HRESULT WINAPI xmlparser_GetSecureBaseURL ( IXMLParser *  iface,
const WCHAR **  ppBuf 
)
static

Definition at line 369 of file xmlparser.c.

370{
372
373 FIXME("(%p %p)\n", This, ppBuf);
374
375 return E_NOTIMPL;
376}

◆ xmlparser_GetURL()

static HRESULT WINAPI xmlparser_GetURL ( IXMLParser *  iface,
const WCHAR **  ppBuf 
)
static

Definition at line 207 of file xmlparser.c.

208{
210
211 FIXME("(%p %p)\n", This, ppBuf);
212
213 return E_NOTIMPL;
214}

◆ xmlparser_Load()

static HRESULT WINAPI xmlparser_Load ( IXMLParser *  iface,
BOOL  bFullyAvailable,
IMoniker pMon,
LPBC  pBC,
DWORD  dwMode 
)
static

Definition at line 227 of file xmlparser.c.

229{
230 FIXME("%p, %d, %p, %p, %ld.\n", iface, bFullyAvailable, pMon, pBC, dwMode);
231
232 return E_NOTIMPL;
233}

◆ xmlparser_LoadDTD()

static HRESULT WINAPI xmlparser_LoadDTD ( IXMLParser *  iface,
const WCHAR baseUrl,
const WCHAR relativeUrl 
)
static

Definition at line 261 of file xmlparser.c.

263{
265
266 FIXME("(%p %s %s)\n", This, debugstr_w(baseUrl), debugstr_w(relativeUrl));
267
268 return E_NOTIMPL;
269}

◆ xmlparser_LoadEntity()

static HRESULT WINAPI xmlparser_LoadEntity ( IXMLParser *  iface,
const WCHAR baseUrl,
const WCHAR relativeUrl,
BOOL  fpe 
)
static

Definition at line 271 of file xmlparser.c.

273{
275
276 FIXME("(%p %s %s %d)\n", This, debugstr_w(baseUrl), debugstr_w(relativeUrl), fpe);
277
278 return E_NOTIMPL;
279}

◆ xmlparser_ParseEntity()

static HRESULT WINAPI xmlparser_ParseEntity ( IXMLParser *  iface,
const WCHAR text,
ULONG  len,
BOOL  fpe 
)
static

Definition at line 281 of file xmlparser.c.

283{
284 FIXME("%p, %s, %lu, %d.\n", iface, debugstr_w(text), len, fpe);
285
286 return E_NOTIMPL;
287}

◆ xmlparser_PushData()

static HRESULT WINAPI xmlparser_PushData ( IXMLParser *  iface,
const char pData,
ULONG  nChars,
BOOL  fLastBuffer 
)
static

Definition at line 253 of file xmlparser.c.

255{
256 FIXME("%p, %s, %lu, %d.\n", iface, debugstr_a(pData), nChars, fLastBuffer);
257
258 return E_NOTIMPL;
259}
#define debugstr_a
Definition: kernel32.h:31
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830

◆ xmlparser_QueryInterface()

static HRESULT WINAPI xmlparser_QueryInterface ( IXMLParser *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 50 of file xmlparser.c.

51{
53 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
54
55 if ( IsEqualGUID( riid, &IID_IXMLParser ) ||
56 IsEqualGUID( riid, &IID_IXMLNodeSource ) ||
58 {
59 *ppvObject = iface;
60 }
61 else
62 {
63 TRACE("Unsupported interface %s\n", debugstr_guid(riid));
64 *ppvObject = NULL;
65 return E_NOINTERFACE;
66 }
67
68 IXMLParser_AddRef(iface);
69 return S_OK;
70}
const GUID IID_IUnknown
REFIID riid
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ xmlparser_Release()

static ULONG WINAPI xmlparser_Release ( IXMLParser *  iface)
static

Definition at line 80 of file xmlparser.c.

81{
84
85 TRACE("%p, refcount %lu.\n", iface, ref);
86 if ( ref == 0 )
87 {
88 if(This->input)
89 IUnknown_Release(This->input);
90
91 if(This->nodefactory)
92 IXMLNodeFactory_Release(This->nodefactory);
93
94 free(This);
95 }
96
97 return ref;
98}
#define InterlockedDecrement
Definition: armddk.h:52
#define free
Definition: debug_ros.c:5

◆ xmlparser_Reset()

static HRESULT WINAPI xmlparser_Reset ( IXMLParser *  iface)
static

Definition at line 340 of file xmlparser.c.

341{
343
344 FIXME("(%p)\n", This);
345
346 return E_NOTIMPL;
347}

◆ xmlparser_Run()

static HRESULT WINAPI xmlparser_Run ( IXMLParser *  iface,
LONG  chars 
)
static

Definition at line 315 of file xmlparser.c.

316{
317 FIXME("%p, %ld.\n", iface, chars);
318
319 return E_NOTIMPL;
320}

◆ xmlparser_SetFactory()

static HRESULT WINAPI xmlparser_SetFactory ( IXMLParser *  iface,
IXMLNodeFactory *  pNodeFactory 
)
static

Definition at line 101 of file xmlparser.c.

102{
104
105 TRACE("(%p %p)\n", This, pNodeFactory);
106
107 if(This->nodefactory)
108 IXMLNodeFactory_Release(This->nodefactory);
109
110 This->nodefactory = pNodeFactory;
111 if(This->nodefactory)
112 IXMLNodeFactory_AddRef(This->nodefactory);
113
114 return S_OK;
115}

◆ xmlparser_SetFlags()

static HRESULT WINAPI xmlparser_SetFlags ( IXMLParser *  iface,
ULONG  flags 
)
static

Definition at line 349 of file xmlparser.c.

350{
352
353 TRACE("%p, %lx.\n", iface, flags);
354
355 This->flags = flags;
356
357 return S_OK;
358}
GLbitfield flags
Definition: glext.h:7161

◆ xmlparser_SetInput()

static HRESULT WINAPI xmlparser_SetInput ( IXMLParser *  iface,
IUnknown pStm 
)
static

Definition at line 235 of file xmlparser.c.

236{
238
239 TRACE("(%p %p)\n", This, pStm);
240
241 if(!pStm)
242 return E_INVALIDARG;
243
244 if(This->input)
245 IUnknown_Release(This->input);
246
247 This->input = pStm;
248 IUnknown_AddRef(This->input);
249
250 return S_OK;
251}

◆ xmlparser_SetRoot()

static HRESULT WINAPI xmlparser_SetRoot ( IXMLParser *  iface,
PVOID  pRoot 
)
static

Definition at line 297 of file xmlparser.c.

298{
300
301 FIXME("(%p %p)\n", This, pRoot);
302
303 return E_NOTIMPL;
304}

◆ xmlparser_SetSecureBaseURL()

static HRESULT WINAPI xmlparser_SetSecureBaseURL ( IXMLParser *  iface,
const WCHAR baseUrl 
)
static

Definition at line 360 of file xmlparser.c.

361{
363
364 FIXME("(%p %s)\n", This, debugstr_w(baseUrl));
365
366 return E_NOTIMPL;
367}

◆ xmlparser_SetURL()

static HRESULT WINAPI xmlparser_SetURL ( IXMLParser *  iface,
const WCHAR pszBaseUrl,
const WCHAR relativeUrl,
BOOL  async 
)
static

Definition at line 217 of file xmlparser.c.

219{
221
222 FIXME("(%p %s %s %d)\n", This, debugstr_w(pszBaseUrl), debugstr_w(relativeUrl), async);
223
224 return E_NOTIMPL;
225}

◆ xmlparser_Suspend()

static HRESULT WINAPI xmlparser_Suspend ( IXMLParser *  iface)
static

Definition at line 331 of file xmlparser.c.

332{
334
335 FIXME("(%p)\n", This);
336
337 return E_NOTIMPL;
338}

Variable Documentation

◆ xmlparser_vtbl

const struct IXMLParserVtbl xmlparser_vtbl
static

Definition at line 379 of file xmlparser.c.

Referenced by XMLParser_create().