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 JSTestInterface_h
22#define JSTestInterface_h
23
24#if ENABLE(Condition1) || ENABLE(Condition2)
25
26#include "JSDOMBinding.h"
27#include <runtime/JSGlobalObject.h>
28#include <runtime/JSObjectWithGlobalObject.h>
29#include <runtime/ObjectPrototype.h>
30
31namespace WebCore {
32
33class TestInterface;
34
35class JSTestInterface : public DOMObjectWithGlobalPointer {
36    typedef DOMObjectWithGlobalPointer Base;
37public:
38    JSTestInterface(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<TestInterface>);
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
44    static PassRefPtr<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
49    static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
50    TestInterface* impl() const { return m_impl.get(); }
51
52private:
53    RefPtr<TestInterface> m_impl;
54protected:
55    static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
56};
57
58JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestInterface*);
59TestInterface* toTestInterface(JSC::JSValue);
60
61class JSTestInterfacePrototype : public JSC::JSObjectWithGlobalObject {
62    typedef JSC::JSObjectWithGlobalObject Base;
63public:
64    static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
65    static const JSC::ClassInfo s_info;
66    static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
67    {
68        return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
69    }
70    JSTestInterfacePrototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { }
71protected:
72    static const unsigned StructureFlags = Base::StructureFlags;
73};
74
75// Attributes
76
77JSC::JSValue jsTestInterfaceConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
78
79} // namespace WebCore
80
81#endif // ENABLE(Condition1) || ENABLE(Condition2)
82
83#endif
84