Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM PaymentResponse.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_PaymentResponseBinding_h
4 : #define mozilla_dom_PaymentResponseBinding_h
5 :
6 : #include "js/RootingAPI.h"
7 : #include "jspubtd.h"
8 : #include "mozilla/ErrorResult.h"
9 : #include "mozilla/dom/BindingDeclarations.h"
10 : #include "mozilla/dom/Nullable.h"
11 :
12 : namespace mozilla {
13 : namespace dom {
14 :
15 : struct NativePropertyHooks;
16 : class PaymentResponse;
17 : struct PaymentResponseAtoms;
18 : class ProtoAndIfaceCache;
19 :
20 : } // namespace dom
21 : } // namespace mozilla
22 :
23 : namespace mozilla {
24 : namespace dom {
25 :
26 : enum class PaymentComplete : uint8_t {
27 : Success,
28 : Fail,
29 : Unknown,
30 : EndGuard_
31 : };
32 :
33 : namespace PaymentCompleteValues {
34 : extern const EnumEntry strings[4];
35 : } // namespace PaymentCompleteValues
36 :
37 : bool
38 : ToJSValue(JSContext* aCx, PaymentComplete aArgument, JS::MutableHandle<JS::Value> aValue);
39 :
40 :
41 : namespace PaymentResponseBinding {
42 :
43 : typedef mozilla::dom::PaymentResponse NativeType;
44 :
45 : bool
46 : JsonifyAttributes(JSContext* aCx, JS::Handle<JSObject*> obj, mozilla::dom::PaymentResponse* self, JS::Rooted<JSObject*>& aResult);
47 :
48 : bool
49 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
50 :
51 : JSObject*
52 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
53 :
54 : const JSClass*
55 : GetJSClass();
56 :
57 : bool
58 : Wrap(JSContext* aCx, mozilla::dom::PaymentResponse* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
59 :
60 : template <class T>
61 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
62 : {
63 0 : JS::Rooted<JSObject*> reflector(aCx);
64 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
65 : }
66 :
67 : // We declare this as an array so that retrieving a pointer to this
68 : // binding's property hooks only requires compile/link-time resolvable
69 : // address arithmetic. Declaring it as a pointer instead would require
70 : // doing a run-time load to fetch a pointer to this binding's property
71 : // hooks. And then structures which embedded a pointer to this structure
72 : // would require a run-time load for proper initialization, which would
73 : // then induce static constructors. Lots of static constructors.
74 : extern const NativePropertyHooks sNativePropertyHooks[];
75 :
76 : void
77 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
78 :
79 : JS::Handle<JSObject*>
80 : GetProtoObjectHandle(JSContext* aCx);
81 :
82 : JS::Handle<JSObject*>
83 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
84 :
85 : JSObject*
86 : GetConstructorObject(JSContext* aCx);
87 :
88 : } // namespace PaymentResponseBinding
89 :
90 :
91 :
92 : } // namespace dom
93 : } // namespace mozilla
94 :
95 : #endif // mozilla_dom_PaymentResponseBinding_h
|