tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSFileWriter.h
1 /*
2     This file is part of the WebKit open source project.
3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
4
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.
9
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.
14
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.
19 */
20
21 #ifndef JSFileWriter_h
22 #define JSFileWriter_h
23
24 #if ENABLE(FILE_SYSTEM)
25
26 #include "FileWriter.h"
27 #include "JSDOMBinding.h"
28 #include <runtime/JSGlobalObject.h>
29 #include <runtime/JSObject.h>
30 #include <runtime/ObjectPrototype.h>
31
32 namespace WebCore {
33
34 class JSFileWriter : public JSDOMWrapper {
35 public:
36     typedef JSDOMWrapper Base;
37     static JSFileWriter* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<FileWriter> impl)
38     {
39         JSFileWriter* ptr = new (JSC::allocateCell<JSFileWriter>(globalObject->globalData().heap)) JSFileWriter(structure, globalObject, impl);
40         ptr->finishCreation(globalObject->globalData());
41         return ptr;
42     }
43
44     static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
45     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
46     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
47     static void put(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
48     static const JSC::ClassInfo s_info;
49
50     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
51     {
52         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
53     }
54
55     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
56     static void visitChildren(JSCell*, JSC::SlotVisitor&);
57
58     FileWriter* impl() const { return m_impl; }
59     void releaseImpl() { m_impl->deref(); m_impl = 0; }
60
61 private:
62     FileWriter* m_impl;
63 protected:
64     JSFileWriter(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<FileWriter>);
65     void finishCreation(JSC::JSGlobalData&);
66     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
67 };
68
69 class JSFileWriterOwner : public JSC::WeakHandleOwner {
70     virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
71     virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
72 };
73
74 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, FileWriter*)
75 {
76     DEFINE_STATIC_LOCAL(JSFileWriterOwner, jsFileWriterOwner, ());
77     return &jsFileWriterOwner;
78 }
79
80 inline void* wrapperContext(DOMWrapperWorld* world, FileWriter*)
81 {
82     return world;
83 }
84
85 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, FileWriter*);
86 FileWriter* toFileWriter(JSC::JSValue);
87
88 class JSFileWriterPrototype : public JSC::JSNonFinalObject {
89 public:
90     typedef JSC::JSNonFinalObject Base;
91     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
92     static JSFileWriterPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
93     {
94         JSFileWriterPrototype* ptr = new (JSC::allocateCell<JSFileWriterPrototype>(globalData.heap)) JSFileWriterPrototype(globalData, globalObject, structure);
95         ptr->finishCreation(globalData);
96         return ptr;
97     }
98
99     static const JSC::ClassInfo s_info;
100     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
101     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
102     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
103     {
104         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
105     }
106
107 private:
108     JSFileWriterPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
109 protected:
110     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
111 };
112
113 class JSFileWriterConstructor : public DOMConstructorObject {
114 private:
115     JSFileWriterConstructor(JSC::Structure*, JSDOMGlobalObject*);
116     void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
117
118 public:
119     typedef DOMConstructorObject Base;
120     static JSFileWriterConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
121     {
122         JSFileWriterConstructor* ptr = new (JSC::allocateCell<JSFileWriterConstructor>(*exec->heap())) JSFileWriterConstructor(structure, globalObject);
123         ptr->finishCreation(exec, globalObject);
124         return ptr;
125     }
126
127     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
128     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
129     static const JSC::ClassInfo s_info;
130     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
131     {
132         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
133     }
134 protected:
135     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
136 };
137
138 // Functions
139
140 JSC::EncodedJSValue JSC_HOST_CALL jsFileWriterPrototypeFunctionWrite(JSC::ExecState*);
141 JSC::EncodedJSValue JSC_HOST_CALL jsFileWriterPrototypeFunctionSeek(JSC::ExecState*);
142 JSC::EncodedJSValue JSC_HOST_CALL jsFileWriterPrototypeFunctionTruncate(JSC::ExecState*);
143 JSC::EncodedJSValue JSC_HOST_CALL jsFileWriterPrototypeFunctionAbort(JSC::ExecState*);
144 // Attributes
145
146 JSC::JSValue jsFileWriterReadyState(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
147 JSC::JSValue jsFileWriterError(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
148 JSC::JSValue jsFileWriterPosition(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
149 JSC::JSValue jsFileWriterLength(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
150 JSC::JSValue jsFileWriterOnwritestart(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
151 void setJSFileWriterOnwritestart(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
152 JSC::JSValue jsFileWriterOnprogress(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
153 void setJSFileWriterOnprogress(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
154 JSC::JSValue jsFileWriterOnwrite(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
155 void setJSFileWriterOnwrite(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
156 JSC::JSValue jsFileWriterOnabort(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
157 void setJSFileWriterOnabort(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
158 JSC::JSValue jsFileWriterOnerror(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
159 void setJSFileWriterOnerror(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
160 JSC::JSValue jsFileWriterOnwriteend(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
161 void setJSFileWriterOnwriteend(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
162 JSC::JSValue jsFileWriterConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
163 // Constants
164
165 JSC::JSValue jsFileWriterINIT(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
166 JSC::JSValue jsFileWriterWRITING(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
167 JSC::JSValue jsFileWriterDONE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
168
169 } // namespace WebCore
170
171 #endif // ENABLE(FILE_SYSTEM)
172
173 #endif