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 JSDatabaseSync_h
22 #define JSDatabaseSync_h
24 #if ENABLE(SQL_DATABASE)
26 #include "DatabaseSync.h"
27 #include "JSDOMBinding.h"
28 #include <runtime/JSGlobalObject.h>
29 #include <runtime/JSObject.h>
30 #include <runtime/ObjectPrototype.h>
34 class JSDatabaseSync : public JSDOMWrapper {
36 typedef JSDOMWrapper Base;
37 static JSDatabaseSync* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<DatabaseSync> impl)
39 JSDatabaseSync* ptr = new (JSC::allocateCell<JSDatabaseSync>(globalObject->globalData().heap)) JSDatabaseSync(structure, globalObject, impl);
40 ptr->finishCreation(globalObject->globalData());
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;
49 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
51 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
54 DatabaseSync* impl() const { return m_impl; }
55 void releaseImpl() { m_impl->deref(); m_impl = 0; }
60 JSDatabaseSync(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<DatabaseSync>);
61 void finishCreation(JSC::JSGlobalData&);
62 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
65 class JSDatabaseSyncOwner : public JSC::WeakHandleOwner {
66 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
67 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
70 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, DatabaseSync*)
72 DEFINE_STATIC_LOCAL(JSDatabaseSyncOwner, jsDatabaseSyncOwner, ());
73 return &jsDatabaseSyncOwner;
76 inline void* wrapperContext(DOMWrapperWorld* world, DatabaseSync*)
81 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DatabaseSync*);
82 DatabaseSync* toDatabaseSync(JSC::JSValue);
84 class JSDatabaseSyncPrototype : public JSC::JSNonFinalObject {
86 typedef JSC::JSNonFinalObject Base;
87 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
88 static JSDatabaseSyncPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
90 JSDatabaseSyncPrototype* ptr = new (JSC::allocateCell<JSDatabaseSyncPrototype>(globalData.heap)) JSDatabaseSyncPrototype(globalData, globalObject, structure);
91 ptr->finishCreation(globalData);
95 static const JSC::ClassInfo s_info;
96 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
97 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
98 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
100 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
104 JSDatabaseSyncPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
106 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
111 JSC::EncodedJSValue JSC_HOST_CALL jsDatabaseSyncPrototypeFunctionChangeVersion(JSC::ExecState*);
112 JSC::EncodedJSValue JSC_HOST_CALL jsDatabaseSyncPrototypeFunctionTransaction(JSC::ExecState*);
113 JSC::EncodedJSValue JSC_HOST_CALL jsDatabaseSyncPrototypeFunctionReadTransaction(JSC::ExecState*);
116 JSC::JSValue jsDatabaseSyncVersion(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
117 JSC::JSValue jsDatabaseSyncLastErrorMessage(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
119 } // namespace WebCore
121 #endif // ENABLE(SQL_DATABASE)