Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM IDBIndex.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_IDBIndexBinding_h
4 : #define mozilla_dom_IDBIndexBinding_h
5 :
6 : #include "IDBCursorBinding.h"
7 : #include "js/RootingAPI.h"
8 : #include "jspubtd.h"
9 : #include "mozilla/ErrorResult.h"
10 : #include "mozilla/dom/BindingDeclarations.h"
11 : #include "mozilla/dom/Nullable.h"
12 :
13 : namespace mozilla {
14 : namespace dom {
15 :
16 : class IDBIndex;
17 : struct IDBIndexAtoms;
18 : struct IDBIndexParametersAtoms;
19 : struct NativePropertyHooks;
20 : class ProtoAndIfaceCache;
21 :
22 : } // namespace dom
23 : } // namespace mozilla
24 :
25 : namespace mozilla {
26 : namespace dom {
27 :
28 0 : struct IDBIndexParameters : public DictionaryBase
29 : {
30 : MOZ_INIT_OUTSIDE_CTOR nsString mLocale;
31 : MOZ_INIT_OUTSIDE_CTOR bool mMultiEntry;
32 : MOZ_INIT_OUTSIDE_CTOR bool mUnique;
33 :
34 : IDBIndexParameters();
35 :
36 0 : explicit inline IDBIndexParameters(const FastDictionaryInitializer& )
37 0 : {
38 : // Do nothing here; this is used by our "Fast" subclass
39 0 : }
40 :
41 : explicit inline IDBIndexParameters(const IDBIndexParameters& aOther)
42 : {
43 : *this = aOther;
44 : }
45 :
46 : bool
47 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
48 :
49 : bool
50 : Init(const nsAString& aJSON);
51 :
52 : bool
53 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
54 :
55 : bool
56 : ToJSON(nsAString& aJSON) const;
57 :
58 : void
59 : TraceDictionary(JSTracer* trc);
60 :
61 : IDBIndexParameters&
62 : operator=(const IDBIndexParameters& aOther);
63 :
64 : private:
65 : static bool
66 : InitIds(JSContext* cx, IDBIndexParametersAtoms* atomsCache);
67 : };
68 :
69 : namespace binding_detail {
70 0 : struct FastIDBIndexParameters : public IDBIndexParameters
71 : {
72 0 : inline FastIDBIndexParameters()
73 0 : : IDBIndexParameters(FastDictionaryInitializer())
74 : {
75 : // Doesn't matter what int we pass to the parent constructor
76 0 : }
77 : };
78 : } // namespace binding_detail
79 :
80 :
81 : namespace IDBIndexBinding {
82 :
83 : typedef mozilla::dom::IDBIndex NativeType;
84 :
85 : JSObject*
86 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
87 :
88 : const JSClass*
89 : GetJSClass();
90 :
91 : bool
92 : Wrap(JSContext* aCx, mozilla::dom::IDBIndex* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
93 :
94 : template <class T>
95 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
96 : {
97 0 : JS::Rooted<JSObject*> reflector(aCx);
98 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
99 : }
100 :
101 : // We declare this as an array so that retrieving a pointer to this
102 : // binding's property hooks only requires compile/link-time resolvable
103 : // address arithmetic. Declaring it as a pointer instead would require
104 : // doing a run-time load to fetch a pointer to this binding's property
105 : // hooks. And then structures which embedded a pointer to this structure
106 : // would require a run-time load for proper initialization, which would
107 : // then induce static constructors. Lots of static constructors.
108 : extern const NativePropertyHooks sNativePropertyHooks[];
109 :
110 : void
111 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
112 :
113 : JS::Handle<JSObject*>
114 : GetProtoObjectHandle(JSContext* aCx);
115 :
116 : JS::Handle<JSObject*>
117 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
118 :
119 : JSObject*
120 : GetConstructorObject(JSContext* aCx);
121 :
122 : } // namespace IDBIndexBinding
123 :
124 :
125 :
126 : } // namespace dom
127 : } // namespace mozilla
128 :
129 : #endif // mozilla_dom_IDBIndexBinding_h
|