/work/obj-fuzz/dist/include/mozilla/dom/BasicCardPaymentBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM BasicCardPayment.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_BasicCardPaymentBinding_h |
4 | | #define mozilla_dom_BasicCardPaymentBinding_h |
5 | | |
6 | | #include "GeckoProfiler.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 | | #include "mozilla/dom/PaymentAddress.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace dom { |
16 | | |
17 | | struct BasicCardRequestAtoms; |
18 | | struct BasicCardResponseAtoms; |
19 | | struct NativePropertyHooks; |
20 | | class PaymentAddress; |
21 | | class ProtoAndIfaceCache; |
22 | | |
23 | | } // namespace dom |
24 | | } // namespace mozilla |
25 | | |
26 | | namespace mozilla { |
27 | | namespace dom { |
28 | | |
29 | | enum class BasicCardType : uint8_t { |
30 | | Credit, |
31 | | Debit, |
32 | | Prepaid, |
33 | | EndGuard_ |
34 | | }; |
35 | | |
36 | | namespace BasicCardTypeValues { |
37 | | extern const EnumEntry strings[4]; |
38 | | } // namespace BasicCardTypeValues |
39 | | |
40 | | bool |
41 | | ToJSValue(JSContext* aCx, BasicCardType aArgument, JS::MutableHandle<JS::Value> aValue); |
42 | | |
43 | | |
44 | | struct BasicCardRequest : public DictionaryBase |
45 | | { |
46 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mSupportedNetworks; |
47 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<BasicCardType>> mSupportedTypes; |
48 | | |
49 | | BasicCardRequest(); |
50 | | |
51 | | explicit inline BasicCardRequest(const FastDictionaryInitializer& ) |
52 | 0 | { |
53 | 0 | // Do nothing here; this is used by our "Fast" subclass |
54 | 0 | } |
55 | | |
56 | | explicit inline BasicCardRequest(const BasicCardRequest& aOther) |
57 | 0 | { |
58 | 0 | *this = aOther; |
59 | 0 | } |
60 | | |
61 | | bool |
62 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
63 | | |
64 | | bool |
65 | | Init(const nsAString& aJSON); |
66 | | |
67 | | bool |
68 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
69 | | |
70 | | bool |
71 | | ToJSON(nsAString& aJSON) const; |
72 | | |
73 | | void |
74 | | TraceDictionary(JSTracer* trc); |
75 | | |
76 | | BasicCardRequest& |
77 | | operator=(const BasicCardRequest& aOther); |
78 | | |
79 | | private: |
80 | | static bool |
81 | | InitIds(JSContext* cx, BasicCardRequestAtoms* atomsCache); |
82 | | }; |
83 | | |
84 | | namespace binding_detail { |
85 | | struct FastBasicCardRequest : public BasicCardRequest |
86 | | { |
87 | | inline FastBasicCardRequest() |
88 | | : BasicCardRequest(FastDictionaryInitializer()) |
89 | 0 | { |
90 | 0 | // Doesn't matter what int we pass to the parent constructor |
91 | 0 | } |
92 | | }; |
93 | | } // namespace binding_detail |
94 | | |
95 | | |
96 | | struct BasicCardResponse : public DictionaryBase |
97 | | { |
98 | | MOZ_INIT_OUTSIDE_CTOR Optional<RefPtr<mozilla::dom::PaymentAddress>> mBillingAddress; |
99 | | MOZ_INIT_OUTSIDE_CTOR nsString mCardNumber; |
100 | | MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mCardSecurityCode; |
101 | | MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mCardholderName; |
102 | | MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mExpiryMonth; |
103 | | MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mExpiryYear; |
104 | | |
105 | | BasicCardResponse(); |
106 | | |
107 | | explicit inline BasicCardResponse(const FastDictionaryInitializer& ) |
108 | 0 | { |
109 | 0 | // Do nothing here; this is used by our "Fast" subclass |
110 | 0 | } |
111 | | |
112 | | explicit inline BasicCardResponse(const BasicCardResponse& aOther) |
113 | 0 | { |
114 | 0 | *this = aOther; |
115 | 0 | } |
116 | | |
117 | | bool |
118 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
119 | | |
120 | | bool |
121 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
122 | | |
123 | | void |
124 | | TraceDictionary(JSTracer* trc); |
125 | | |
126 | | inline void |
127 | | TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags) |
128 | 0 | { |
129 | 0 | ImplCycleCollectionTraverse(aCallback, mBillingAddress, "mBillingAddress", aFlags); |
130 | 0 | } |
131 | | |
132 | | inline void |
133 | | UnlinkForCC() |
134 | 0 | { |
135 | 0 | ImplCycleCollectionUnlink(mBillingAddress); |
136 | 0 | } |
137 | | |
138 | | BasicCardResponse& |
139 | | operator=(const BasicCardResponse& aOther); |
140 | | |
141 | | private: |
142 | | static bool |
143 | | InitIds(JSContext* cx, BasicCardResponseAtoms* atomsCache); |
144 | | }; |
145 | | |
146 | | namespace binding_detail { |
147 | | struct FastBasicCardResponse : public BasicCardResponse |
148 | | { |
149 | | inline FastBasicCardResponse() |
150 | | : BasicCardResponse(FastDictionaryInitializer()) |
151 | 0 | { |
152 | 0 | // Doesn't matter what int we pass to the parent constructor |
153 | 0 | } |
154 | | }; |
155 | | } // namespace binding_detail |
156 | | |
157 | | |
158 | | } // namespace dom |
159 | | } // namespace mozilla |
160 | | |
161 | | #endif // mozilla_dom_BasicCardPaymentBinding_h |