ReactOS 0.4.15-dev-5667-ged97270
xmlhttprequest.c File Reference
#include "mshtml_private.h"
Include dependency graph for xmlhttprequest.c:

Go to the source code of this file.

Classes

struct  HTMLXMLHttpRequest
 
struct  XMLHttpReqEventListener
 

Typedefs

typedef struct XMLHttpReqEventListener XMLHttpReqEventListener
 

Functions

static HRESULT bstr_to_nsacstr (BSTR bstr, nsACString *str)
 
static HRESULT variant_to_nsastr (VARIANT var, nsAString *ret)
 
static HRESULT return_nscstr (nsresult nsres, nsACString *nscstr, BSTR *p)
 
static void detach_xhr_event_listener (XMLHttpReqEventListener *event_listener)
 
static XMLHttpReqEventListenerimpl_from_nsIDOMEventListener (nsIDOMEventListener *iface)
 
static nsresult NSAPI XMLHttpReqEventListener_QueryInterface (nsIDOMEventListener *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI XMLHttpReqEventListener_AddRef (nsIDOMEventListener *iface)
 
static nsrefcnt NSAPI XMLHttpReqEventListener_Release (nsIDOMEventListener *iface)
 
static nsresult NSAPI XMLHttpReqEventListener_HandleEvent (nsIDOMEventListener *iface, nsIDOMEvent *event)
 
static HTMLXMLHttpRequestimpl_from_IHTMLXMLHttpRequest (IHTMLXMLHttpRequest *iface)
 
static HRESULT WINAPI HTMLXMLHttpRequest_QueryInterface (IHTMLXMLHttpRequest *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLXMLHttpRequest_AddRef (IHTMLXMLHttpRequest *iface)
 
static ULONG WINAPI HTMLXMLHttpRequest_Release (IHTMLXMLHttpRequest *iface)
 
static HRESULT WINAPI HTMLXMLHttpRequest_GetTypeInfoCount (IHTMLXMLHttpRequest *iface, UINT *pctinfo)
 
static HRESULT WINAPI HTMLXMLHttpRequest_GetTypeInfo (IHTMLXMLHttpRequest *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI HTMLXMLHttpRequest_GetIDsOfNames (IHTMLXMLHttpRequest *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI HTMLXMLHttpRequest_Invoke (IHTMLXMLHttpRequest *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI HTMLXMLHttpRequest_get_readyState (IHTMLXMLHttpRequest *iface, LONG *p)
 
static HRESULT WINAPI HTMLXMLHttpRequest_get_responseBody (IHTMLXMLHttpRequest *iface, VARIANT *p)
 
static HRESULT WINAPI HTMLXMLHttpRequest_get_responseText (IHTMLXMLHttpRequest *iface, BSTR *p)
 
static HRESULT WINAPI HTMLXMLHttpRequest_get_responseXML (IHTMLXMLHttpRequest *iface, IDispatch **p)
 
static HRESULT WINAPI HTMLXMLHttpRequest_get_status (IHTMLXMLHttpRequest *iface, LONG *p)
 
static HRESULT WINAPI HTMLXMLHttpRequest_get_statusText (IHTMLXMLHttpRequest *iface, BSTR *p)
 
static HRESULT WINAPI HTMLXMLHttpRequest_put_onreadystatechange (IHTMLXMLHttpRequest *iface, VARIANT v)
 
static HRESULT WINAPI HTMLXMLHttpRequest_get_onreadystatechange (IHTMLXMLHttpRequest *iface, VARIANT *p)
 
static HRESULT WINAPI HTMLXMLHttpRequest_abort (IHTMLXMLHttpRequest *iface)
 
static HRESULT WINAPI HTMLXMLHttpRequest_open (IHTMLXMLHttpRequest *iface, BSTR bstrMethod, BSTR bstrUrl, VARIANT varAsync, VARIANT varUser, VARIANT varPassword)
 
static HRESULT WINAPI HTMLXMLHttpRequest_send (IHTMLXMLHttpRequest *iface, VARIANT varBody)
 
static HRESULT WINAPI HTMLXMLHttpRequest_getAllResponseHeaders (IHTMLXMLHttpRequest *iface, BSTR *p)
 
static HRESULT WINAPI HTMLXMLHttpRequest_getResponseHeader (IHTMLXMLHttpRequest *iface, BSTR bstrHeader, BSTR *p)
 
static HRESULT WINAPI HTMLXMLHttpRequest_setRequestHeader (IHTMLXMLHttpRequest *iface, BSTR bstrHeader, BSTR bstrValue)
 
static HTMLXMLHttpRequestimpl_from_DispatchEx (DispatchEx *iface)
 
static void HTMLXMLHttpRequest_bind_event (DispatchEx *dispex, int eid)
 
static HTMLXMLHttpRequestFactoryimpl_from_IHTMLXMLHttpRequestFactory (IHTMLXMLHttpRequestFactory *iface)
 
static HRESULT WINAPI HTMLXMLHttpRequestFactory_QueryInterface (IHTMLXMLHttpRequestFactory *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLXMLHttpRequestFactory_AddRef (IHTMLXMLHttpRequestFactory *iface)
 
static ULONG WINAPI HTMLXMLHttpRequestFactory_Release (IHTMLXMLHttpRequestFactory *iface)
 
static HRESULT WINAPI HTMLXMLHttpRequestFactory_GetTypeInfoCount (IHTMLXMLHttpRequestFactory *iface, UINT *pctinfo)
 
static HRESULT WINAPI HTMLXMLHttpRequestFactory_GetTypeInfo (IHTMLXMLHttpRequestFactory *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI HTMLXMLHttpRequestFactory_GetIDsOfNames (IHTMLXMLHttpRequestFactory *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI HTMLXMLHttpRequestFactory_Invoke (IHTMLXMLHttpRequestFactory *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI HTMLXMLHttpRequestFactory_create (IHTMLXMLHttpRequestFactory *iface, IHTMLXMLHttpRequest **p)
 
HRESULT HTMLXMLHttpRequestFactory_Create (HTMLInnerWindow *window, HTMLXMLHttpRequestFactory **ret_ptr)
 

Variables

static const nsIDOMEventListenerVtbl XMLHttpReqEventListenerVtbl
 
static const IHTMLXMLHttpRequestVtbl HTMLXMLHttpRequestVtbl
 
static dispex_static_data_vtbl_t HTMLXMLHttpRequest_dispex_vtbl
 
static const tid_t HTMLXMLHttpRequest_iface_tids []
 
static dispex_static_data_t HTMLXMLHttpRequest_dispex
 
static const IHTMLXMLHttpRequestFactoryVtbl HTMLXMLHttpRequestFactoryVtbl
 
static const tid_t HTMLXMLHttpRequestFactory_iface_tids []
 
static dispex_static_data_t HTMLXMLHttpRequestFactory_dispex
 

Typedef Documentation

◆ XMLHttpReqEventListener

Function Documentation

◆ bstr_to_nsacstr()

static HRESULT bstr_to_nsacstr ( BSTR  bstr,
nsACString str 
)
static

Definition at line 21 of file xmlhttprequest.c.

22{
23 char *cstr = heap_strdupWtoU(bstr);
24 if(!cstr)
25 return E_OUTOFMEMORY;
26 nsACString_Init(str, cstr);
27 heap_free(cstr);
28 return S_OK;
29}
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define S_OK
Definition: intsafe.h:52
BOOL nsACString_Init(nsACString *str, const char *data) DECLSPEC_HIDDEN
Definition: nsembed.c:788
static char * heap_strdupWtoU(const WCHAR *str)
const WCHAR * str

Referenced by HTMLXMLHttpRequest_open().

◆ detach_xhr_event_listener()

static void detach_xhr_event_listener ( XMLHttpReqEventListener event_listener)
static

Definition at line 93 of file xmlhttprequest.c.

94{
95 nsIDOMEventTarget *event_target;
97 nsresult nsres;
98
99 static const WCHAR readystatechangeW[] =
100 {'o','n','r','e','a','d','y','s','t','a','t','e','c','h','a','n','g','e',0};
101
102 nsres = nsIXMLHttpRequest_QueryInterface(event_listener->xhr->nsxhr, &IID_nsIDOMEventTarget, (void**)&event_target);
103 assert(nsres == NS_OK);
104
106 nsres = nsIDOMEventTarget_RemoveEventListener(event_target, &str, &event_listener->nsIDOMEventListener_iface, FALSE);
108 nsIDOMEventTarget_Release(event_target);
109
110 event_listener->xhr->event_listener = NULL;
111 event_listener->xhr = NULL;
112 nsIDOMEventListener_Release(&event_listener->nsIDOMEventListener_iface);
113}
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define assert(x)
Definition: debug.h:53
static const WCHAR readystatechangeW[]
Definition: htmlevent.c:106
#define NS_OK
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
void nsAString_InitDepend(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:826
XMLHttpReqEventListener * event_listener
nsIXMLHttpRequest * nsxhr
HTMLXMLHttpRequest * xhr
nsIDOMEventListener nsIDOMEventListener_iface
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by HTMLXMLHttpRequest_Release().

◆ HTMLXMLHttpRequest_abort()

static HRESULT WINAPI HTMLXMLHttpRequest_abort ( IHTMLXMLHttpRequest *  iface)
static

Definition at line 393 of file xmlhttprequest.c.

394{
396 nsresult nsres;
397
398 TRACE("(%p)->()\n", This);
399
400 nsres = nsIXMLHttpRequest_SlowAbort(This->nsxhr);
401 if(NS_FAILED(nsres)) {
402 ERR("nsIXMLHttpRequest_SlowAbort failed: %08x\n", nsres);
403 return E_FAIL;
404 }
405
406 return S_OK;
407}
#define ERR(fmt,...)
Definition: debug.h:110
#define E_FAIL
Definition: ddrawi.h:102
static HTMLXMLHttpRequest * impl_from_IHTMLXMLHttpRequest(IHTMLXMLHttpRequest *iface)
#define NS_FAILED(res)
#define TRACE(s)
Definition: solgame.cpp:4

◆ HTMLXMLHttpRequest_AddRef()

static ULONG WINAPI HTMLXMLHttpRequest_AddRef ( IHTMLXMLHttpRequest *  iface)
static

Definition at line 217 of file xmlhttprequest.c.

218{
221
222 TRACE("(%p) ref=%d\n", This, ref);
223
224 return ref;
225}
#define InterlockedIncrement
Definition: armddk.h:53
long LONG
Definition: pedump.c:60
Definition: send.c:48

◆ HTMLXMLHttpRequest_bind_event()

static void HTMLXMLHttpRequest_bind_event ( DispatchEx dispex,
int  eid 
)
static

Definition at line 597 of file xmlhttprequest.c.

598{
600 nsIDOMEventTarget *nstarget;
601 nsAString type_str;
602 nsresult nsres;
603
604 static const WCHAR readystatechangeW[] = {'r','e','a','d','y','s','t','a','t','e','c','h','a','n','g','e',0};
605
606 TRACE("(%p)\n", This);
607
609
610 if(This->event_listener)
611 return;
612
613 This->event_listener = heap_alloc(sizeof(*This->event_listener));
614 if(!This->event_listener)
615 return;
616
617 This->event_listener->nsIDOMEventListener_iface.lpVtbl = &XMLHttpReqEventListenerVtbl;
618 This->event_listener->ref = 1;
619 This->event_listener->xhr = This;
620
621 nsres = nsIXMLHttpRequest_QueryInterface(This->nsxhr, &IID_nsIDOMEventTarget, (void**)&nstarget);
622 assert(nsres == NS_OK);
623
625 nsres = nsIDOMEventTarget_AddEventListener(nstarget, &type_str, &This->event_listener->nsIDOMEventListener_iface, FALSE, TRUE, 2);
626 nsAString_Finish(&type_str);
627 nsIDOMEventTarget_Release(nstarget);
628 if(NS_FAILED(nsres))
629 ERR("AddEventListener failed: %08x\n", nsres);
630}
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define TRUE
Definition: types.h:120
static const nsIDOMEventListenerVtbl XMLHttpReqEventListenerVtbl
static HTMLXMLHttpRequest * impl_from_DispatchEx(DispatchEx *iface)
@ EVENTID_READYSTATECHANGE
Definition: htmlevent.h:47

◆ HTMLXMLHttpRequest_get_onreadystatechange()

static HRESULT WINAPI HTMLXMLHttpRequest_get_onreadystatechange ( IHTMLXMLHttpRequest *  iface,
VARIANT p 
)
static

Definition at line 384 of file xmlhttprequest.c.

385{
387
388 TRACE("(%p)->(%p)\n", This, p);
389
390 return get_event_handler(&This->event_target, EVENTID_READYSTATECHANGE, p);
391}
GLfloat GLfloat p
Definition: glext.h:8902
HRESULT get_event_handler(EventTarget *event_target, eventid_t eid, VARIANT *var)
Definition: htmlevent.c:1447

◆ HTMLXMLHttpRequest_get_readyState()

static HRESULT WINAPI HTMLXMLHttpRequest_get_readyState ( IHTMLXMLHttpRequest *  iface,
LONG p 
)
static

Definition at line 277 of file xmlhttprequest.c.

278{
280 UINT16 val;
281 nsresult nsres;
282
283 TRACE("(%p)->(%p)\n", This, p);
284
285 if(!p)
286 return E_POINTER;
287 nsres = nsIXMLHttpRequest_GetReadyState(This->nsxhr, &val);
288 if(NS_FAILED(nsres)) {
289 ERR("nsIXMLHttpRequest_GetReadyState failed: %08x\n", nsres);
290 return E_FAIL;
291 }
292 *p = val;
293 return S_OK;
294}
unsigned short UINT16
GLuint GLfloat * val
Definition: glext.h:7180
#define E_POINTER
Definition: winerror.h:2365

◆ HTMLXMLHttpRequest_get_responseBody()

static HRESULT WINAPI HTMLXMLHttpRequest_get_responseBody ( IHTMLXMLHttpRequest *  iface,
VARIANT p 
)
static

Definition at line 296 of file xmlhttprequest.c.

297{
299 FIXME("(%p)->(%p)\n", This, p);
300 return E_NOTIMPL;
301}
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ HTMLXMLHttpRequest_get_responseText()

static HRESULT WINAPI HTMLXMLHttpRequest_get_responseText ( IHTMLXMLHttpRequest *  iface,
BSTR p 
)
static

Definition at line 303 of file xmlhttprequest.c.

304{
306 nsAString nsstr;
307 nsresult nsres;
308
309 TRACE("(%p)->(%p)\n", This, p);
310
311 if(!p)
312 return E_POINTER;
313
314 nsAString_Init(&nsstr, NULL);
315 nsres = nsIXMLHttpRequest_GetResponseText(This->nsxhr, &nsstr);
316 return return_nsstr(nsres, &nsstr, p);
317}
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:817
HRESULT return_nsstr(nsresult, nsAString *, BSTR *) DECLSPEC_HIDDEN
Definition: nsembed.c:841

◆ HTMLXMLHttpRequest_get_responseXML()

static HRESULT WINAPI HTMLXMLHttpRequest_get_responseXML ( IHTMLXMLHttpRequest *  iface,
IDispatch **  p 
)
static

Definition at line 319 of file xmlhttprequest.c.

320{
322 FIXME("(%p)->(%p)\n", This, p);
323 return E_NOTIMPL;
324}

◆ HTMLXMLHttpRequest_get_status()

static HRESULT WINAPI HTMLXMLHttpRequest_get_status ( IHTMLXMLHttpRequest *  iface,
LONG p 
)
static

Definition at line 326 of file xmlhttprequest.c.

327{
329 DWORD val;
330 nsresult nsres;
331 TRACE("(%p)->(%p)\n", This, p);
332
333 if(!p)
334 return E_POINTER;
335
336 nsres = nsIXMLHttpRequest_GetStatus(This->nsxhr, &val);
337 if(NS_FAILED(nsres)) {
338 ERR("nsIXMLHttpRequest_GetStatus failed: %08x\n", nsres);
339 return E_FAIL;
340 }
341 *p = val;
342 if(val == 0)
343 return E_FAIL; /* WinAPI thinks this is an error */
344
345 return S_OK;
346}
unsigned long DWORD
Definition: ntddk_ex.h:95

◆ HTMLXMLHttpRequest_get_statusText()

static HRESULT WINAPI HTMLXMLHttpRequest_get_statusText ( IHTMLXMLHttpRequest *  iface,
BSTR p 
)
static

Definition at line 348 of file xmlhttprequest.c.

349{
351 nsACString nscstr;
352 nsresult nsres;
354 LONG state;
355
356 TRACE("(%p)->(%p)\n", This, p);
357
358 if(!p)
359 return E_POINTER;
360
361 hres = IHTMLXMLHttpRequest_get_readyState(iface, &state);
362 if(FAILED(hres))
363 return hres;
364
365 if(state < 2) {
366 *p = NULL;
367 return E_FAIL;
368 }
369
370 nsACString_Init(&nscstr, NULL);
371 nsres = nsIXMLHttpRequest_GetStatusText(This->nsxhr, &nscstr);
372 return return_nscstr(nsres, &nscstr, p);
373}
static int state
Definition: maze.c:121
static HRESULT return_nscstr(nsresult nsres, nsACString *nscstr, BSTR *p)
#define FAILED(hr)
Definition: intsafe.h:51
HRESULT hres
Definition: protocol.c:465

◆ HTMLXMLHttpRequest_getAllResponseHeaders()

static HRESULT WINAPI HTMLXMLHttpRequest_getAllResponseHeaders ( IHTMLXMLHttpRequest *  iface,
BSTR p 
)
static

Definition at line 499 of file xmlhttprequest.c.

500{
502 nsACString nscstr;
503 nsresult nsres;
505 LONG state;
506
507 TRACE("(%p)->(%p)\n", This, p);
508
509 if(!p)
510 return E_POINTER;
511
512 hres = IHTMLXMLHttpRequest_get_readyState(iface, &state);
513 if(FAILED(hres))
514 return hres;
515
516 if(state < 2) {
517 *p = NULL;
518 return E_FAIL;
519 }
520
521 nsACString_Init(&nscstr, NULL);
522 nsres = nsIXMLHttpRequest_GetAllResponseHeaders(This->nsxhr, &nscstr);
523 return return_nscstr(nsres, &nscstr, p);
524}

◆ HTMLXMLHttpRequest_GetIDsOfNames()

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

Definition at line 259 of file xmlhttprequest.c.

261{
263
264 return IDispatchEx_GetIDsOfNames(&This->event_target.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
265 lcid, rgDispId);
266}
REFIID riid
Definition: atlbase.h:39

◆ HTMLXMLHttpRequest_getResponseHeader()

static HRESULT WINAPI HTMLXMLHttpRequest_getResponseHeader ( IHTMLXMLHttpRequest *  iface,
BSTR  bstrHeader,
BSTR p 
)
static

Definition at line 526 of file xmlhttprequest.c.

527{
530 char *cstr;
531 nsresult nsres;
533 LONG state;
534 TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrHeader), p);
535
536 if(!p)
537 return E_POINTER;
538 if(!bstrHeader)
539 return E_INVALIDARG;
540
541 hres = IHTMLXMLHttpRequest_get_readyState(iface, &state);
542 if(FAILED(hres))
543 return hres;
544
545 if(state < 2) {
546 *p = NULL;
547 return E_FAIL;
548 }
549
550 cstr = heap_strdupWtoU(bstrHeader);
553
554 nsres = nsIXMLHttpRequest_GetResponseHeader(This->nsxhr, &header, &ret);
555
557 heap_free(cstr);
558 return return_nscstr(nsres, &ret, p);
559}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define debugstr_w
Definition: kernel32.h:32
void nsACString_Finish(nsACString *) DECLSPEC_HIDDEN
Definition: nsembed.c:812
void nsACString_InitDepend(nsACString *, const char *) DECLSPEC_HIDDEN
Definition: nsembed.c:797
int ret

◆ HTMLXMLHttpRequest_GetTypeInfo()

static HRESULT WINAPI HTMLXMLHttpRequest_GetTypeInfo ( IHTMLXMLHttpRequest *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 251 of file xmlhttprequest.c.

253{
255
256 return IDispatchEx_GetTypeInfo(&This->event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
257}

◆ HTMLXMLHttpRequest_GetTypeInfoCount()

static HRESULT WINAPI HTMLXMLHttpRequest_GetTypeInfoCount ( IHTMLXMLHttpRequest *  iface,
UINT pctinfo 
)
static

Definition at line 245 of file xmlhttprequest.c.

246{
248 return IDispatchEx_GetTypeInfoCount(&This->event_target.dispex.IDispatchEx_iface, pctinfo);
249}

◆ HTMLXMLHttpRequest_Invoke()

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

Definition at line 268 of file xmlhttprequest.c.

270{
272
273 return IDispatchEx_Invoke(&This->event_target.dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
274 pDispParams, pVarResult, pExcepInfo, puArgErr);
275}
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ HTMLXMLHttpRequest_open()

static HRESULT WINAPI HTMLXMLHttpRequest_open ( IHTMLXMLHttpRequest *  iface,
BSTR  bstrMethod,
BSTR  bstrUrl,
VARIANT  varAsync,
VARIANT  varUser,
VARIANT  varPassword 
)
static

Definition at line 409 of file xmlhttprequest.c.

410{
414 nsresult nsres;
416
417 TRACE("(%p)->(%s %s %s %s %s)\n", This, debugstr_w(bstrMethod), debugstr_w(bstrUrl), debugstr_variant(&varAsync), debugstr_variant(&varUser), debugstr_variant(&varPassword));
418
419 if(V_VT(&varAsync) != VT_BOOL) {
420 FIXME("varAsync not supported: %s\n", debugstr_variant(&varAsync));
421 return E_FAIL;
422 }
423
424 /* Note: Starting with Gecko 30.0 (Firefox 30.0 / Thunderbird 30.0 / SeaMonkey 2.27),
425 * synchronous requests on the main thread have been deprecated due to the negative
426 * effects to the user experience.
427 */
428 if(!V_BOOL(&varAsync)) {
429 FIXME("Synchronous request is not supported yet\n");
430 return E_FAIL;
431 }
432
433 hres = variant_to_nsastr(varUser, &user);
434 if(FAILED(hres))
435 return hres;
436 hres = variant_to_nsastr(varPassword, &password);
437 if(FAILED(hres)) {
439 return hres;
440 }
441
442 hres = bstr_to_nsacstr(bstrMethod, &method);
443 if(FAILED(hres)) {
446 return hres;
447 }
448 hres = bstr_to_nsacstr(bstrUrl, &url);
449 if(FAILED(hres)) {
453 return hres;
454 }
455
456 nsres = nsIXMLHttpRequest_Open(This->nsxhr, &method, &url, TRUE,
457 &user, &password, 0);
458
463
464 if(NS_FAILED(nsres)) {
465 ERR("nsIXMLHttpRequest_Open failed: %08x\n", nsres);
466 return E_FAIL;
467 }
468
469 return S_OK;
470}
void user(int argc, const char *argv[])
Definition: cmds.c:1350
@ VT_BOOL
Definition: compat.h:2306
static HRESULT bstr_to_nsacstr(BSTR bstr, nsACString *str)
static HRESULT variant_to_nsastr(VARIANT var, nsAString *ret)
method
Definition: dragdrop.c:54
static const WCHAR url[]
Definition: encode.c:1432
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
static WCHAR password[]
Definition: url.c:33
#define V_BOOL(A)
Definition: oleauto.h:224
#define V_VT(A)
Definition: oleauto.h:211

◆ HTMLXMLHttpRequest_put_onreadystatechange()

static HRESULT WINAPI HTMLXMLHttpRequest_put_onreadystatechange ( IHTMLXMLHttpRequest *  iface,
VARIANT  v 
)
static

Definition at line 375 of file xmlhttprequest.c.

376{
378
379 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
380
381 return set_event_handler(&This->event_target, EVENTID_READYSTATECHANGE, &v);
382}
const GLdouble * v
Definition: gl.h:2040
HRESULT set_event_handler(EventTarget *event_target, eventid_t eid, VARIANT *var)
Definition: htmlevent.c:1404

◆ HTMLXMLHttpRequest_QueryInterface()

static HRESULT WINAPI HTMLXMLHttpRequest_QueryInterface ( IHTMLXMLHttpRequest *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 193 of file xmlhttprequest.c.

194{
196
197 TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
198
200 *ppv = &This->IHTMLXMLHttpRequest_iface;
201 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
202 *ppv = &This->IHTMLXMLHttpRequest_iface;
203 }else if(IsEqualGUID(&IID_IHTMLXMLHttpRequest, riid)) {
204 *ppv = &This->IHTMLXMLHttpRequest_iface;
205 }else if(dispex_query_interface(&This->event_target.dispex, riid, ppv)) {
206 return *ppv ? S_OK : E_NOINTERFACE;
207 }else {
208 *ppv = NULL;
209 WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
210 return E_NOINTERFACE;
211 }
212
213 IUnknown_AddRef((IUnknown*)*ppv);
214 return S_OK;
215}
const GUID IID_IUnknown
#define WARN(fmt,...)
Definition: debug.h:112
const char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:542
REFIID LPVOID * ppv
Definition: atlbase.h:39
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
const GUID IID_IDispatch
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ HTMLXMLHttpRequest_Release()

static ULONG WINAPI HTMLXMLHttpRequest_Release ( IHTMLXMLHttpRequest *  iface)
static

Definition at line 227 of file xmlhttprequest.c.

228{
231
232 TRACE("(%p) ref=%d\n", This, ref);
233
234 if(!ref) {
235 if(This->event_listener)
236 detach_xhr_event_listener(This->event_listener);
237 release_dispex(&This->event_target.dispex);
238 nsIXMLHttpRequest_Release(This->nsxhr);
240 }
241
242 return ref;
243}
#define InterlockedDecrement
Definition: armddk.h:52
static void detach_xhr_event_listener(XMLHttpReqEventListener *event_listener)
void release_dispex(DispatchEx *This)
Definition: dispex.c:1706

◆ HTMLXMLHttpRequest_send()

static HRESULT WINAPI HTMLXMLHttpRequest_send ( IHTMLXMLHttpRequest *  iface,
VARIANT  varBody 
)
static

Definition at line 472 of file xmlhttprequest.c.

473{
475 nsresult nsres;
476
477 TRACE("(%p)->(%s)\n", This, debugstr_variant(&varBody));
478
479 switch(V_VT(&varBody)) {
480 case VT_NULL:
481 case VT_EMPTY:
482 case VT_ERROR:
483 break;
484 default:
485 FIXME("varBody(%s) unsupported\n", debugstr_variant(&varBody));
486 return E_FAIL;
487 }
488
489 nsres = nsIXMLHttpRequest_Send(This->nsxhr, NULL);
490
491 if(NS_FAILED(nsres)) {
492 ERR("nsIXMLHttpRequest_Send failed: %08x\n", nsres);
493 return E_FAIL;
494 }
495
496 return S_OK;
497}
@ VT_NULL
Definition: compat.h:2296
@ VT_ERROR
Definition: compat.h:2305
@ VT_EMPTY
Definition: compat.h:2295

◆ HTMLXMLHttpRequest_setRequestHeader()

static HRESULT WINAPI HTMLXMLHttpRequest_setRequestHeader ( IHTMLXMLHttpRequest *  iface,
BSTR  bstrHeader,
BSTR  bstrValue 
)
static

Definition at line 561 of file xmlhttprequest.c.

562{
564 FIXME("(%p)->(%s %s)\n", This, debugstr_w(bstrHeader), debugstr_w(bstrValue));
565 return E_NOTIMPL;
566}

◆ HTMLXMLHttpRequestFactory_AddRef()

static ULONG WINAPI HTMLXMLHttpRequestFactory_AddRef ( IHTMLXMLHttpRequestFactory *  iface)
static

Definition at line 683 of file xmlhttprequest.c.

684{
687
688 TRACE("(%p) ref=%d\n", This, ref);
689
690 return ref;
691}
static HTMLXMLHttpRequestFactory * impl_from_IHTMLXMLHttpRequestFactory(IHTMLXMLHttpRequestFactory *iface)

◆ HTMLXMLHttpRequestFactory_Create()

HRESULT HTMLXMLHttpRequestFactory_Create ( HTMLInnerWindow window,
HTMLXMLHttpRequestFactory **  ret_ptr 
)

Definition at line 790 of file xmlhttprequest.c.

791{
793
794 ret = heap_alloc(sizeof(*ret));
795 if(!ret)
796 return E_OUTOFMEMORY;
797
798 ret->IHTMLXMLHttpRequestFactory_iface.lpVtbl = &HTMLXMLHttpRequestFactoryVtbl;
799 ret->ref = 1;
800 ret->window = window;
801
802 init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLXMLHttpRequestFactory_iface,
804
805 *ret_ptr = ret;
806 return S_OK;
807}
static dispex_static_data_t HTMLXMLHttpRequestFactory_dispex
static const IHTMLXMLHttpRequestFactoryVtbl HTMLXMLHttpRequestFactoryVtbl
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
static IHTMLWindow2 * window
Definition: events.c:77

Referenced by HTMLWindow5_get_XMLHttpRequest().

◆ HTMLXMLHttpRequestFactory_create()

static HRESULT WINAPI HTMLXMLHttpRequestFactory_create ( IHTMLXMLHttpRequestFactory *  iface,
IHTMLXMLHttpRequest **  p 
)
static

Definition at line 740 of file xmlhttprequest.c.

741{
744 nsIXMLHttpRequest *nsxhr;
745
746 TRACE("(%p)->(%p)\n", This, p);
747
748 nsxhr = create_nsxhr(This->window->base.outer_window->nswindow);
749 if(!nsxhr)
750 return E_FAIL;
751
752 ret = heap_alloc_zero(sizeof(*ret));
753 if(!ret) {
754 nsIXMLHttpRequest_Release(nsxhr);
755 return E_OUTOFMEMORY;
756 }
757 ret->nsxhr = nsxhr;
758
759 ret->IHTMLXMLHttpRequest_iface.lpVtbl = &HTMLXMLHttpRequestVtbl;
760 init_dispex(&ret->event_target.dispex, (IUnknown*)&ret->IHTMLXMLHttpRequest_iface,
762 ret->ref = 1;
763
764 *p = &ret->IHTMLXMLHttpRequest_iface;
765 return S_OK;
766}
static dispex_static_data_t HTMLXMLHttpRequest_dispex
static const IHTMLXMLHttpRequestVtbl HTMLXMLHttpRequestVtbl
nsIXMLHttpRequest * create_nsxhr(nsIDOMWindow *nswindow) DECLSPEC_HIDDEN
Definition: nsembed.c:2156

◆ HTMLXMLHttpRequestFactory_GetIDsOfNames()

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

Definition at line 722 of file xmlhttprequest.c.

724{
726
727 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
728 lcid, rgDispId);
729}

◆ HTMLXMLHttpRequestFactory_GetTypeInfo()

static HRESULT WINAPI HTMLXMLHttpRequestFactory_GetTypeInfo ( IHTMLXMLHttpRequestFactory *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 714 of file xmlhttprequest.c.

716{
718
719 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
720}

◆ HTMLXMLHttpRequestFactory_GetTypeInfoCount()

static HRESULT WINAPI HTMLXMLHttpRequestFactory_GetTypeInfoCount ( IHTMLXMLHttpRequestFactory *  iface,
UINT pctinfo 
)
static

Definition at line 708 of file xmlhttprequest.c.

709{
711 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
712}

◆ HTMLXMLHttpRequestFactory_Invoke()

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

Definition at line 731 of file xmlhttprequest.c.

733{
735
736 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
737 pDispParams, pVarResult, pExcepInfo, puArgErr);
738}

◆ HTMLXMLHttpRequestFactory_QueryInterface()

static HRESULT WINAPI HTMLXMLHttpRequestFactory_QueryInterface ( IHTMLXMLHttpRequestFactory *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 659 of file xmlhttprequest.c.

660{
662
663 TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
664
666 *ppv = &This->IHTMLXMLHttpRequestFactory_iface;
667 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
668 *ppv = &This->IHTMLXMLHttpRequestFactory_iface;
669 }else if(IsEqualGUID(&IID_IHTMLXMLHttpRequestFactory, riid)) {
670 *ppv = &This->IHTMLXMLHttpRequestFactory_iface;
671 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
672 return *ppv ? S_OK : E_NOINTERFACE;
673 }else {
674 *ppv = NULL;
675 WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
676 return E_NOINTERFACE;
677 }
678
679 IUnknown_AddRef((IUnknown*)*ppv);
680 return S_OK;
681}

◆ HTMLXMLHttpRequestFactory_Release()

static ULONG WINAPI HTMLXMLHttpRequestFactory_Release ( IHTMLXMLHttpRequestFactory *  iface)
static

Definition at line 693 of file xmlhttprequest.c.

694{
697
698 TRACE("(%p) ref=%d\n", This, ref);
699
700 if(!ref) {
701 release_dispex(&This->dispex);
703 }
704
705 return ref;
706}

◆ impl_from_DispatchEx()

static HTMLXMLHttpRequest * impl_from_DispatchEx ( DispatchEx iface)
inlinestatic

Definition at line 592 of file xmlhttprequest.c.

593{
594 return CONTAINING_RECORD(iface, HTMLXMLHttpRequest, event_target.dispex);
595}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by HTMLXMLHttpRequest_bind_event().

◆ impl_from_IHTMLXMLHttpRequest()

◆ impl_from_IHTMLXMLHttpRequestFactory()

◆ impl_from_nsIDOMEventListener()

static XMLHttpReqEventListener * impl_from_nsIDOMEventListener ( nsIDOMEventListener iface)
inlinestatic

◆ return_nscstr()

static HRESULT return_nscstr ( nsresult  nsres,
nsACString nscstr,
BSTR p 
)
static

Definition at line 48 of file xmlhttprequest.c.

49{
50 const char *str;
51 int len;
52
53 if(NS_FAILED(nsres)) {
54 ERR("failed: %08x\n", nsres);
55 nsACString_Finish(nscstr);
56 return E_FAIL;
57 }
58
59 nsACString_GetData(nscstr, &str);
60
61 if(*str) {
62 len = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0);
64 if(!*p) {
65 nsACString_Finish(nscstr);
66 return E_OUTOFMEMORY;
67 }
69 }else {
70 *p = NULL;
71 }
72
73 nsACString_Finish(nscstr);
74 return S_OK;
75}
#define MultiByteToWideChar
Definition: compat.h:110
GLenum GLsizei len
Definition: glext.h:6722
UINT32 nsACString_GetData(const nsACString *, const char **) DECLSPEC_HIDDEN
Definition: nsembed.c:807
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define CP_UTF8
Definition: nls.h:20

Referenced by HTMLXMLHttpRequest_get_statusText(), HTMLXMLHttpRequest_getAllResponseHeaders(), and HTMLXMLHttpRequest_getResponseHeader().

◆ variant_to_nsastr()

static HRESULT variant_to_nsastr ( VARIANT  var,
nsAString ret 
)
static

Definition at line 31 of file xmlhttprequest.c.

32{
33 switch(V_VT(&var)) {
34 case VT_NULL:
35 case VT_ERROR:
36 case VT_EMPTY:
38 return S_OK;
39 case VT_BSTR:
41 return S_OK;
42 default:
43 FIXME("Unsupported VARIANT: %s\n", debugstr_variant(&var));
44 return E_INVALIDARG;
45 }
46}
@ VT_BSTR
Definition: compat.h:2303
const char * var
Definition: shader.c:5666
#define V_BSTR(A)
Definition: oleauto.h:226

Referenced by HTMLXMLHttpRequest_open().

◆ XMLHttpReqEventListener_AddRef()

static nsrefcnt NSAPI XMLHttpReqEventListener_AddRef ( nsIDOMEventListener iface)
static

Definition at line 142 of file xmlhttprequest.c.

143{
146
147 TRACE("(%p) ref=%d\n", This, ref);
148
149 return ref;
150}
static XMLHttpReqEventListener * impl_from_nsIDOMEventListener(nsIDOMEventListener *iface)

◆ XMLHttpReqEventListener_HandleEvent()

static nsresult NSAPI XMLHttpReqEventListener_HandleEvent ( nsIDOMEventListener iface,
nsIDOMEvent event 
)
static

Definition at line 167 of file xmlhttprequest.c.

168{
170
171 TRACE("(%p)\n", This);
172
173 if(!This->xhr)
174 return NS_OK;
175
177 (IDispatch*)&This->xhr->IHTMLXMLHttpRequest_iface);
178 return NS_OK;
179}
void call_event_handlers(HTMLDocumentNode *doc, HTMLEventObj *event_obj, EventTarget *event_target, ConnectionPointContainer *cp_container, eventid_t eid, IDispatch *this_obj)
Definition: htmlevent.c:952

◆ XMLHttpReqEventListener_QueryInterface()

static nsresult NSAPI XMLHttpReqEventListener_QueryInterface ( nsIDOMEventListener iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 121 of file xmlhttprequest.c.

123{
125
126 if(IsEqualGUID(&IID_nsISupports, riid)) {
127 TRACE("(%p)->(IID_nsISupports, %p)\n", This, result);
128 *result = &This->nsIDOMEventListener_iface;
129 }else if(IsEqualGUID(&IID_nsIDOMEventListener, riid)) {
130 TRACE("(%p)->(IID_nsIDOMEventListener %p)\n", This, result);
131 *result = &This->nsIDOMEventListener_iface;
132 }else {
133 *result = NULL;
134 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), result);
135 return NS_NOINTERFACE;
136 }
137
138 nsIDOMEventListener_AddRef(&This->nsIDOMEventListener_iface);
139 return NS_OK;
140}
GLuint64EXT * result
Definition: glext.h:11304
#define debugstr_guid
Definition: kernel32.h:35
#define NS_NOINTERFACE

◆ XMLHttpReqEventListener_Release()

static nsrefcnt NSAPI XMLHttpReqEventListener_Release ( nsIDOMEventListener iface)
static

Definition at line 152 of file xmlhttprequest.c.

153{
156
157 TRACE("(%p) ref=%d\n", This, ref);
158
159 if(!ref) {
160 assert(!This->xhr);
162 }
163
164 return ref;
165}

Variable Documentation

◆ HTMLXMLHttpRequest_dispex

dispex_static_data_t HTMLXMLHttpRequest_dispex
static
Initial value:
= {
DispHTMLXMLHttpRequest_tid,
}
static const tid_t HTMLXMLHttpRequest_iface_tids[]
static dispex_static_data_vtbl_t HTMLXMLHttpRequest_dispex_vtbl

Definition at line 645 of file xmlhttprequest.c.

Referenced by HTMLXMLHttpRequestFactory_create().

◆ HTMLXMLHttpRequest_dispex_vtbl

dispex_static_data_vtbl_t HTMLXMLHttpRequest_dispex_vtbl
static
Initial value:
= {
}
static void HTMLXMLHttpRequest_bind_event(DispatchEx *dispex, int eid)

Definition at line 632 of file xmlhttprequest.c.

◆ HTMLXMLHttpRequest_iface_tids

const tid_t HTMLXMLHttpRequest_iface_tids[]
static
Initial value:
= {
IHTMLXMLHttpRequest_tid,
0
}

Definition at line 641 of file xmlhttprequest.c.

◆ HTMLXMLHttpRequestFactory_dispex

dispex_static_data_t HTMLXMLHttpRequestFactory_dispex
static
Initial value:
= {
IHTMLXMLHttpRequestFactory_tid,
}
static const tid_t HTMLXMLHttpRequestFactory_iface_tids[]

Definition at line 783 of file xmlhttprequest.c.

Referenced by HTMLXMLHttpRequestFactory_Create().

◆ HTMLXMLHttpRequestFactory_iface_tids

const tid_t HTMLXMLHttpRequestFactory_iface_tids[]
static
Initial value:
= {
IHTMLXMLHttpRequestFactory_tid,
0
}

Definition at line 779 of file xmlhttprequest.c.

◆ HTMLXMLHttpRequestFactoryVtbl

const IHTMLXMLHttpRequestFactoryVtbl HTMLXMLHttpRequestFactoryVtbl
static
Initial value:
= {
}
static HRESULT WINAPI HTMLXMLHttpRequestFactory_GetTypeInfo(IHTMLXMLHttpRequestFactory *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
static ULONG WINAPI HTMLXMLHttpRequestFactory_AddRef(IHTMLXMLHttpRequestFactory *iface)
static HRESULT WINAPI HTMLXMLHttpRequestFactory_GetTypeInfoCount(IHTMLXMLHttpRequestFactory *iface, UINT *pctinfo)
static HRESULT WINAPI HTMLXMLHttpRequestFactory_GetIDsOfNames(IHTMLXMLHttpRequestFactory *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
static ULONG WINAPI HTMLXMLHttpRequestFactory_Release(IHTMLXMLHttpRequestFactory *iface)
static HRESULT WINAPI HTMLXMLHttpRequestFactory_create(IHTMLXMLHttpRequestFactory *iface, IHTMLXMLHttpRequest **p)
static HRESULT WINAPI HTMLXMLHttpRequestFactory_Invoke(IHTMLXMLHttpRequestFactory *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
static HRESULT WINAPI HTMLXMLHttpRequestFactory_QueryInterface(IHTMLXMLHttpRequestFactory *iface, REFIID riid, void **ppv)

Definition at line 768 of file xmlhttprequest.c.

Referenced by HTMLXMLHttpRequestFactory_Create().

◆ HTMLXMLHttpRequestVtbl

const IHTMLXMLHttpRequestVtbl HTMLXMLHttpRequestVtbl
static
Initial value:
= {
}
static HRESULT WINAPI HTMLXMLHttpRequest_getResponseHeader(IHTMLXMLHttpRequest *iface, BSTR bstrHeader, BSTR *p)
static HRESULT WINAPI HTMLXMLHttpRequest_getAllResponseHeaders(IHTMLXMLHttpRequest *iface, BSTR *p)
static ULONG WINAPI HTMLXMLHttpRequest_Release(IHTMLXMLHttpRequest *iface)
static HRESULT WINAPI HTMLXMLHttpRequest_setRequestHeader(IHTMLXMLHttpRequest *iface, BSTR bstrHeader, BSTR bstrValue)
static HRESULT WINAPI HTMLXMLHttpRequest_send(IHTMLXMLHttpRequest *iface, VARIANT varBody)
static HRESULT WINAPI HTMLXMLHttpRequest_GetIDsOfNames(IHTMLXMLHttpRequest *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
static HRESULT WINAPI HTMLXMLHttpRequest_get_status(IHTMLXMLHttpRequest *iface, LONG *p)
static HRESULT WINAPI HTMLXMLHttpRequest_open(IHTMLXMLHttpRequest *iface, BSTR bstrMethod, BSTR bstrUrl, VARIANT varAsync, VARIANT varUser, VARIANT varPassword)
static HRESULT WINAPI HTMLXMLHttpRequest_put_onreadystatechange(IHTMLXMLHttpRequest *iface, VARIANT v)
static HRESULT WINAPI HTMLXMLHttpRequest_Invoke(IHTMLXMLHttpRequest *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
static HRESULT WINAPI HTMLXMLHttpRequest_QueryInterface(IHTMLXMLHttpRequest *iface, REFIID riid, void **ppv)
static HRESULT WINAPI HTMLXMLHttpRequest_GetTypeInfoCount(IHTMLXMLHttpRequest *iface, UINT *pctinfo)
static HRESULT WINAPI HTMLXMLHttpRequest_abort(IHTMLXMLHttpRequest *iface)
static HRESULT WINAPI HTMLXMLHttpRequest_get_statusText(IHTMLXMLHttpRequest *iface, BSTR *p)
static HRESULT WINAPI HTMLXMLHttpRequest_get_readyState(IHTMLXMLHttpRequest *iface, LONG *p)
static HRESULT WINAPI HTMLXMLHttpRequest_get_responseXML(IHTMLXMLHttpRequest *iface, IDispatch **p)
static ULONG WINAPI HTMLXMLHttpRequest_AddRef(IHTMLXMLHttpRequest *iface)
static HRESULT WINAPI HTMLXMLHttpRequest_GetTypeInfo(IHTMLXMLHttpRequest *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
static HRESULT WINAPI HTMLXMLHttpRequest_get_responseBody(IHTMLXMLHttpRequest *iface, VARIANT *p)
static HRESULT WINAPI HTMLXMLHttpRequest_get_onreadystatechange(IHTMLXMLHttpRequest *iface, VARIANT *p)
static HRESULT WINAPI HTMLXMLHttpRequest_get_responseText(IHTMLXMLHttpRequest *iface, BSTR *p)

Definition at line 568 of file xmlhttprequest.c.

Referenced by HTMLXMLHttpRequestFactory_create().

◆ XMLHttpReqEventListenerVtbl

const nsIDOMEventListenerVtbl XMLHttpReqEventListenerVtbl
static
Initial value:
= {
}
static nsrefcnt NSAPI XMLHttpReqEventListener_AddRef(nsIDOMEventListener *iface)
static nsresult NSAPI XMLHttpReqEventListener_QueryInterface(nsIDOMEventListener *iface, nsIIDRef riid, void **result)
static nsrefcnt NSAPI XMLHttpReqEventListener_Release(nsIDOMEventListener *iface)
static nsresult NSAPI XMLHttpReqEventListener_HandleEvent(nsIDOMEventListener *iface, nsIDOMEvent *event)

Definition at line 181 of file xmlhttprequest.c.

Referenced by HTMLXMLHttpRequest_bind_event().