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 JSDatabase_h
22 #define JSDatabase_h
23 
24 #if ENABLE(DATABASE)
25 
26 #include "JSDOMBinding.h"
27 #include <runtime/JSGlobalObject.h>
28 #include <runtime/JSObjectWithGlobalObject.h>
29 #include <runtime/ObjectPrototype.h>
30 
31 namespace WebCore {
32 
33 class Database;
34 
35 class JSDatabase : public JSDOMWrapper {
36     typedef JSDOMWrapper Base;
37 public:
38     JSDatabase(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<Database>);
39     static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
40     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
41     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
42     static const JSC::ClassInfo s_info;
43 
createStructure(JSC::JSGlobalData & globalData,JSC::JSValue prototype)44     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
45     {
46         return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
47     }
48 
impl()49     Database* impl() const { return m_impl.get(); }
50 
51 private:
52     RefPtr<Database> m_impl;
53 protected:
54     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
55 };
56 
57 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Database*);
58 Database* toDatabase(JSC::JSValue);
59 
60 class JSDatabasePrototype : public JSC::JSObjectWithGlobalObject {
61     typedef JSC::JSObjectWithGlobalObject Base;
62 public:
63     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
64     static const JSC::ClassInfo s_info;
65     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
66     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
createStructure(JSC::JSGlobalData & globalData,JSC::JSValue prototype)67     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
68     {
69         return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
70     }
JSDatabasePrototype(JSC::JSGlobalData & globalData,JSC::JSGlobalObject * globalObject,JSC::Structure * structure)71     JSDatabasePrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) : JSC::JSObjectWithGlobalObject(globalData, globalObject, structure) { }
72 protected:
73     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
74 };
75 
76 // Functions
77 
78 JSC::EncodedJSValue JSC_HOST_CALL jsDatabasePrototypeFunctionChangeVersion(JSC::ExecState*);
79 JSC::EncodedJSValue JSC_HOST_CALL jsDatabasePrototypeFunctionTransaction(JSC::ExecState*);
80 JSC::EncodedJSValue JSC_HOST_CALL jsDatabasePrototypeFunctionReadTransaction(JSC::ExecState*);
81 // Attributes
82 
83 JSC::JSValue jsDatabaseVersion(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
84 
85 } // namespace WebCore
86 
87 #endif // ENABLE(DATABASE)
88 
89 #endif
90