tizen beta release
[framework/web/webkit-efl.git] / DerivedSources / WebCore / JSGeoposition.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 JSGeoposition_h
22 #define JSGeoposition_h
23
24 #if ENABLE(GEOLOCATION)
25
26 #include "Geoposition.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 JSGeoposition : public JSDOMWrapper {
35 public:
36     typedef JSDOMWrapper Base;
37     static JSGeoposition* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<Geoposition> impl)
38     {
39         JSGeoposition* ptr = new (JSC::allocateCell<JSGeoposition>(globalObject->globalData().heap)) JSGeoposition(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     Geoposition* impl() const { return m_impl; }
55     void releaseImpl() { m_impl->deref(); m_impl = 0; }
56
57 private:
58     Geoposition* m_impl;
59 protected:
60     JSGeoposition(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<Geoposition>);
61     void finishCreation(JSC::JSGlobalData&);
62     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
63 };
64
65 class JSGeopositionOwner : 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);
68 };
69
70 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, Geoposition*)
71 {
72     DEFINE_STATIC_LOCAL(JSGeopositionOwner, jsGeopositionOwner, ());
73     return &jsGeopositionOwner;
74 }
75
76 inline void* wrapperContext(DOMWrapperWorld* world, Geoposition*)
77 {
78     return world;
79 }
80
81 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Geoposition*);
82 Geoposition* toGeoposition(JSC::JSValue);
83
84 class JSGeopositionPrototype : public JSC::JSNonFinalObject {
85 public:
86     typedef JSC::JSNonFinalObject Base;
87     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
88     static JSGeopositionPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
89     {
90         JSGeopositionPrototype* ptr = new (JSC::allocateCell<JSGeopositionPrototype>(globalData.heap)) JSGeopositionPrototype(globalData, globalObject, structure);
91         ptr->finishCreation(globalData);
92         return ptr;
93     }
94
95     static const JSC::ClassInfo s_info;
96     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
97     {
98         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
99     }
100
101 private:
102     JSGeopositionPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
103 protected:
104     static const unsigned StructureFlags = Base::StructureFlags;
105 };
106
107 // Attributes
108
109 JSC::JSValue jsGeopositionCoords(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
110 JSC::JSValue jsGeopositionTimestamp(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
111
112 } // namespace WebCore
113
114 #endif // ENABLE(GEOLOCATION)
115
116 #endif