tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSFileError.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 JSFileError_h
22 #define JSFileError_h
23
24 #if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
25
26 #include "FileError.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 JSFileError : public JSDOMWrapper {
35 public:
36     typedef JSDOMWrapper Base;
37     static JSFileError* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<FileError> impl)
38     {
39         JSFileError* ptr = new (JSC::allocateCell<JSFileError>(globalObject->globalData().heap)) JSFileError(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 const JSC::ClassInfo s_info;
48
49     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
50     {
51         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
52     }
53
54     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
55     FileError* impl() const { return m_impl; }
56     void releaseImpl() { m_impl->deref(); m_impl = 0; }
57
58 private:
59     FileError* m_impl;
60 protected:
61     JSFileError(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<FileError>);
62     void finishCreation(JSC::JSGlobalData&);
63     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
64 };
65
66 class JSFileErrorOwner : public JSC::WeakHandleOwner {
67     virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
68     virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
69 };
70
71 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, FileError*)
72 {
73     DEFINE_STATIC_LOCAL(JSFileErrorOwner, jsFileErrorOwner, ());
74     return &jsFileErrorOwner;
75 }
76
77 inline void* wrapperContext(DOMWrapperWorld* world, FileError*)
78 {
79     return world;
80 }
81
82 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, FileError*);
83 FileError* toFileError(JSC::JSValue);
84
85 class JSFileErrorPrototype : public JSC::JSNonFinalObject {
86 public:
87     typedef JSC::JSNonFinalObject Base;
88     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
89     static JSFileErrorPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
90     {
91         JSFileErrorPrototype* ptr = new (JSC::allocateCell<JSFileErrorPrototype>(globalData.heap)) JSFileErrorPrototype(globalData, globalObject, structure);
92         ptr->finishCreation(globalData);
93         return ptr;
94     }
95
96     static const JSC::ClassInfo s_info;
97     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
98     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
99     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
100     {
101         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
102     }
103
104 private:
105     JSFileErrorPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
106 protected:
107     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
108 };
109
110 class JSFileErrorConstructor : public DOMConstructorObject {
111 private:
112     JSFileErrorConstructor(JSC::Structure*, JSDOMGlobalObject*);
113     void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
114
115 public:
116     typedef DOMConstructorObject Base;
117     static JSFileErrorConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
118     {
119         JSFileErrorConstructor* ptr = new (JSC::allocateCell<JSFileErrorConstructor>(*exec->heap())) JSFileErrorConstructor(structure, globalObject);
120         ptr->finishCreation(exec, globalObject);
121         return ptr;
122     }
123
124     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
125     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
126     static const JSC::ClassInfo s_info;
127     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
128     {
129         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
130     }
131 protected:
132     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
133 };
134
135 // Attributes
136
137 JSC::JSValue jsFileErrorCode(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
138 JSC::JSValue jsFileErrorConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
139 // Constants
140
141 JSC::JSValue jsFileErrorNOT_FOUND_ERR(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
142 JSC::JSValue jsFileErrorSECURITY_ERR(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
143 JSC::JSValue jsFileErrorABORT_ERR(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
144 JSC::JSValue jsFileErrorNOT_READABLE_ERR(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
145 JSC::JSValue jsFileErrorENCODING_ERR(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
146 JSC::JSValue jsFileErrorNO_MODIFICATION_ALLOWED_ERR(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
147 JSC::JSValue jsFileErrorINVALID_STATE_ERR(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
148 JSC::JSValue jsFileErrorSYNTAX_ERR(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
149 JSC::JSValue jsFileErrorINVALID_MODIFICATION_ERR(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
150 JSC::JSValue jsFileErrorQUOTA_EXCEEDED_ERR(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
151 JSC::JSValue jsFileErrorTYPE_MISMATCH_ERR(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
152 JSC::JSValue jsFileErrorPATH_EXISTS_ERR(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
153
154 } // namespace WebCore
155
156 #endif // ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
157
158 #endif