ReactOS 0.4.15-dev-7953-g1f49173
xmlparser.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 "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 147 of file xmlparser.c.

148{
150
151 FIXME("(%p, %s)\n", This, debugstr_w(bstrErrorInfo));
152
153 return E_NOTIMPL;
154}
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99
static xmlparser * impl_from_IXMLParser(IXMLParser *iface)
Definition: xmlparser.c:57
#define debugstr_w
Definition: kernel32.h:32

◆ xmlparser_AddRef()

static ULONG WINAPI xmlparser_AddRef ( IXMLParser *  iface)
static

Definition at line 85 of file xmlparser.c.

86{
89 TRACE("(%p)->(%d)\n", This, ref);
90 return ref;
91}
#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 437 of file xmlparser.c.

438{
440
441 TRACE("(%p)\n", ppObj);
442
443 This = heap_alloc( sizeof(xmlparser) );
444 if(!This)
445 return E_OUTOFMEMORY;
446
447 This->IXMLParser_iface.lpVtbl = &xmlparser_vtbl;
448 This->nodefactory = NULL;
449 This->input = NULL;
450 This->flags = 0;
451 This->state = XMLPARSER_IDLE;
452 This->ref = 1;
453
454 *ppObj = &This->IXMLParser_iface;
455
456 TRACE("returning iface %p\n", *ppObj);
457
458 return S_OK;
459}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
static const struct IXMLParserVtbl xmlparser_vtbl
Definition: xmlparser.c:402
@ 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 308 of file xmlparser.c.

310{
312
313 FIXME("(%p %s %d)\n", This, debugstr_w(text), len);
314
315 return E_NOTIMPL;
316}
const WCHAR * text
Definition: package.c:1799
GLenum GLsizei len
Definition: glext.h:6722

◆ xmlparser_GetAbsolutePosition()

static ULONG WINAPI xmlparser_GetAbsolutePosition ( IXMLParser *  iface)
static

Definition at line 174 of file xmlparser.c.

175{
177
178 FIXME("(%p)\n", This);
179
180 return 0;
181}

◆ xmlparser_GetErrorInfo()

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

Definition at line 202 of file xmlparser.c.

203{
205
206 FIXME("(%p %p)\n", This, pErrorInfo);
207
208 return E_NOTIMPL;
209}

◆ xmlparser_GetFactory()

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

Definition at line 130 of file xmlparser.c.

131{
133
134 TRACE("(%p, %p)\n", This, ppNodeFactory);
135
136 if(!ppNodeFactory)
137 return E_INVALIDARG;
138
139 *ppNodeFactory = This->nodefactory;
140
141 if(*ppNodeFactory)
142 IXMLNodeFactory_AddRef(*ppNodeFactory);
143
144 return S_OK;
145}
#define E_INVALIDARG
Definition: ddrawi.h:101

◆ xmlparser_GetFlags()

static ULONG WINAPI xmlparser_GetFlags ( IXMLParser *  iface)
static

Definition at line 211 of file xmlparser.c.

212{
214
215 TRACE("(%p)\n", This);
216
217 return This->flags;
218}

◆ xmlparser_GetLastError()

static HRESULT WINAPI xmlparser_GetLastError ( IXMLParser *  iface)
static

Definition at line 193 of file xmlparser.c.

194{
196
197 FIXME("(%p)\n", This);
198
199 return E_NOTIMPL;
200}

◆ xmlparser_GetLineBuffer()

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

Definition at line 183 of file xmlparser.c.

185{
187
188 FIXME("(%p %p %p %p)\n", This, ppBuf, len, startPos);
189
190 return 0;
191}

◆ xmlparser_GetLineNumber()

static ULONG WINAPI xmlparser_GetLineNumber ( IXMLParser *  iface)
static

Definition at line 156 of file xmlparser.c.

157{
159
160 FIXME("(%p)\n", This);
161
162 return 0;
163}

◆ xmlparser_GetLinePosition()

static ULONG WINAPI xmlparser_GetLinePosition ( IXMLParser *  iface)
static

Definition at line 165 of file xmlparser.c.

166{
168
169 FIXME("(%p)\n", This);
170
171 return 0;
172}

◆ xmlparser_GetParserState()

static HRESULT WINAPI xmlparser_GetParserState ( IXMLParser *  iface)
static

Definition at line 345 of file xmlparser.c.

346{
348
349 TRACE("(%p)\n", This);
350
351 return This->state;
352}

◆ xmlparser_GetRoot()

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

Definition at line 327 of file xmlparser.c.

328{
330
331 FIXME("(%p %p)\n", This, ppRoot);
332
333 return E_NOTIMPL;
334}

◆ xmlparser_GetSecureBaseURL()

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

Definition at line 392 of file xmlparser.c.

393{
395
396 FIXME("(%p %p)\n", This, ppBuf);
397
398 return E_NOTIMPL;
399}

◆ xmlparser_GetURL()

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

Definition at line 220 of file xmlparser.c.

221{
223
224 FIXME("(%p %p)\n", This, ppBuf);
225
226 return E_NOTIMPL;
227}

◆ xmlparser_Load()

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

Definition at line 240 of file xmlparser.c.

