2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
21 #ifndef JSXMLHttpRequest_h
22 #define JSXMLHttpRequest_h
24 #include "JSDOMBinding.h"
25 #include "XMLHttpRequest.h"
26 #include <runtime/JSGlobalObject.h>
27 #include <runtime/JSObject.h>
28 #include <runtime/ObjectPrototype.h>
32 class JSXMLHttpRequest : public JSDOMWrapper {
34 typedef JSDOMWrapper Base;
35 static JSXMLHttpRequest* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<XMLHttpRequest> impl)
37 JSXMLHttpRequest* ptr = new (JSC::allocateCell<JSXMLHttpRequest>(globalObject->globalData().heap)) JSXMLHttpRequest(structure, globalObject, impl);
38 ptr->finishCreation(globalObject->globalData());
42 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
43 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
44 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
45 static void put(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
46 static const JSC::ClassInfo s_info;
48 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
50 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
53 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
54 static void visitChildren(JSCell*, JSC::SlotVisitor&);
58 JSC::JSValue responseText(JSC::ExecState*) const;
59 JSC::JSValue response(JSC::ExecState*) const;
62 JSC::JSValue open(JSC::ExecState*);
63 JSC::JSValue send(JSC::ExecState*);
64 XMLHttpRequest* impl() const { return m_impl; }
65 void releaseImpl() { m_impl->deref(); m_impl = 0; }
68 XMLHttpRequest* m_impl;
70 JSXMLHttpRequest(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<XMLHttpRequest>);
71 void finishCreation(JSC::JSGlobalData&);
72 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
75 class JSXMLHttpRequestOwner : public JSC::WeakHandleOwner {
76 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
77 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
80 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, XMLHttpRequest*)
82 DEFINE_STATIC_LOCAL(JSXMLHttpRequestOwner, jsXMLHttpRequestOwner, ());
83 return &jsXMLHttpRequestOwner;
86 inline void* wrapperContext(DOMWrapperWorld* world, XMLHttpRequest*)
91 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, XMLHttpRequest*);
92 XMLHttpRequest* toXMLHttpRequest(JSC::JSValue);
94 class JSXMLHttpRequestPrototype : public JSC::JSNonFinalObject {
96 typedef JSC::JSNonFinalObject Base;
97 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
98 static JSXMLHttpRequestPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
100 JSXMLHttpRequestPrototype* ptr = new (JSC::allocateCell<JSXMLHttpRequestPrototype>(globalData.heap)) JSXMLHttpRequestPrototype(globalData, globalObject, structure);
101 ptr->finishCreation(globalData);
105 static const JSC::ClassInfo s_info;
106 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
107 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
108 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
110 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
114 JSXMLHttpRequestPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
116 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
119 class JSXMLHttpRequestConstructor : public DOMConstructorObject {
121 JSXMLHttpRequestConstructor(JSC::Structure*, JSDOMGlobalObject*);
122 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
125 typedef DOMConstructorObject Base;
126 static JSXMLHttpRequestConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
128 JSXMLHttpRequestConstructor* ptr = new (JSC::allocateCell<JSXMLHttpRequestConstructor>(*exec->heap())) JSXMLHttpRequestConstructor(structure, globalObject);
129 ptr->finishCreation(exec, globalObject);
133 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
134 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
135 static const JSC::ClassInfo s_info;
136 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
138 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
141 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
142 static JSC::EncodedJSValue JSC_HOST_CALL constructJSXMLHttpRequest(JSC::ExecState*);
143 static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
148 JSC::EncodedJSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionOpen(JSC::ExecState*);
149 JSC::EncodedJSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionSetRequestHeader(JSC::ExecState*);
150 JSC::EncodedJSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionSend(JSC::ExecState*);
151 JSC::EncodedJSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionAbort(JSC::ExecState*);
152 JSC::EncodedJSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionGetAllResponseHeaders(JSC::ExecState*);
153 JSC::EncodedJSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionGetResponseHeader(JSC::ExecState*);
154 JSC::EncodedJSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionOverrideMimeType(JSC::ExecState*);
155 JSC::EncodedJSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionAddEventListener(JSC::ExecState*);
156 JSC::EncodedJSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionRemoveEventListener(JSC::ExecState*);
157 JSC::EncodedJSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionDispatchEvent(JSC::ExecState*);
160 JSC::JSValue jsXMLHttpRequestOnabort(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
161 void setJSXMLHttpRequestOnabort(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
162 JSC::JSValue jsXMLHttpRequestOnerror(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
163 void setJSXMLHttpRequestOnerror(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
164 JSC::JSValue jsXMLHttpRequestOnload(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
165 void setJSXMLHttpRequestOnload(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
166 JSC::JSValue jsXMLHttpRequestOnloadstart(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
167 void setJSXMLHttpRequestOnloadstart(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
168 JSC::JSValue jsXMLHttpRequestOnprogress(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
169 void setJSXMLHttpRequestOnprogress(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
170 JSC::JSValue jsXMLHttpRequestOnreadystatechange(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
171 void setJSXMLHttpRequestOnreadystatechange(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
172 JSC::JSValue jsXMLHttpRequestReadyState(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
173 JSC::JSValue jsXMLHttpRequestAsBlob(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
174 void setJSXMLHttpRequestAsBlob(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
175 JSC::JSValue jsXMLHttpRequestWithCredentials(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
176 void setJSXMLHttpRequestWithCredentials(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
177 JSC::JSValue jsXMLHttpRequestUpload(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
178 JSC::JSValue jsXMLHttpRequestResponseText(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
179 JSC::JSValue jsXMLHttpRequestResponseXML(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
180 JSC::JSValue jsXMLHttpRequestResponseBlob(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
181 JSC::JSValue jsXMLHttpRequestResponseType(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
182 void setJSXMLHttpRequestResponseType(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
183 JSC::JSValue jsXMLHttpRequestResponse(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
184 JSC::JSValue jsXMLHttpRequestStatus(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
185 JSC::JSValue jsXMLHttpRequestStatusText(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
186 JSC::JSValue jsXMLHttpRequestConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
189 JSC::JSValue jsXMLHttpRequestUNSENT(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
190 JSC::JSValue jsXMLHttpRequestOPENED(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
191 JSC::JSValue jsXMLHttpRequestHEADERS_RECEIVED(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
192 JSC::JSValue jsXMLHttpRequestLOADING(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
193 JSC::JSValue jsXMLHttpRequestDONE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
195 } // namespace WebCore