242{
244
245 FIXME("(%p %d %p %p %d)\n", This, bFullyAvailable, pMon, pBC, dwMode);
246
247 return E_NOTIMPL;
248}

◆ xmlparser_LoadDTD()

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

Definition at line 278 of file xmlparser.c.

280{
282
283 FIXME("(%p %s %s)\n", This, debugstr_w(baseUrl), debugstr_w(relativeUrl));
284
285 return E_NOTIMPL;
286}

◆ xmlparser_LoadEntity()

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

Definition at line 288 of file xmlparser.c.

290{
292
293 FIXME("(%p %s %s %d)\n", This, debugstr_w(baseUrl), debugstr_w(relativeUrl), fpe);
294
295 return E_NOTIMPL;
296}

◆ xmlparser_ParseEntity()

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

Definition at line 298 of file xmlparser.c.

300{
302
303 FIXME("(%p %s %d %d)\n", This, debugstr_w(text), len, fpe);
304
305 return E_NOTIMPL;
306}

◆ xmlparser_PushData()

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

Definition at line 268 of file xmlparser.c.

270{
272
273 FIXME("(%p %s %d %d)\n", This, debugstr_a(pData), nChars, fLastBuffer);
274
275 return E_NOTIMPL;
276}
#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 63 of file xmlparser.c.

64{
66 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
67
68 if ( IsEqualGUID( riid, &IID_IXMLParser ) ||
69 IsEqualGUID( riid, &IID_IXMLNodeSource ) ||
71 {
72 *ppvObject = iface;
73 }
74 else
75 {
76 TRACE("Unsupported interface %s\n", debugstr_guid(riid));
77 *ppvObject = NULL;
78 return E_NOINTERFACE;
79 }
80
81 IXMLParser_AddRef(iface);
82 return S_OK;
83}
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
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ xmlparser_Release()

static ULONG WINAPI xmlparser_Release ( IXMLParser *  iface)
static

Definition at line 93 of file xmlparser.c.

94{
97
98 TRACE("(%p)->(%d)\n", This, ref);
99 if ( ref == 0 )
100 {
101 if(This->input)
102 IUnknown_Release(This->input);
103
104 if(This->nodefactory)
105 IXMLNodeFactory_Release(This->nodefactory);
106
107 heap_free( This );
108 }
109
110 return ref;
111}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedDecrement
Definition: armddk.h:52

◆ xmlparser_Reset()

static HRESULT WINAPI xmlparser_Reset ( IXMLParser *  iface)
static

Definition at line 363 of file xmlparser.c.

364{
366
367 FIXME("(%p)\n", This);
368
369 return E_NOTIMPL;
370}

◆ xmlparser_Run()

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

Definition at line 336 of file xmlparser.c.

337{
339
340 FIXME("(%p %d)\n", This, chars);
341
342 return E_NOTIMPL;
343}

◆ xmlparser_SetFactory()

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

Definition at line 114 of file xmlparser.c.

115{
117
118 TRACE("(%p %p)\n", This, pNodeFactory);
119
120 if(This->nodefactory)
121 IXMLNodeFactory_Release(This->nodefactory);
122
123 This->nodefactory = pNodeFactory;
124 if(This->nodefactory)
125 IXMLNodeFactory_AddRef(This->nodefactory);
126
127 return S_OK;
128}

◆ xmlparser_SetFlags()

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

Definition at line 372 of file xmlparser.c.

373{
375
376 TRACE("(%p %d)\n", This, flags);
377
378 This->flags = flags;
379
380 return S_OK;
381}
GLbitfield flags
Definition: glext.h:7161

◆ xmlparser_SetInput()

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

Definition at line 250 of file xmlparser.c.

251{
253
254 TRACE("(%p %p)\n", This, pStm);
255
256 if(!pStm)
257 return E_INVALIDARG;
258
259 if(This->input)
260 IUnknown_Release(This->input);
261
262 This->input = pStm;
263 IUnknown_AddRef(This->input);
264
265 return S_OK;
266}

◆ xmlparser_SetRoot()

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

Definition at line 318 of file xmlparser.c.

319{
321
322 FIXME("(%p %p)\n", This, pRoot);
323
324 return E_NOTIMPL;
325}

◆ xmlparser_SetSecureBaseURL()

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

Definition at line 383 of file xmlparser.c.

384{
386
387 FIXME("(%p %s)\n", This, debugstr_w(baseUrl));
388
389 return E_NOTIMPL;
390}

◆ xmlparser_SetURL()

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

Definition at line 230 of file xmlparser.c.

232{
234
235 FIXME("(%p %s %s %d)\n", This, debugstr_w(pszBaseUrl), debugstr_w(relativeUrl), async);
236
237 return E_NOTIMPL;
238}

◆ xmlparser_Suspend()

static HRESULT WINAPI xmlparser_Suspend ( IXMLParser *  iface)
static

Definition at line 354 of file xmlparser.c.

355{
357
358 FIXME("(%p)\n", This);
359
360 return E_NOTIMPL;
361}

Variable Documentation

◆ xmlparser_vtbl

const struct IXMLParserVtbl xmlparser_vtbl
static

Definition at line 402 of file xmlparser.c.

Referenced by XMLParser_create().