]> git.proxmox.com Git - rustc.git/blob - vendor/windows/src/Windows/ApplicationModel/Payments/mod.rs
Merge 1.70 into proxmox/bookworm
[rustc.git] / vendor / windows / src / Windows / ApplicationModel / Payments / mod.rs
1 #[cfg(feature = "ApplicationModel_Payments_Provider")]
2 pub mod Provider;
3 #[doc(hidden)]
4 #[repr(transparent)]
5 pub struct IPaymentAddress(::windows::core::IUnknown);
6 unsafe impl ::windows::core::Interface for IPaymentAddress {
7 type Vtable = IPaymentAddress_Vtbl;
8 }
9 impl ::core::clone::Clone for IPaymentAddress {
10 fn clone(&self) -> Self {
11 Self(self.0.clone())
12 }
13 }
14 unsafe impl ::windows::core::ComInterface for IPaymentAddress {
15 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5f2264e9_6f3a_4166_a018_0a0b06bb32b5);
16 }
17 #[repr(C)]
18 #[doc(hidden)]
19 pub struct IPaymentAddress_Vtbl {
20 pub base__: ::windows::core::IInspectable_Vtbl,
21 pub Country: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
22 pub SetCountry: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
23 #[cfg(feature = "Foundation_Collections")]
24 pub AddressLines: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
25 #[cfg(not(feature = "Foundation_Collections"))]
26 AddressLines: usize,
27 #[cfg(feature = "Foundation_Collections")]
28 pub SetAddressLines: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
29 #[cfg(not(feature = "Foundation_Collections"))]
30 SetAddressLines: usize,
31 pub Region: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
32 pub SetRegion: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
33 pub City: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
34 pub SetCity: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
35 pub DependentLocality: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
36 pub SetDependentLocality: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
37 pub PostalCode: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
38 pub SetPostalCode: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
39 pub SortingCode: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
40 pub SetSortingCode: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
41 pub LanguageCode: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
42 pub SetLanguageCode: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
43 pub Organization: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
44 pub SetOrganization: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
45 pub Recipient: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
46 pub SetRecipient: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
47 pub PhoneNumber: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
48 pub SetPhoneNumber: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
49 #[cfg(feature = "Foundation_Collections")]
50 pub Properties: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
51 #[cfg(not(feature = "Foundation_Collections"))]
52 Properties: usize,
53 }
54 #[doc(hidden)]
55 #[repr(transparent)]
56 pub struct IPaymentCanMakePaymentResult(::windows::core::IUnknown);
57 unsafe impl ::windows::core::Interface for IPaymentCanMakePaymentResult {
58 type Vtable = IPaymentCanMakePaymentResult_Vtbl;
59 }
60 impl ::core::clone::Clone for IPaymentCanMakePaymentResult {
61 fn clone(&self) -> Self {
62 Self(self.0.clone())
63 }
64 }
65 unsafe impl ::windows::core::ComInterface for IPaymentCanMakePaymentResult {
66 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7696fe55_d5d3_4d3d_b345_45591759c510);
67 }
68 #[repr(C)]
69 #[doc(hidden)]
70 pub struct IPaymentCanMakePaymentResult_Vtbl {
71 pub base__: ::windows::core::IInspectable_Vtbl,
72 pub Status: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut PaymentCanMakePaymentResultStatus) -> ::windows::core::HRESULT,
73 }
74 #[doc(hidden)]
75 #[repr(transparent)]
76 pub struct IPaymentCanMakePaymentResultFactory(::windows::core::IUnknown);
77 unsafe impl ::windows::core::Interface for IPaymentCanMakePaymentResultFactory {
78 type Vtable = IPaymentCanMakePaymentResultFactory_Vtbl;
79 }
80 impl ::core::clone::Clone for IPaymentCanMakePaymentResultFactory {
81 fn clone(&self) -> Self {
82 Self(self.0.clone())
83 }
84 }
85 unsafe impl ::windows::core::ComInterface for IPaymentCanMakePaymentResultFactory {
86 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbbdcaa3e_7d49_4f69_aa53_2a0f8164b7c9);
87 }
88 #[repr(C)]
89 #[doc(hidden)]
90 pub struct IPaymentCanMakePaymentResultFactory_Vtbl {
91 pub base__: ::windows::core::IInspectable_Vtbl,
92 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: PaymentCanMakePaymentResultStatus, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
93 }
94 #[doc(hidden)]
95 #[repr(transparent)]
96 pub struct IPaymentCurrencyAmount(::windows::core::IUnknown);
97 unsafe impl ::windows::core::Interface for IPaymentCurrencyAmount {
98 type Vtable = IPaymentCurrencyAmount_Vtbl;
99 }
100 impl ::core::clone::Clone for IPaymentCurrencyAmount {
101 fn clone(&self) -> Self {
102 Self(self.0.clone())
103 }
104 }
105 unsafe impl ::windows::core::ComInterface for IPaymentCurrencyAmount {
106 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe3a3e9e0_b41f_4987_bdcb_071331f2daa4);
107 }
108 #[repr(C)]
109 #[doc(hidden)]
110 pub struct IPaymentCurrencyAmount_Vtbl {
111 pub base__: ::windows::core::IInspectable_Vtbl,
112 pub Currency: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
113 pub SetCurrency: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
114 pub CurrencySystem: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
115 pub SetCurrencySystem: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
116 pub Value: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
117 pub SetValue: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
118 }
119 #[doc(hidden)]
120 #[repr(transparent)]
121 pub struct IPaymentCurrencyAmountFactory(::windows::core::IUnknown);
122 unsafe impl ::windows::core::Interface for IPaymentCurrencyAmountFactory {
123 type Vtable = IPaymentCurrencyAmountFactory_Vtbl;
124 }
125 impl ::core::clone::Clone for IPaymentCurrencyAmountFactory {
126 fn clone(&self) -> Self {
127 Self(self.0.clone())
128 }
129 }
130 unsafe impl ::windows::core::ComInterface for IPaymentCurrencyAmountFactory {
131 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3257d338_140c_4575_8535_f773178c09a7);
132 }
133 #[repr(C)]
134 #[doc(hidden)]
135 pub struct IPaymentCurrencyAmountFactory_Vtbl {
136 pub base__: ::windows::core::IInspectable_Vtbl,
137 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>, currency: ::std::mem::MaybeUninit<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
138 pub CreateWithCurrencySystem: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>, currency: ::std::mem::MaybeUninit<::windows::core::HSTRING>, currencysystem: ::std::mem::MaybeUninit<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
139 }
140 #[doc(hidden)]
141 #[repr(transparent)]
142 pub struct IPaymentDetails(::windows::core::IUnknown);
143 unsafe impl ::windows::core::Interface for IPaymentDetails {
144 type Vtable = IPaymentDetails_Vtbl;
145 }
146 impl ::core::clone::Clone for IPaymentDetails {
147 fn clone(&self) -> Self {
148 Self(self.0.clone())
149 }
150 }
151 unsafe impl ::windows::core::ComInterface for IPaymentDetails {
152 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x53bb2d7d_e0eb_4053_8eae_ce7c48e02945);
153 }
154 #[repr(C)]
155 #[doc(hidden)]
156 pub struct IPaymentDetails_Vtbl {
157 pub base__: ::windows::core::IInspectable_Vtbl,
158 pub Total: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
159 pub SetTotal: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
160 #[cfg(feature = "Foundation_Collections")]
161 pub DisplayItems: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
162 #[cfg(not(feature = "Foundation_Collections"))]
163 DisplayItems: usize,
164 #[cfg(feature = "Foundation_Collections")]
165 pub SetDisplayItems: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
166 #[cfg(not(feature = "Foundation_Collections"))]
167 SetDisplayItems: usize,
168 #[cfg(feature = "Foundation_Collections")]
169 pub ShippingOptions: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
170 #[cfg(not(feature = "Foundation_Collections"))]
171 ShippingOptions: usize,
172 #[cfg(feature = "Foundation_Collections")]
173 pub SetShippingOptions: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
174 #[cfg(not(feature = "Foundation_Collections"))]
175 SetShippingOptions: usize,
176 #[cfg(feature = "Foundation_Collections")]
177 pub Modifiers: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
178 #[cfg(not(feature = "Foundation_Collections"))]
179 Modifiers: usize,
180 #[cfg(feature = "Foundation_Collections")]
181 pub SetModifiers: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
182 #[cfg(not(feature = "Foundation_Collections"))]
183 SetModifiers: usize,
184 }
185 #[doc(hidden)]
186 #[repr(transparent)]
187 pub struct IPaymentDetailsFactory(::windows::core::IUnknown);
188 unsafe impl ::windows::core::Interface for IPaymentDetailsFactory {
189 type Vtable = IPaymentDetailsFactory_Vtbl;
190 }
191 impl ::core::clone::Clone for IPaymentDetailsFactory {
192 fn clone(&self) -> Self {
193 Self(self.0.clone())
194 }
195 }
196 unsafe impl ::windows::core::ComInterface for IPaymentDetailsFactory {
197 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcfe8afee_c0ea_4ca1_8bc7_6de67b1f3763);
198 }
199 #[repr(C)]
200 #[doc(hidden)]
201 pub struct IPaymentDetailsFactory_Vtbl {
202 pub base__: ::windows::core::IInspectable_Vtbl,
203 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, total: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
204 #[cfg(feature = "Foundation_Collections")]
205 pub CreateWithDisplayItems: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, total: *mut ::core::ffi::c_void, displayitems: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
206 #[cfg(not(feature = "Foundation_Collections"))]
207 CreateWithDisplayItems: usize,
208 }
209 #[doc(hidden)]
210 #[repr(transparent)]
211 pub struct IPaymentDetailsModifier(::windows::core::IUnknown);
212 unsafe impl ::windows::core::Interface for IPaymentDetailsModifier {
213 type Vtable = IPaymentDetailsModifier_Vtbl;
214 }
215 impl ::core::clone::Clone for IPaymentDetailsModifier {
216 fn clone(&self) -> Self {
217 Self(self.0.clone())
218 }
219 }
220 unsafe impl ::windows::core::ComInterface for IPaymentDetailsModifier {
221 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbe1c7d65_4323_41d7_b305_dfcb765f69de);
222 }
223 #[repr(C)]
224 #[doc(hidden)]
225 pub struct IPaymentDetailsModifier_Vtbl {
226 pub base__: ::windows::core::IInspectable_Vtbl,
227 pub JsonData: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
228 #[cfg(feature = "Foundation_Collections")]
229 pub SupportedMethodIds: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
230 #[cfg(not(feature = "Foundation_Collections"))]
231 SupportedMethodIds: usize,
232 pub Total: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
233 #[cfg(feature = "Foundation_Collections")]
234 pub AdditionalDisplayItems: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
235 #[cfg(not(feature = "Foundation_Collections"))]
236 AdditionalDisplayItems: usize,
237 }
238 #[doc(hidden)]
239 #[repr(transparent)]
240 pub struct IPaymentDetailsModifierFactory(::windows::core::IUnknown);
241 unsafe impl ::windows::core::Interface for IPaymentDetailsModifierFactory {
242 type Vtable = IPaymentDetailsModifierFactory_Vtbl;
243 }
244 impl ::core::clone::Clone for IPaymentDetailsModifierFactory {
245 fn clone(&self) -> Self {
246 Self(self.0.clone())
247 }
248 }
249 unsafe impl ::windows::core::ComInterface for IPaymentDetailsModifierFactory {
250 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x79005286_54de_429c_9e4f_5dce6e10ebce);
251 }
252 #[repr(C)]
253 #[doc(hidden)]
254 pub struct IPaymentDetailsModifierFactory_Vtbl {
255 pub base__: ::windows::core::IInspectable_Vtbl,
256 #[cfg(feature = "Foundation_Collections")]
257 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, supportedmethodids: *mut ::core::ffi::c_void, total: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
258 #[cfg(not(feature = "Foundation_Collections"))]
259 Create: usize,
260 #[cfg(feature = "Foundation_Collections")]
261 pub CreateWithAdditionalDisplayItems: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, supportedmethodids: *mut ::core::ffi::c_void, total: *mut ::core::ffi::c_void, additionaldisplayitems: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
262 #[cfg(not(feature = "Foundation_Collections"))]
263 CreateWithAdditionalDisplayItems: usize,
264 #[cfg(feature = "Foundation_Collections")]
265 pub CreateWithAdditionalDisplayItemsAndJsonData: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, supportedmethodids: *mut ::core::ffi::c_void, total: *mut ::core::ffi::c_void, additionaldisplayitems: *mut ::core::ffi::c_void, jsondata: ::std::mem::MaybeUninit<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
266 #[cfg(not(feature = "Foundation_Collections"))]
267 CreateWithAdditionalDisplayItemsAndJsonData: usize,
268 }
269 #[doc(hidden)]
270 #[repr(transparent)]
271 pub struct IPaymentItem(::windows::core::IUnknown);
272 unsafe impl ::windows::core::Interface for IPaymentItem {
273 type Vtable = IPaymentItem_Vtbl;
274 }
275 impl ::core::clone::Clone for IPaymentItem {
276 fn clone(&self) -> Self {
277 Self(self.0.clone())
278 }
279 }
280 unsafe impl ::windows::core::ComInterface for IPaymentItem {
281 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x685ac88b_79b2_4b76_9e03_a876223dfe72);
282 }
283 #[repr(C)]
284 #[doc(hidden)]
285 pub struct IPaymentItem_Vtbl {
286 pub base__: ::windows::core::IInspectable_Vtbl,
287 pub Label: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
288 pub SetLabel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
289 pub Amount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
290 pub SetAmount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
291 pub Pending: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
292 pub SetPending: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows::core::HRESULT,
293 }
294 #[doc(hidden)]
295 #[repr(transparent)]
296 pub struct IPaymentItemFactory(::windows::core::IUnknown);
297 unsafe impl ::windows::core::Interface for IPaymentItemFactory {
298 type Vtable = IPaymentItemFactory_Vtbl;
299 }
300 impl ::core::clone::Clone for IPaymentItemFactory {
301 fn clone(&self) -> Self {
302 Self(self.0.clone())
303 }
304 }
305 unsafe impl ::windows::core::ComInterface for IPaymentItemFactory {
306 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc6ab7ad8_2503_4d1d_a778_02b2e5927b2c);
307 }
308 #[repr(C)]
309 #[doc(hidden)]
310 pub struct IPaymentItemFactory_Vtbl {
311 pub base__: ::windows::core::IInspectable_Vtbl,
312 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, label: ::std::mem::MaybeUninit<::windows::core::HSTRING>, amount: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
313 }
314 #[doc(hidden)]
315 #[repr(transparent)]
316 pub struct IPaymentMediator(::windows::core::IUnknown);
317 unsafe impl ::windows::core::Interface for IPaymentMediator {
318 type Vtable = IPaymentMediator_Vtbl;
319 }
320 impl ::core::clone::Clone for IPaymentMediator {
321 fn clone(&self) -> Self {
322 Self(self.0.clone())
323 }
324 }
325 unsafe impl ::windows::core::ComInterface for IPaymentMediator {
326 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfb0ee829_ec0c_449a_83da_7ae3073365a2);
327 }
328 #[repr(C)]
329 #[doc(hidden)]
330 pub struct IPaymentMediator_Vtbl {
331 pub base__: ::windows::core::IInspectable_Vtbl,
332 #[cfg(feature = "Foundation_Collections")]
333 pub GetSupportedMethodIdsAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
334 #[cfg(not(feature = "Foundation_Collections"))]
335 GetSupportedMethodIdsAsync: usize,
336 #[cfg(feature = "Foundation")]
337 pub SubmitPaymentRequestAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, paymentrequest: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
338 #[cfg(not(feature = "Foundation"))]
339 SubmitPaymentRequestAsync: usize,
340 #[cfg(feature = "Foundation")]
341 pub SubmitPaymentRequestWithChangeHandlerAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, paymentrequest: *mut ::core::ffi::c_void, changehandler: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
342 #[cfg(not(feature = "Foundation"))]
343 SubmitPaymentRequestWithChangeHandlerAsync: usize,
344 }
345 #[doc(hidden)]
346 #[repr(transparent)]
347 pub struct IPaymentMediator2(::windows::core::IUnknown);
348 unsafe impl ::windows::core::Interface for IPaymentMediator2 {
349 type Vtable = IPaymentMediator2_Vtbl;
350 }
351 impl ::core::clone::Clone for IPaymentMediator2 {
352 fn clone(&self) -> Self {
353 Self(self.0.clone())
354 }
355 }
356 unsafe impl ::windows::core::ComInterface for IPaymentMediator2 {
357 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xceef98f1_e407_4128_8e73_d93d5f822786);
358 }
359 #[repr(C)]
360 #[doc(hidden)]
361 pub struct IPaymentMediator2_Vtbl {
362 pub base__: ::windows::core::IInspectable_Vtbl,
363 #[cfg(feature = "Foundation")]
364 pub CanMakePaymentAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, paymentrequest: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
365 #[cfg(not(feature = "Foundation"))]
366 CanMakePaymentAsync: usize,
367 }
368 #[doc(hidden)]
369 #[repr(transparent)]
370 pub struct IPaymentMerchantInfo(::windows::core::IUnknown);
371 unsafe impl ::windows::core::Interface for IPaymentMerchantInfo {
372 type Vtable = IPaymentMerchantInfo_Vtbl;
373 }
374 impl ::core::clone::Clone for IPaymentMerchantInfo {
375 fn clone(&self) -> Self {
376 Self(self.0.clone())
377 }
378 }
379 unsafe impl ::windows::core::ComInterface for IPaymentMerchantInfo {
380 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x63445050_0e94_4ed6_aacb_e6012bd327a7);
381 }
382 #[repr(C)]
383 #[doc(hidden)]
384 pub struct IPaymentMerchantInfo_Vtbl {
385 pub base__: ::windows::core::IInspectable_Vtbl,
386 pub PackageFullName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
387 #[cfg(feature = "Foundation")]
388 pub Uri: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
389 #[cfg(not(feature = "Foundation"))]
390 Uri: usize,
391 }
392 #[doc(hidden)]
393 #[repr(transparent)]
394 pub struct IPaymentMerchantInfoFactory(::windows::core::IUnknown);
395 unsafe impl ::windows::core::Interface for IPaymentMerchantInfoFactory {
396 type Vtable = IPaymentMerchantInfoFactory_Vtbl;
397 }
398 impl ::core::clone::Clone for IPaymentMerchantInfoFactory {
399 fn clone(&self) -> Self {
400 Self(self.0.clone())
401 }
402 }
403 unsafe impl ::windows::core::ComInterface for IPaymentMerchantInfoFactory {
404 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9e89ced3_ccb7_4167_a8ec_e10ae96dbcd1);
405 }
406 #[repr(C)]
407 #[doc(hidden)]
408 pub struct IPaymentMerchantInfoFactory_Vtbl {
409 pub base__: ::windows::core::IInspectable_Vtbl,
410 #[cfg(feature = "Foundation")]
411 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, uri: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
412 #[cfg(not(feature = "Foundation"))]
413 Create: usize,
414 }
415 #[doc(hidden)]
416 #[repr(transparent)]
417 pub struct IPaymentMethodData(::windows::core::IUnknown);
418 unsafe impl ::windows::core::Interface for IPaymentMethodData {
419 type Vtable = IPaymentMethodData_Vtbl;
420 }
421 impl ::core::clone::Clone for IPaymentMethodData {
422 fn clone(&self) -> Self {
423 Self(self.0.clone())
424 }
425 }
426 unsafe impl ::windows::core::ComInterface for IPaymentMethodData {
427 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd1d3caf4_de98_4129_b1b7_c3ad86237bf4);
428 }
429 #[repr(C)]
430 #[doc(hidden)]
431 pub struct IPaymentMethodData_Vtbl {
432 pub base__: ::windows::core::IInspectable_Vtbl,
433 #[cfg(feature = "Foundation_Collections")]
434 pub SupportedMethodIds: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
435 #[cfg(not(feature = "Foundation_Collections"))]
436 SupportedMethodIds: usize,
437 pub JsonData: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
438 }
439 #[doc(hidden)]
440 #[repr(transparent)]
441 pub struct IPaymentMethodDataFactory(::windows::core::IUnknown);
442 unsafe impl ::windows::core::Interface for IPaymentMethodDataFactory {
443 type Vtable = IPaymentMethodDataFactory_Vtbl;
444 }
445 impl ::core::clone::Clone for IPaymentMethodDataFactory {
446 fn clone(&self) -> Self {
447 Self(self.0.clone())
448 }
449 }
450 unsafe impl ::windows::core::ComInterface for IPaymentMethodDataFactory {
451 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8addd27f_9baa_4a82_8342_a8210992a36b);
452 }
453 #[repr(C)]
454 #[doc(hidden)]
455 pub struct IPaymentMethodDataFactory_Vtbl {
456 pub base__: ::windows::core::IInspectable_Vtbl,
457 #[cfg(feature = "Foundation_Collections")]
458 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, supportedmethodids: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
459 #[cfg(not(feature = "Foundation_Collections"))]
460 Create: usize,
461 #[cfg(feature = "Foundation_Collections")]
462 pub CreateWithJsonData: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, supportedmethodids: *mut ::core::ffi::c_void, jsondata: ::std::mem::MaybeUninit<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
463 #[cfg(not(feature = "Foundation_Collections"))]
464 CreateWithJsonData: usize,
465 }
466 #[doc(hidden)]
467 #[repr(transparent)]
468 pub struct IPaymentOptions(::windows::core::IUnknown);
469 unsafe impl ::windows::core::Interface for IPaymentOptions {
470 type Vtable = IPaymentOptions_Vtbl;
471 }
472 impl ::core::clone::Clone for IPaymentOptions {
473 fn clone(&self) -> Self {
474 Self(self.0.clone())
475 }
476 }
477 unsafe impl ::windows::core::ComInterface for IPaymentOptions {
478 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xaaa30854_1f2b_4365_8251_01b58915a5bc);
479 }
480 #[repr(C)]
481 #[doc(hidden)]
482 pub struct IPaymentOptions_Vtbl {
483 pub base__: ::windows::core::IInspectable_Vtbl,
484 pub RequestPayerEmail: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut PaymentOptionPresence) -> ::windows::core::HRESULT,
485 pub SetRequestPayerEmail: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: PaymentOptionPresence) -> ::windows::core::HRESULT,
486 pub RequestPayerName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut PaymentOptionPresence) -> ::windows::core::HRESULT,
487 pub SetRequestPayerName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: PaymentOptionPresence) -> ::windows::core::HRESULT,
488 pub RequestPayerPhoneNumber: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut PaymentOptionPresence) -> ::windows::core::HRESULT,
489 pub SetRequestPayerPhoneNumber: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: PaymentOptionPresence) -> ::windows::core::HRESULT,
490 pub RequestShipping: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
491 pub SetRequestShipping: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows::core::HRESULT,
492 pub ShippingType: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut PaymentShippingType) -> ::windows::core::HRESULT,
493 pub SetShippingType: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: PaymentShippingType) -> ::windows::core::HRESULT,
494 }
495 #[doc(hidden)]
496 #[repr(transparent)]
497 pub struct IPaymentRequest(::windows::core::IUnknown);
498 unsafe impl ::windows::core::Interface for IPaymentRequest {
499 type Vtable = IPaymentRequest_Vtbl;
500 }
501 impl ::core::clone::Clone for IPaymentRequest {
502 fn clone(&self) -> Self {
503 Self(self.0.clone())
504 }
505 }
506 unsafe impl ::windows::core::ComInterface for IPaymentRequest {
507 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb74942e1_ed7b_47eb_bc08_78cc5d6896b6);
508 }
509 #[repr(C)]
510 #[doc(hidden)]
511 pub struct IPaymentRequest_Vtbl {
512 pub base__: ::windows::core::IInspectable_Vtbl,
513 pub MerchantInfo: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
514 pub Details: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
515 #[cfg(feature = "Foundation_Collections")]
516 pub MethodData: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
517 #[cfg(not(feature = "Foundation_Collections"))]
518 MethodData: usize,
519 pub Options: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
520 }
521 #[doc(hidden)]
522 #[repr(transparent)]
523 pub struct IPaymentRequest2(::windows::core::IUnknown);
524 unsafe impl ::windows::core::Interface for IPaymentRequest2 {
525 type Vtable = IPaymentRequest2_Vtbl;
526 }
527 impl ::core::clone::Clone for IPaymentRequest2 {
528 fn clone(&self) -> Self {
529 Self(self.0.clone())
530 }
531 }
532 unsafe impl ::windows::core::ComInterface for IPaymentRequest2 {
533 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb63ccfb5_5998_493e_a04c_67048a50f141);
534 }
535 #[repr(C)]
536 #[doc(hidden)]
537 pub struct IPaymentRequest2_Vtbl {
538 pub base__: ::windows::core::IInspectable_Vtbl,
539 pub Id: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
540 }
541 #[doc(hidden)]
542 #[repr(transparent)]
543 pub struct IPaymentRequestChangedArgs(::windows::core::IUnknown);
544 unsafe impl ::windows::core::Interface for IPaymentRequestChangedArgs {
545 type Vtable = IPaymentRequestChangedArgs_Vtbl;
546 }
547 impl ::core::clone::Clone for IPaymentRequestChangedArgs {
548 fn clone(&self) -> Self {
549 Self(self.0.clone())
550 }
551 }
552 unsafe impl ::windows::core::ComInterface for IPaymentRequestChangedArgs {
553 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc6145e44_cd8b_4be4_b555_27c99194c0c5);
554 }
555 #[repr(C)]
556 #[doc(hidden)]
557 pub struct IPaymentRequestChangedArgs_Vtbl {
558 pub base__: ::windows::core::IInspectable_Vtbl,
559 pub ChangeKind: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut PaymentRequestChangeKind) -> ::windows::core::HRESULT,
560 pub ShippingAddress: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
561 pub SelectedShippingOption: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
562 pub Acknowledge: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, changeresult: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
563 }
564 #[doc(hidden)]
565 #[repr(transparent)]
566 pub struct IPaymentRequestChangedResult(::windows::core::IUnknown);
567 unsafe impl ::windows::core::Interface for IPaymentRequestChangedResult {
568 type Vtable = IPaymentRequestChangedResult_Vtbl;
569 }
570 impl ::core::clone::Clone for IPaymentRequestChangedResult {
571 fn clone(&self) -> Self {
572 Self(self.0.clone())
573 }
574 }
575 unsafe impl ::windows::core::ComInterface for IPaymentRequestChangedResult {
576 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdf699e5c_16c4_47ad_9401_8440ec0757db);
577 }
578 #[repr(C)]
579 #[doc(hidden)]
580 pub struct IPaymentRequestChangedResult_Vtbl {
581 pub base__: ::windows::core::IInspectable_Vtbl,
582 pub ChangeAcceptedByMerchant: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
583 pub SetChangeAcceptedByMerchant: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows::core::HRESULT,
584 pub Message: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
585 pub SetMessage: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
586 pub UpdatedPaymentDetails: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
587 pub SetUpdatedPaymentDetails: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
588 }
589 #[doc(hidden)]
590 #[repr(transparent)]
591 pub struct IPaymentRequestChangedResultFactory(::windows::core::IUnknown);
592 unsafe impl ::windows::core::Interface for IPaymentRequestChangedResultFactory {
593 type Vtable = IPaymentRequestChangedResultFactory_Vtbl;
594 }
595 impl ::core::clone::Clone for IPaymentRequestChangedResultFactory {
596 fn clone(&self) -> Self {
597 Self(self.0.clone())
598 }
599 }
600 unsafe impl ::windows::core::ComInterface for IPaymentRequestChangedResultFactory {
601 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x08740f56_1d33_4431_814b_67ea24bf21db);
602 }
603 #[repr(C)]
604 #[doc(hidden)]
605 pub struct IPaymentRequestChangedResultFactory_Vtbl {
606 pub base__: ::windows::core::IInspectable_Vtbl,
607 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, changeacceptedbymerchant: bool, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
608 pub CreateWithPaymentDetails: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, changeacceptedbymerchant: bool, updatedpaymentdetails: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
609 }
610 #[doc(hidden)]
611 #[repr(transparent)]
612 pub struct IPaymentRequestFactory(::windows::core::IUnknown);
613 unsafe impl ::windows::core::Interface for IPaymentRequestFactory {
614 type Vtable = IPaymentRequestFactory_Vtbl;
615 }
616 impl ::core::clone::Clone for IPaymentRequestFactory {
617 fn clone(&self) -> Self {
618 Self(self.0.clone())
619 }
620 }
621 unsafe impl ::windows::core::ComInterface for IPaymentRequestFactory {
622 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3e8a79dc_6b74_42d3_b103_f0de35fb1848);
623 }
624 #[repr(C)]
625 #[doc(hidden)]
626 pub struct IPaymentRequestFactory_Vtbl {
627 pub base__: ::windows::core::IInspectable_Vtbl,
628 #[cfg(feature = "Foundation_Collections")]
629 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, details: *mut ::core::ffi::c_void, methoddata: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
630 #[cfg(not(feature = "Foundation_Collections"))]
631 Create: usize,
632 #[cfg(feature = "Foundation_Collections")]
633 pub CreateWithMerchantInfo: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, details: *mut ::core::ffi::c_void, methoddata: *mut ::core::ffi::c_void, merchantinfo: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
634 #[cfg(not(feature = "Foundation_Collections"))]
635 CreateWithMerchantInfo: usize,
636 #[cfg(feature = "Foundation_Collections")]
637 pub CreateWithMerchantInfoAndOptions: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, details: *mut ::core::ffi::c_void, methoddata: *mut ::core::ffi::c_void, merchantinfo: *mut ::core::ffi::c_void, options: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
638 #[cfg(not(feature = "Foundation_Collections"))]
639 CreateWithMerchantInfoAndOptions: usize,
640 }
641 #[doc(hidden)]
642 #[repr(transparent)]
643 pub struct IPaymentRequestFactory2(::windows::core::IUnknown);
644 unsafe impl ::windows::core::Interface for IPaymentRequestFactory2 {
645 type Vtable = IPaymentRequestFactory2_Vtbl;
646 }
647 impl ::core::clone::Clone for IPaymentRequestFactory2 {
648 fn clone(&self) -> Self {
649 Self(self.0.clone())
650 }
651 }
652 unsafe impl ::windows::core::ComInterface for IPaymentRequestFactory2 {
653 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe6ce1325_a506_4372_b7ef_1a031d5662d1);
654 }
655 #[repr(C)]
656 #[doc(hidden)]
657 pub struct IPaymentRequestFactory2_Vtbl {
658 pub base__: ::windows::core::IInspectable_Vtbl,
659 #[cfg(feature = "Foundation_Collections")]
660 pub CreateWithMerchantInfoOptionsAndId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, details: *mut ::core::ffi::c_void, methoddata: *mut ::core::ffi::c_void, merchantinfo: *mut ::core::ffi::c_void, options: *mut ::core::ffi::c_void, id: ::std::mem::MaybeUninit<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
661 #[cfg(not(feature = "Foundation_Collections"))]
662 CreateWithMerchantInfoOptionsAndId: usize,
663 }
664 #[doc(hidden)]
665 #[repr(transparent)]
666 pub struct IPaymentRequestSubmitResult(::windows::core::IUnknown);
667 unsafe impl ::windows::core::Interface for IPaymentRequestSubmitResult {
668 type Vtable = IPaymentRequestSubmitResult_Vtbl;
669 }
670 impl ::core::clone::Clone for IPaymentRequestSubmitResult {
671 fn clone(&self) -> Self {
672 Self(self.0.clone())
673 }
674 }
675 unsafe impl ::windows::core::ComInterface for IPaymentRequestSubmitResult {
676 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7b9c3912_30f2_4e90_b249_8ce7d78ffe56);
677 }
678 #[repr(C)]
679 #[doc(hidden)]
680 pub struct IPaymentRequestSubmitResult_Vtbl {
681 pub base__: ::windows::core::IInspectable_Vtbl,
682 pub Status: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut PaymentRequestStatus) -> ::windows::core::HRESULT,
683 pub Response: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
684 }
685 #[doc(hidden)]
686 #[repr(transparent)]
687 pub struct IPaymentResponse(::windows::core::IUnknown);
688 unsafe impl ::windows::core::Interface for IPaymentResponse {
689 type Vtable = IPaymentResponse_Vtbl;
690 }
691 impl ::core::clone::Clone for IPaymentResponse {
692 fn clone(&self) -> Self {
693 Self(self.0.clone())
694 }
695 }
696 unsafe impl ::windows::core::ComInterface for IPaymentResponse {
697 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe1389457_8bd2_4888_9fa8_97985545108e);
698 }
699 #[repr(C)]
700 #[doc(hidden)]
701 pub struct IPaymentResponse_Vtbl {
702 pub base__: ::windows::core::IInspectable_Vtbl,
703 pub PaymentToken: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
704 pub ShippingOption: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
705 pub ShippingAddress: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
706 pub PayerEmail: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
707 pub PayerName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
708 pub PayerPhoneNumber: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
709 #[cfg(feature = "Foundation")]
710 pub CompleteAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, status: PaymentRequestCompletionStatus, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
711 #[cfg(not(feature = "Foundation"))]
712 CompleteAsync: usize,
713 }
714 #[doc(hidden)]
715 #[repr(transparent)]
716 pub struct IPaymentShippingOption(::windows::core::IUnknown);
717 unsafe impl ::windows::core::Interface for IPaymentShippingOption {
718 type Vtable = IPaymentShippingOption_Vtbl;
719 }
720 impl ::core::clone::Clone for IPaymentShippingOption {
721 fn clone(&self) -> Self {
722 Self(self.0.clone())
723 }
724 }
725 unsafe impl ::windows::core::ComInterface for IPaymentShippingOption {
726 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x13372ada_9753_4574_8966_93145a76c7f9);
727 }
728 #[repr(C)]
729 #[doc(hidden)]
730 pub struct IPaymentShippingOption_Vtbl {
731 pub base__: ::windows::core::IInspectable_Vtbl,
732 pub Label: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
733 pub SetLabel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
734 pub Amount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
735 pub SetAmount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
736 pub Tag: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
737 pub SetTag: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
738 pub IsSelected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
739 pub SetIsSelected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows::core::HRESULT,
740 }
741 #[doc(hidden)]
742 #[repr(transparent)]
743 pub struct IPaymentShippingOptionFactory(::windows::core::IUnknown);
744 unsafe impl ::windows::core::Interface for IPaymentShippingOptionFactory {
745 type Vtable = IPaymentShippingOptionFactory_Vtbl;
746 }
747 impl ::core::clone::Clone for IPaymentShippingOptionFactory {
748 fn clone(&self) -> Self {
749 Self(self.0.clone())
750 }
751 }
752 unsafe impl ::windows::core::ComInterface for IPaymentShippingOptionFactory {
753 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5de5f917_b2d7_446b_9d73_6123fbca3bc6);
754 }
755 #[repr(C)]
756 #[doc(hidden)]
757 pub struct IPaymentShippingOptionFactory_Vtbl {
758 pub base__: ::windows::core::IInspectable_Vtbl,
759 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, label: ::std::mem::MaybeUninit<::windows::core::HSTRING>, amount: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
760 pub CreateWithSelected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, label: ::std::mem::MaybeUninit<::windows::core::HSTRING>, amount: *mut ::core::ffi::c_void, selected: bool, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
761 pub CreateWithSelectedAndTag: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, label: ::std::mem::MaybeUninit<::windows::core::HSTRING>, amount: *mut ::core::ffi::c_void, selected: bool, tag: ::std::mem::MaybeUninit<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
762 }
763 #[doc(hidden)]
764 #[repr(transparent)]
765 pub struct IPaymentToken(::windows::core::IUnknown);
766 unsafe impl ::windows::core::Interface for IPaymentToken {
767 type Vtable = IPaymentToken_Vtbl;
768 }
769 impl ::core::clone::Clone for IPaymentToken {
770 fn clone(&self) -> Self {
771 Self(self.0.clone())
772 }
773 }
774 unsafe impl ::windows::core::ComInterface for IPaymentToken {
775 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbbcac013_ccd0_41f2_b2a1_0a2e4b5dce25);
776 }
777 #[repr(C)]
778 #[doc(hidden)]
779 pub struct IPaymentToken_Vtbl {
780 pub base__: ::windows::core::IInspectable_Vtbl,
781 pub PaymentMethodId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
782 pub JsonDetails: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
783 }
784 #[doc(hidden)]
785 #[repr(transparent)]
786 pub struct IPaymentTokenFactory(::windows::core::IUnknown);
787 unsafe impl ::windows::core::Interface for IPaymentTokenFactory {
788 type Vtable = IPaymentTokenFactory_Vtbl;
789 }
790 impl ::core::clone::Clone for IPaymentTokenFactory {
791 fn clone(&self) -> Self {
792 Self(self.0.clone())
793 }
794 }
795 unsafe impl ::windows::core::ComInterface for IPaymentTokenFactory {
796 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x988cd7aa_4753_4904_8373_dd7b08b995c1);
797 }
798 #[repr(C)]
799 #[doc(hidden)]
800 pub struct IPaymentTokenFactory_Vtbl {
801 pub base__: ::windows::core::IInspectable_Vtbl,
802 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, paymentmethodid: ::std::mem::MaybeUninit<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
803 pub CreateWithJsonDetails: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, paymentmethodid: ::std::mem::MaybeUninit<::windows::core::HSTRING>, jsondetails: ::std::mem::MaybeUninit<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
804 }
805 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
806 #[repr(transparent)]
807 pub struct PaymentAddress(::windows::core::IUnknown);
808 impl PaymentAddress {
809 pub fn new() -> ::windows::core::Result<Self> {
810 Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
811 }
812 fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
813 static SHARED: ::windows::imp::FactoryCache<PaymentAddress, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new();
814 SHARED.call(callback)
815 }
816 pub fn Country(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
817 let this = self;
818 unsafe {
819 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
820 (::windows::core::Interface::vtable(this).Country)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
821 }
822 }
823 pub fn SetCountry(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
824 let this = self;
825 unsafe { (::windows::core::Interface::vtable(this).SetCountry)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
826 }
827 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
828 #[cfg(feature = "Foundation_Collections")]
829 pub fn AddressLines(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<::windows::core::HSTRING>> {
830 let this = self;
831 unsafe {
832 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<::windows::core::HSTRING>>();
833 (::windows::core::Interface::vtable(this).AddressLines)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
834 }
835 }
836 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
837 #[cfg(feature = "Foundation_Collections")]
838 pub fn SetAddressLines<P0>(&self, value: P0) -> ::windows::core::Result<()>
839 where
840 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IVectorView<::windows::core::HSTRING>>,
841 {
842 let this = self;
843 unsafe { (::windows::core::Interface::vtable(this).SetAddressLines)(::windows::core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() }
844 }
845 pub fn Region(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
846 let this = self;
847 unsafe {
848 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
849 (::windows::core::Interface::vtable(this).Region)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
850 }
851 }
852 pub fn SetRegion(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
853 let this = self;
854 unsafe { (::windows::core::Interface::vtable(this).SetRegion)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
855 }
856 pub fn City(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
857 let this = self;
858 unsafe {
859 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
860 (::windows::core::Interface::vtable(this).City)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
861 }
862 }
863 pub fn SetCity(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
864 let this = self;
865 unsafe { (::windows::core::Interface::vtable(this).SetCity)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
866 }
867 pub fn DependentLocality(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
868 let this = self;
869 unsafe {
870 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
871 (::windows::core::Interface::vtable(this).DependentLocality)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
872 }
873 }
874 pub fn SetDependentLocality(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
875 let this = self;
876 unsafe { (::windows::core::Interface::vtable(this).SetDependentLocality)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
877 }
878 pub fn PostalCode(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
879 let this = self;
880 unsafe {
881 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
882 (::windows::core::Interface::vtable(this).PostalCode)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
883 }
884 }
885 pub fn SetPostalCode(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
886 let this = self;
887 unsafe { (::windows::core::Interface::vtable(this).SetPostalCode)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
888 }
889 pub fn SortingCode(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
890 let this = self;
891 unsafe {
892 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
893 (::windows::core::Interface::vtable(this).SortingCode)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
894 }
895 }
896 pub fn SetSortingCode(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
897 let this = self;
898 unsafe { (::windows::core::Interface::vtable(this).SetSortingCode)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
899 }
900 pub fn LanguageCode(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
901 let this = self;
902 unsafe {
903 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
904 (::windows::core::Interface::vtable(this).LanguageCode)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
905 }
906 }
907 pub fn SetLanguageCode(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
908 let this = self;
909 unsafe { (::windows::core::Interface::vtable(this).SetLanguageCode)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
910 }
911 pub fn Organization(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
912 let this = self;
913 unsafe {
914 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
915 (::windows::core::Interface::vtable(this).Organization)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
916 }
917 }
918 pub fn SetOrganization(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
919 let this = self;
920 unsafe { (::windows::core::Interface::vtable(this).SetOrganization)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
921 }
922 pub fn Recipient(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
923 let this = self;
924 unsafe {
925 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
926 (::windows::core::Interface::vtable(this).Recipient)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
927 }
928 }
929 pub fn SetRecipient(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
930 let this = self;
931 unsafe { (::windows::core::Interface::vtable(this).SetRecipient)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
932 }
933 pub fn PhoneNumber(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
934 let this = self;
935 unsafe {
936 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
937 (::windows::core::Interface::vtable(this).PhoneNumber)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
938 }
939 }
940 pub fn SetPhoneNumber(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
941 let this = self;
942 unsafe { (::windows::core::Interface::vtable(this).SetPhoneNumber)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
943 }
944 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
945 #[cfg(feature = "Foundation_Collections")]
946 pub fn Properties(&self) -> ::windows::core::Result<super::super::Foundation::Collections::ValueSet> {
947 let this = self;
948 unsafe {
949 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::ValueSet>();
950 (::windows::core::Interface::vtable(this).Properties)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
951 }
952 }
953 }
954 impl ::core::cmp::PartialEq for PaymentAddress {
955 fn eq(&self, other: &Self) -> bool {
956 self.0 == other.0
957 }
958 }
959 impl ::core::cmp::Eq for PaymentAddress {}
960 impl ::core::fmt::Debug for PaymentAddress {
961 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
962 f.debug_tuple("PaymentAddress").field(&self.0).finish()
963 }
964 }
965 impl ::windows::core::RuntimeType for PaymentAddress {
966 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentAddress;{5f2264e9-6f3a-4166-a018-0a0b06bb32b5})");
967 }
968 impl ::core::clone::Clone for PaymentAddress {
969 fn clone(&self) -> Self {
970 Self(self.0.clone())
971 }
972 }
973 unsafe impl ::windows::core::Interface for PaymentAddress {
974 type Vtable = IPaymentAddress_Vtbl;
975 }
976 unsafe impl ::windows::core::ComInterface for PaymentAddress {
977 const IID: ::windows::core::GUID = <IPaymentAddress as ::windows::core::ComInterface>::IID;
978 }
979 impl ::windows::core::RuntimeName for PaymentAddress {
980 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentAddress";
981 }
982 ::windows::imp::interface_hierarchy!(PaymentAddress, ::windows::core::IUnknown, ::windows::core::IInspectable);
983 unsafe impl ::core::marker::Send for PaymentAddress {}
984 unsafe impl ::core::marker::Sync for PaymentAddress {}
985 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
986 #[repr(transparent)]
987 pub struct PaymentCanMakePaymentResult(::windows::core::IUnknown);
988 impl PaymentCanMakePaymentResult {
989 pub fn Status(&self) -> ::windows::core::Result<PaymentCanMakePaymentResultStatus> {
990 let this = self;
991 unsafe {
992 let mut result__ = ::windows::core::zeroed::<PaymentCanMakePaymentResultStatus>();
993 (::windows::core::Interface::vtable(this).Status)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
994 }
995 }
996 pub fn Create(value: PaymentCanMakePaymentResultStatus) -> ::windows::core::Result<PaymentCanMakePaymentResult> {
997 Self::IPaymentCanMakePaymentResultFactory(|this| unsafe {
998 let mut result__ = ::windows::core::zeroed::<PaymentCanMakePaymentResult>();
999 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), value, &mut result__).from_abi(result__)
1000 })
1001 }
1002 #[doc(hidden)]
1003 pub fn IPaymentCanMakePaymentResultFactory<R, F: FnOnce(&IPaymentCanMakePaymentResultFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1004 static SHARED: ::windows::imp::FactoryCache<PaymentCanMakePaymentResult, IPaymentCanMakePaymentResultFactory> = ::windows::imp::FactoryCache::new();
1005 SHARED.call(callback)
1006 }
1007 }
1008 impl ::core::cmp::PartialEq for PaymentCanMakePaymentResult {
1009 fn eq(&self, other: &Self) -> bool {
1010 self.0 == other.0
1011 }
1012 }
1013 impl ::core::cmp::Eq for PaymentCanMakePaymentResult {}
1014 impl ::core::fmt::Debug for PaymentCanMakePaymentResult {
1015 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1016 f.debug_tuple("PaymentCanMakePaymentResult").field(&self.0).finish()
1017 }
1018 }
1019 impl ::windows::core::RuntimeType for PaymentCanMakePaymentResult {
1020 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentCanMakePaymentResult;{7696fe55-d5d3-4d3d-b345-45591759c510})");
1021 }
1022 impl ::core::clone::Clone for PaymentCanMakePaymentResult {
1023 fn clone(&self) -> Self {
1024 Self(self.0.clone())
1025 }
1026 }
1027 unsafe impl ::windows::core::Interface for PaymentCanMakePaymentResult {
1028 type Vtable = IPaymentCanMakePaymentResult_Vtbl;
1029 }
1030 unsafe impl ::windows::core::ComInterface for PaymentCanMakePaymentResult {
1031 const IID: ::windows::core::GUID = <IPaymentCanMakePaymentResult as ::windows::core::ComInterface>::IID;
1032 }
1033 impl ::windows::core::RuntimeName for PaymentCanMakePaymentResult {
1034 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentCanMakePaymentResult";
1035 }
1036 ::windows::imp::interface_hierarchy!(PaymentCanMakePaymentResult, ::windows::core::IUnknown, ::windows::core::IInspectable);
1037 unsafe impl ::core::marker::Send for PaymentCanMakePaymentResult {}
1038 unsafe impl ::core::marker::Sync for PaymentCanMakePaymentResult {}
1039 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
1040 #[repr(transparent)]
1041 pub struct PaymentCurrencyAmount(::windows::core::IUnknown);
1042 impl PaymentCurrencyAmount {
1043 pub fn Currency(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
1044 let this = self;
1045 unsafe {
1046 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
1047 (::windows::core::Interface::vtable(this).Currency)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1048 }
1049 }
1050 pub fn SetCurrency(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
1051 let this = self;
1052 unsafe { (::windows::core::Interface::vtable(this).SetCurrency)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
1053 }
1054 pub fn CurrencySystem(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
1055 let this = self;
1056 unsafe {
1057 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
1058 (::windows::core::Interface::vtable(this).CurrencySystem)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1059 }
1060 }
1061 pub fn SetCurrencySystem(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
1062 let this = self;
1063 unsafe { (::windows::core::Interface::vtable(this).SetCurrencySystem)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
1064 }
1065 pub fn Value(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
1066 let this = self;
1067 unsafe {
1068 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
1069 (::windows::core::Interface::vtable(this).Value)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1070 }
1071 }
1072 pub fn SetValue(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
1073 let this = self;
1074 unsafe { (::windows::core::Interface::vtable(this).SetValue)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
1075 }
1076 pub fn Create(value: &::windows::core::HSTRING, currency: &::windows::core::HSTRING) -> ::windows::core::Result<PaymentCurrencyAmount> {
1077 Self::IPaymentCurrencyAmountFactory(|this| unsafe {
1078 let mut result__ = ::windows::core::zeroed::<PaymentCurrencyAmount>();
1079 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), ::core::mem::transmute_copy(currency), &mut result__).from_abi(result__)
1080 })
1081 }
1082 pub fn CreateWithCurrencySystem(value: &::windows::core::HSTRING, currency: &::windows::core::HSTRING, currencysystem: &::windows::core::HSTRING) -> ::windows::core::Result<PaymentCurrencyAmount> {
1083 Self::IPaymentCurrencyAmountFactory(|this| unsafe {
1084 let mut result__ = ::windows::core::zeroed::<PaymentCurrencyAmount>();
1085 (::windows::core::Interface::vtable(this).CreateWithCurrencySystem)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), ::core::mem::transmute_copy(currency), ::core::mem::transmute_copy(currencysystem), &mut result__).from_abi(result__)
1086 })
1087 }
1088 #[doc(hidden)]
1089 pub fn IPaymentCurrencyAmountFactory<R, F: FnOnce(&IPaymentCurrencyAmountFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1090 static SHARED: ::windows::imp::FactoryCache<PaymentCurrencyAmount, IPaymentCurrencyAmountFactory> = ::windows::imp::FactoryCache::new();
1091 SHARED.call(callback)
1092 }
1093 }
1094 impl ::core::cmp::PartialEq for PaymentCurrencyAmount {
1095 fn eq(&self, other: &Self) -> bool {
1096 self.0 == other.0
1097 }
1098 }
1099 impl ::core::cmp::Eq for PaymentCurrencyAmount {}
1100 impl ::core::fmt::Debug for PaymentCurrencyAmount {
1101 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1102 f.debug_tuple("PaymentCurrencyAmount").field(&self.0).finish()
1103 }
1104 }
1105 impl ::windows::core::RuntimeType for PaymentCurrencyAmount {
1106 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentCurrencyAmount;{e3a3e9e0-b41f-4987-bdcb-071331f2daa4})");
1107 }
1108 impl ::core::clone::Clone for PaymentCurrencyAmount {
1109 fn clone(&self) -> Self {
1110 Self(self.0.clone())
1111 }
1112 }
1113 unsafe impl ::windows::core::Interface for PaymentCurrencyAmount {
1114 type Vtable = IPaymentCurrencyAmount_Vtbl;
1115 }
1116 unsafe impl ::windows::core::ComInterface for PaymentCurrencyAmount {
1117 const IID: ::windows::core::GUID = <IPaymentCurrencyAmount as ::windows::core::ComInterface>::IID;
1118 }
1119 impl ::windows::core::RuntimeName for PaymentCurrencyAmount {
1120 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentCurrencyAmount";
1121 }
1122 ::windows::imp::interface_hierarchy!(PaymentCurrencyAmount, ::windows::core::IUnknown, ::windows::core::IInspectable);
1123 unsafe impl ::core::marker::Send for PaymentCurrencyAmount {}
1124 unsafe impl ::core::marker::Sync for PaymentCurrencyAmount {}
1125 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
1126 #[repr(transparent)]
1127 pub struct PaymentDetails(::windows::core::IUnknown);
1128 impl PaymentDetails {
1129 pub fn new() -> ::windows::core::Result<Self> {
1130 Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
1131 }
1132 fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1133 static SHARED: ::windows::imp::FactoryCache<PaymentDetails, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new();
1134 SHARED.call(callback)
1135 }
1136 pub fn Total(&self) -> ::windows::core::Result<PaymentItem> {
1137 let this = self;
1138 unsafe {
1139 let mut result__ = ::windows::core::zeroed::<PaymentItem>();
1140 (::windows::core::Interface::vtable(this).Total)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1141 }
1142 }
1143 pub fn SetTotal(&self, value: &PaymentItem) -> ::windows::core::Result<()> {
1144 let this = self;
1145 unsafe { (::windows::core::Interface::vtable(this).SetTotal)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
1146 }
1147 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1148 #[cfg(feature = "Foundation_Collections")]
1149 pub fn DisplayItems(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<PaymentItem>> {
1150 let this = self;
1151 unsafe {
1152 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<PaymentItem>>();
1153 (::windows::core::Interface::vtable(this).DisplayItems)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1154 }
1155 }
1156 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1157 #[cfg(feature = "Foundation_Collections")]
1158 pub fn SetDisplayItems<P0>(&self, value: P0) -> ::windows::core::Result<()>
1159 where
1160 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IVectorView<PaymentItem>>,
1161 {
1162 let this = self;
1163 unsafe { (::windows::core::Interface::vtable(this).SetDisplayItems)(::windows::core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() }
1164 }
1165 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1166 #[cfg(feature = "Foundation_Collections")]
1167 pub fn ShippingOptions(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<PaymentShippingOption>> {
1168 let this = self;
1169 unsafe {
1170 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<PaymentShippingOption>>();
1171 (::windows::core::Interface::vtable(this).ShippingOptions)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1172 }
1173 }
1174 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1175 #[cfg(feature = "Foundation_Collections")]
1176 pub fn SetShippingOptions<P0>(&self, value: P0) -> ::windows::core::Result<()>
1177 where
1178 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IVectorView<PaymentShippingOption>>,
1179 {
1180 let this = self;
1181 unsafe { (::windows::core::Interface::vtable(this).SetShippingOptions)(::windows::core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() }
1182 }
1183 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1184 #[cfg(feature = "Foundation_Collections")]
1185 pub fn Modifiers(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<PaymentDetailsModifier>> {
1186 let this = self;
1187 unsafe {
1188 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<PaymentDetailsModifier>>();
1189 (::windows::core::Interface::vtable(this).Modifiers)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1190 }
1191 }
1192 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1193 #[cfg(feature = "Foundation_Collections")]
1194 pub fn SetModifiers<P0>(&self, value: P0) -> ::windows::core::Result<()>
1195 where
1196 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IVectorView<PaymentDetailsModifier>>,
1197 {
1198 let this = self;
1199 unsafe { (::windows::core::Interface::vtable(this).SetModifiers)(::windows::core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() }
1200 }
1201 pub fn Create(total: &PaymentItem) -> ::windows::core::Result<PaymentDetails> {
1202 Self::IPaymentDetailsFactory(|this| unsafe {
1203 let mut result__ = ::windows::core::zeroed::<PaymentDetails>();
1204 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(total), &mut result__).from_abi(result__)
1205 })
1206 }
1207 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1208 #[cfg(feature = "Foundation_Collections")]
1209 pub fn CreateWithDisplayItems<P0>(total: &PaymentItem, displayitems: P0) -> ::windows::core::Result<PaymentDetails>
1210 where
1211 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<PaymentItem>>,
1212 {
1213 Self::IPaymentDetailsFactory(|this| unsafe {
1214 let mut result__ = ::windows::core::zeroed::<PaymentDetails>();
1215 (::windows::core::Interface::vtable(this).CreateWithDisplayItems)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(total), displayitems.try_into_param()?.abi(), &mut result__).from_abi(result__)
1216 })
1217 }
1218 #[doc(hidden)]
1219 pub fn IPaymentDetailsFactory<R, F: FnOnce(&IPaymentDetailsFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1220 static SHARED: ::windows::imp::FactoryCache<PaymentDetails, IPaymentDetailsFactory> = ::windows::imp::FactoryCache::new();
1221 SHARED.call(callback)
1222 }
1223 }
1224 impl ::core::cmp::PartialEq for PaymentDetails {
1225 fn eq(&self, other: &Self) -> bool {
1226 self.0 == other.0
1227 }
1228 }
1229 impl ::core::cmp::Eq for PaymentDetails {}
1230 impl ::core::fmt::Debug for PaymentDetails {
1231 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1232 f.debug_tuple("PaymentDetails").field(&self.0).finish()
1233 }
1234 }
1235 impl ::windows::core::RuntimeType for PaymentDetails {
1236 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentDetails;{53bb2d7d-e0eb-4053-8eae-ce7c48e02945})");
1237 }
1238 impl ::core::clone::Clone for PaymentDetails {
1239 fn clone(&self) -> Self {
1240 Self(self.0.clone())
1241 }
1242 }
1243 unsafe impl ::windows::core::Interface for PaymentDetails {
1244 type Vtable = IPaymentDetails_Vtbl;
1245 }
1246 unsafe impl ::windows::core::ComInterface for PaymentDetails {
1247 const IID: ::windows::core::GUID = <IPaymentDetails as ::windows::core::ComInterface>::IID;
1248 }
1249 impl ::windows::core::RuntimeName for PaymentDetails {
1250 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentDetails";
1251 }
1252 ::windows::imp::interface_hierarchy!(PaymentDetails, ::windows::core::IUnknown, ::windows::core::IInspectable);
1253 unsafe impl ::core::marker::Send for PaymentDetails {}
1254 unsafe impl ::core::marker::Sync for PaymentDetails {}
1255 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
1256 #[repr(transparent)]
1257 pub struct PaymentDetailsModifier(::windows::core::IUnknown);
1258 impl PaymentDetailsModifier {
1259 pub fn JsonData(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
1260 let this = self;
1261 unsafe {
1262 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
1263 (::windows::core::Interface::vtable(this).JsonData)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1264 }
1265 }
1266 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1267 #[cfg(feature = "Foundation_Collections")]
1268 pub fn SupportedMethodIds(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<::windows::core::HSTRING>> {
1269 let this = self;
1270 unsafe {
1271 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<::windows::core::HSTRING>>();
1272 (::windows::core::Interface::vtable(this).SupportedMethodIds)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1273 }
1274 }
1275 pub fn Total(&self) -> ::windows::core::Result<PaymentItem> {
1276 let this = self;
1277 unsafe {
1278 let mut result__ = ::windows::core::zeroed::<PaymentItem>();
1279 (::windows::core::Interface::vtable(this).Total)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1280 }
1281 }
1282 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1283 #[cfg(feature = "Foundation_Collections")]
1284 pub fn AdditionalDisplayItems(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<PaymentItem>> {
1285 let this = self;
1286 unsafe {
1287 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<PaymentItem>>();
1288 (::windows::core::Interface::vtable(this).AdditionalDisplayItems)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1289 }
1290 }
1291 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1292 #[cfg(feature = "Foundation_Collections")]
1293 pub fn Create<P0>(supportedmethodids: P0, total: &PaymentItem) -> ::windows::core::Result<PaymentDetailsModifier>
1294 where
1295 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>,
1296 {
1297 Self::IPaymentDetailsModifierFactory(|this| unsafe {
1298 let mut result__ = ::windows::core::zeroed::<PaymentDetailsModifier>();
1299 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), supportedmethodids.try_into_param()?.abi(), ::core::mem::transmute_copy(total), &mut result__).from_abi(result__)
1300 })
1301 }
1302 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1303 #[cfg(feature = "Foundation_Collections")]
1304 pub fn CreateWithAdditionalDisplayItems<P0, P1>(supportedmethodids: P0, total: &PaymentItem, additionaldisplayitems: P1) -> ::windows::core::Result<PaymentDetailsModifier>
1305 where
1306 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>,
1307 P1: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<PaymentItem>>,
1308 {
1309 Self::IPaymentDetailsModifierFactory(|this| unsafe {
1310 let mut result__ = ::windows::core::zeroed::<PaymentDetailsModifier>();
1311 (::windows::core::Interface::vtable(this).CreateWithAdditionalDisplayItems)(::windows::core::Interface::as_raw(this), supportedmethodids.try_into_param()?.abi(), ::core::mem::transmute_copy(total), additionaldisplayitems.try_into_param()?.abi(), &mut result__).from_abi(result__)
1312 })
1313 }
1314 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1315 #[cfg(feature = "Foundation_Collections")]
1316 pub fn CreateWithAdditionalDisplayItemsAndJsonData<P0, P1>(supportedmethodids: P0, total: &PaymentItem, additionaldisplayitems: P1, jsondata: &::windows::core::HSTRING) -> ::windows::core::Result<PaymentDetailsModifier>
1317 where
1318 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>,
1319 P1: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<PaymentItem>>,
1320 {
1321 Self::IPaymentDetailsModifierFactory(|this| unsafe {
1322 let mut result__ = ::windows::core::zeroed::<PaymentDetailsModifier>();
1323 (::windows::core::Interface::vtable(this).CreateWithAdditionalDisplayItemsAndJsonData)(::windows::core::Interface::as_raw(this), supportedmethodids.try_into_param()?.abi(), ::core::mem::transmute_copy(total), additionaldisplayitems.try_into_param()?.abi(), ::core::mem::transmute_copy(jsondata), &mut result__).from_abi(result__)
1324 })
1325 }
1326 #[doc(hidden)]
1327 pub fn IPaymentDetailsModifierFactory<R, F: FnOnce(&IPaymentDetailsModifierFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1328 static SHARED: ::windows::imp::FactoryCache<PaymentDetailsModifier, IPaymentDetailsModifierFactory> = ::windows::imp::FactoryCache::new();
1329 SHARED.call(callback)
1330 }
1331 }
1332 impl ::core::cmp::PartialEq for PaymentDetailsModifier {
1333 fn eq(&self, other: &Self) -> bool {
1334 self.0 == other.0
1335 }
1336 }
1337 impl ::core::cmp::Eq for PaymentDetailsModifier {}
1338 impl ::core::fmt::Debug for PaymentDetailsModifier {
1339 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1340 f.debug_tuple("PaymentDetailsModifier").field(&self.0).finish()
1341 }
1342 }
1343 impl ::windows::core::RuntimeType for PaymentDetailsModifier {
1344 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentDetailsModifier;{be1c7d65-4323-41d7-b305-dfcb765f69de})");
1345 }
1346 impl ::core::clone::Clone for PaymentDetailsModifier {
1347 fn clone(&self) -> Self {
1348 Self(self.0.clone())
1349 }
1350 }
1351 unsafe impl ::windows::core::Interface for PaymentDetailsModifier {
1352 type Vtable = IPaymentDetailsModifier_Vtbl;
1353 }
1354 unsafe impl ::windows::core::ComInterface for PaymentDetailsModifier {
1355 const IID: ::windows::core::GUID = <IPaymentDetailsModifier as ::windows::core::ComInterface>::IID;
1356 }
1357 impl ::windows::core::RuntimeName for PaymentDetailsModifier {
1358 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentDetailsModifier";
1359 }
1360 ::windows::imp::interface_hierarchy!(PaymentDetailsModifier, ::windows::core::IUnknown, ::windows::core::IInspectable);
1361 unsafe impl ::core::marker::Send for PaymentDetailsModifier {}
1362 unsafe impl ::core::marker::Sync for PaymentDetailsModifier {}
1363 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
1364 #[repr(transparent)]
1365 pub struct PaymentItem(::windows::core::IUnknown);
1366 impl PaymentItem {
1367 pub fn Label(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
1368 let this = self;
1369 unsafe {
1370 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
1371 (::windows::core::Interface::vtable(this).Label)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1372 }
1373 }
1374 pub fn SetLabel(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
1375 let this = self;
1376 unsafe { (::windows::core::Interface::vtable(this).SetLabel)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
1377 }
1378 pub fn Amount(&self) -> ::windows::core::Result<PaymentCurrencyAmount> {
1379 let this = self;
1380 unsafe {
1381 let mut result__ = ::windows::core::zeroed::<PaymentCurrencyAmount>();
1382 (::windows::core::Interface::vtable(this).Amount)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1383 }
1384 }
1385 pub fn SetAmount(&self, value: &PaymentCurrencyAmount) -> ::windows::core::Result<()> {
1386 let this = self;
1387 unsafe { (::windows::core::Interface::vtable(this).SetAmount)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
1388 }
1389 pub fn Pending(&self) -> ::windows::core::Result<bool> {
1390 let this = self;
1391 unsafe {
1392 let mut result__ = ::windows::core::zeroed::<bool>();
1393 (::windows::core::Interface::vtable(this).Pending)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1394 }
1395 }
1396 pub fn SetPending(&self, value: bool) -> ::windows::core::Result<()> {
1397 let this = self;
1398 unsafe { (::windows::core::Interface::vtable(this).SetPending)(::windows::core::Interface::as_raw(this), value).ok() }
1399 }
1400 pub fn Create(label: &::windows::core::HSTRING, amount: &PaymentCurrencyAmount) -> ::windows::core::Result<PaymentItem> {
1401 Self::IPaymentItemFactory(|this| unsafe {
1402 let mut result__ = ::windows::core::zeroed::<PaymentItem>();
1403 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(label), ::core::mem::transmute_copy(amount), &mut result__).from_abi(result__)
1404 })
1405 }
1406 #[doc(hidden)]
1407 pub fn IPaymentItemFactory<R, F: FnOnce(&IPaymentItemFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1408 static SHARED: ::windows::imp::FactoryCache<PaymentItem, IPaymentItemFactory> = ::windows::imp::FactoryCache::new();
1409 SHARED.call(callback)
1410 }
1411 }
1412 impl ::core::cmp::PartialEq for PaymentItem {
1413 fn eq(&self, other: &Self) -> bool {
1414 self.0 == other.0
1415 }
1416 }
1417 impl ::core::cmp::Eq for PaymentItem {}
1418 impl ::core::fmt::Debug for PaymentItem {
1419 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1420 f.debug_tuple("PaymentItem").field(&self.0).finish()
1421 }
1422 }
1423 impl ::windows::core::RuntimeType for PaymentItem {
1424 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentItem;{685ac88b-79b2-4b76-9e03-a876223dfe72})");
1425 }
1426 impl ::core::clone::Clone for PaymentItem {
1427 fn clone(&self) -> Self {
1428 Self(self.0.clone())
1429 }
1430 }
1431 unsafe impl ::windows::core::Interface for PaymentItem {
1432 type Vtable = IPaymentItem_Vtbl;
1433 }
1434 unsafe impl ::windows::core::ComInterface for PaymentItem {
1435 const IID: ::windows::core::GUID = <IPaymentItem as ::windows::core::ComInterface>::IID;
1436 }
1437 impl ::windows::core::RuntimeName for PaymentItem {
1438 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentItem";
1439 }
1440 ::windows::imp::interface_hierarchy!(PaymentItem, ::windows::core::IUnknown, ::windows::core::IInspectable);
1441 unsafe impl ::core::marker::Send for PaymentItem {}
1442 unsafe impl ::core::marker::Sync for PaymentItem {}
1443 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
1444 #[repr(transparent)]
1445 pub struct PaymentMediator(::windows::core::IUnknown);
1446 impl PaymentMediator {
1447 pub fn new() -> ::windows::core::Result<Self> {
1448 Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
1449 }
1450 fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1451 static SHARED: ::windows::imp::FactoryCache<PaymentMediator, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new();
1452 SHARED.call(callback)
1453 }
1454 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1455 #[cfg(feature = "Foundation_Collections")]
1456 pub fn GetSupportedMethodIdsAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<::windows::core::HSTRING>>> {
1457 let this = self;
1458 unsafe {
1459 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<::windows::core::HSTRING>>>();
1460 (::windows::core::Interface::vtable(this).GetSupportedMethodIdsAsync)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1461 }
1462 }
1463 #[doc = "*Required features: `\"Foundation\"`*"]
1464 #[cfg(feature = "Foundation")]
1465 pub fn SubmitPaymentRequestAsync(&self, paymentrequest: &PaymentRequest) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<PaymentRequestSubmitResult>> {
1466 let this = self;
1467 unsafe {
1468 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<PaymentRequestSubmitResult>>();
1469 (::windows::core::Interface::vtable(this).SubmitPaymentRequestAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(paymentrequest), &mut result__).from_abi(result__)
1470 }
1471 }
1472 #[doc = "*Required features: `\"Foundation\"`*"]
1473 #[cfg(feature = "Foundation")]
1474 pub fn SubmitPaymentRequestWithChangeHandlerAsync(&self, paymentrequest: &PaymentRequest, changehandler: &PaymentRequestChangedHandler) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<PaymentRequestSubmitResult>> {
1475 let this = self;
1476 unsafe {
1477 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<PaymentRequestSubmitResult>>();
1478 (::windows::core::Interface::vtable(this).SubmitPaymentRequestWithChangeHandlerAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(paymentrequest), ::core::mem::transmute_copy(changehandler), &mut result__).from_abi(result__)
1479 }
1480 }
1481 #[doc = "*Required features: `\"Foundation\"`*"]
1482 #[cfg(feature = "Foundation")]
1483 pub fn CanMakePaymentAsync(&self, paymentrequest: &PaymentRequest) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<PaymentCanMakePaymentResult>> {
1484 let this = &::windows::core::ComInterface::cast::<IPaymentMediator2>(self)?;
1485 unsafe {
1486 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<PaymentCanMakePaymentResult>>();
1487 (::windows::core::Interface::vtable(this).CanMakePaymentAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(paymentrequest), &mut result__).from_abi(result__)
1488 }
1489 }
1490 }
1491 impl ::core::cmp::PartialEq for PaymentMediator {
1492 fn eq(&self, other: &Self) -> bool {
1493 self.0 == other.0
1494 }
1495 }
1496 impl ::core::cmp::Eq for PaymentMediator {}
1497 impl ::core::fmt::Debug for PaymentMediator {
1498 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1499 f.debug_tuple("PaymentMediator").field(&self.0).finish()
1500 }
1501 }
1502 impl ::windows::core::RuntimeType for PaymentMediator {
1503 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentMediator;{fb0ee829-ec0c-449a-83da-7ae3073365a2})");
1504 }
1505 impl ::core::clone::Clone for PaymentMediator {
1506 fn clone(&self) -> Self {
1507 Self(self.0.clone())
1508 }
1509 }
1510 unsafe impl ::windows::core::Interface for PaymentMediator {
1511 type Vtable = IPaymentMediator_Vtbl;
1512 }
1513 unsafe impl ::windows::core::ComInterface for PaymentMediator {
1514 const IID: ::windows::core::GUID = <IPaymentMediator as ::windows::core::ComInterface>::IID;
1515 }
1516 impl ::windows::core::RuntimeName for PaymentMediator {
1517 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentMediator";
1518 }
1519 ::windows::imp::interface_hierarchy!(PaymentMediator, ::windows::core::IUnknown, ::windows::core::IInspectable);
1520 unsafe impl ::core::marker::Send for PaymentMediator {}
1521 unsafe impl ::core::marker::Sync for PaymentMediator {}
1522 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
1523 #[repr(transparent)]
1524 pub struct PaymentMerchantInfo(::windows::core::IUnknown);
1525 impl PaymentMerchantInfo {
1526 pub fn new() -> ::windows::core::Result<Self> {
1527 Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
1528 }
1529 fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1530 static SHARED: ::windows::imp::FactoryCache<PaymentMerchantInfo, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new();
1531 SHARED.call(callback)
1532 }
1533 pub fn PackageFullName(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
1534 let this = self;
1535 unsafe {
1536 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
1537 (::windows::core::Interface::vtable(this).PackageFullName)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1538 }
1539 }
1540 #[doc = "*Required features: `\"Foundation\"`*"]
1541 #[cfg(feature = "Foundation")]
1542 pub fn Uri(&self) -> ::windows::core::Result<super::super::Foundation::Uri> {
1543 let this = self;
1544 unsafe {
1545 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Uri>();
1546 (::windows::core::Interface::vtable(this).Uri)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1547 }
1548 }
1549 #[doc = "*Required features: `\"Foundation\"`*"]
1550 #[cfg(feature = "Foundation")]
1551 pub fn Create(uri: &super::super::Foundation::Uri) -> ::windows::core::Result<PaymentMerchantInfo> {
1552 Self::IPaymentMerchantInfoFactory(|this| unsafe {
1553 let mut result__ = ::windows::core::zeroed::<PaymentMerchantInfo>();
1554 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(uri), &mut result__).from_abi(result__)
1555 })
1556 }
1557 #[doc(hidden)]
1558 pub fn IPaymentMerchantInfoFactory<R, F: FnOnce(&IPaymentMerchantInfoFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1559 static SHARED: ::windows::imp::FactoryCache<PaymentMerchantInfo, IPaymentMerchantInfoFactory> = ::windows::imp::FactoryCache::new();
1560 SHARED.call(callback)
1561 }
1562 }
1563 impl ::core::cmp::PartialEq for PaymentMerchantInfo {
1564 fn eq(&self, other: &Self) -> bool {
1565 self.0 == other.0
1566 }
1567 }
1568 impl ::core::cmp::Eq for PaymentMerchantInfo {}
1569 impl ::core::fmt::Debug for PaymentMerchantInfo {
1570 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1571 f.debug_tuple("PaymentMerchantInfo").field(&self.0).finish()
1572 }
1573 }
1574 impl ::windows::core::RuntimeType for PaymentMerchantInfo {
1575 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentMerchantInfo;{63445050-0e94-4ed6-aacb-e6012bd327a7})");
1576 }
1577 impl ::core::clone::Clone for PaymentMerchantInfo {
1578 fn clone(&self) -> Self {
1579 Self(self.0.clone())
1580 }
1581 }
1582 unsafe impl ::windows::core::Interface for PaymentMerchantInfo {
1583 type Vtable = IPaymentMerchantInfo_Vtbl;
1584 }
1585 unsafe impl ::windows::core::ComInterface for PaymentMerchantInfo {
1586 const IID: ::windows::core::GUID = <IPaymentMerchantInfo as ::windows::core::ComInterface>::IID;
1587 }
1588 impl ::windows::core::RuntimeName for PaymentMerchantInfo {
1589 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentMerchantInfo";
1590 }
1591 ::windows::imp::interface_hierarchy!(PaymentMerchantInfo, ::windows::core::IUnknown, ::windows::core::IInspectable);
1592 unsafe impl ::core::marker::Send for PaymentMerchantInfo {}
1593 unsafe impl ::core::marker::Sync for PaymentMerchantInfo {}
1594 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
1595 #[repr(transparent)]
1596 pub struct PaymentMethodData(::windows::core::IUnknown);
1597 impl PaymentMethodData {
1598 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1599 #[cfg(feature = "Foundation_Collections")]
1600 pub fn SupportedMethodIds(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<::windows::core::HSTRING>> {
1601 let this = self;
1602 unsafe {
1603 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<::windows::core::HSTRING>>();
1604 (::windows::core::Interface::vtable(this).SupportedMethodIds)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1605 }
1606 }
1607 pub fn JsonData(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
1608 let this = self;
1609 unsafe {
1610 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
1611 (::windows::core::Interface::vtable(this).JsonData)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1612 }
1613 }
1614 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1615 #[cfg(feature = "Foundation_Collections")]
1616 pub fn Create<P0>(supportedmethodids: P0) -> ::windows::core::Result<PaymentMethodData>
1617 where
1618 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>,
1619 {
1620 Self::IPaymentMethodDataFactory(|this| unsafe {
1621 let mut result__ = ::windows::core::zeroed::<PaymentMethodData>();
1622 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), supportedmethodids.try_into_param()?.abi(), &mut result__).from_abi(result__)
1623 })
1624 }
1625 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1626 #[cfg(feature = "Foundation_Collections")]
1627 pub fn CreateWithJsonData<P0>(supportedmethodids: P0, jsondata: &::windows::core::HSTRING) -> ::windows::core::Result<PaymentMethodData>
1628 where
1629 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>,
1630 {
1631 Self::IPaymentMethodDataFactory(|this| unsafe {
1632 let mut result__ = ::windows::core::zeroed::<PaymentMethodData>();
1633 (::windows::core::Interface::vtable(this).CreateWithJsonData)(::windows::core::Interface::as_raw(this), supportedmethodids.try_into_param()?.abi(), ::core::mem::transmute_copy(jsondata), &mut result__).from_abi(result__)
1634 })
1635 }
1636 #[doc(hidden)]
1637 pub fn IPaymentMethodDataFactory<R, F: FnOnce(&IPaymentMethodDataFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1638 static SHARED: ::windows::imp::FactoryCache<PaymentMethodData, IPaymentMethodDataFactory> = ::windows::imp::FactoryCache::new();
1639 SHARED.call(callback)
1640 }
1641 }
1642 impl ::core::cmp::PartialEq for PaymentMethodData {
1643 fn eq(&self, other: &Self) -> bool {
1644 self.0 == other.0
1645 }
1646 }
1647 impl ::core::cmp::Eq for PaymentMethodData {}
1648 impl ::core::fmt::Debug for PaymentMethodData {
1649 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1650 f.debug_tuple("PaymentMethodData").field(&self.0).finish()
1651 }
1652 }
1653 impl ::windows::core::RuntimeType for PaymentMethodData {
1654 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentMethodData;{d1d3caf4-de98-4129-b1b7-c3ad86237bf4})");
1655 }
1656 impl ::core::clone::Clone for PaymentMethodData {
1657 fn clone(&self) -> Self {
1658 Self(self.0.clone())
1659 }
1660 }
1661 unsafe impl ::windows::core::Interface for PaymentMethodData {
1662 type Vtable = IPaymentMethodData_Vtbl;
1663 }
1664 unsafe impl ::windows::core::ComInterface for PaymentMethodData {
1665 const IID: ::windows::core::GUID = <IPaymentMethodData as ::windows::core::ComInterface>::IID;
1666 }
1667 impl ::windows::core::RuntimeName for PaymentMethodData {
1668 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentMethodData";
1669 }
1670 ::windows::imp::interface_hierarchy!(PaymentMethodData, ::windows::core::IUnknown, ::windows::core::IInspectable);
1671 unsafe impl ::core::marker::Send for PaymentMethodData {}
1672 unsafe impl ::core::marker::Sync for PaymentMethodData {}
1673 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
1674 #[repr(transparent)]
1675 pub struct PaymentOptions(::windows::core::IUnknown);
1676 impl PaymentOptions {
1677 pub fn new() -> ::windows::core::Result<Self> {
1678 Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
1679 }
1680 fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1681 static SHARED: ::windows::imp::FactoryCache<PaymentOptions, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new();
1682 SHARED.call(callback)
1683 }
1684 pub fn RequestPayerEmail(&self) -> ::windows::core::Result<PaymentOptionPresence> {
1685 let this = self;
1686 unsafe {
1687 let mut result__ = ::windows::core::zeroed::<PaymentOptionPresence>();
1688 (::windows::core::Interface::vtable(this).RequestPayerEmail)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1689 }
1690 }
1691 pub fn SetRequestPayerEmail(&self, value: PaymentOptionPresence) -> ::windows::core::Result<()> {
1692 let this = self;
1693 unsafe { (::windows::core::Interface::vtable(this).SetRequestPayerEmail)(::windows::core::Interface::as_raw(this), value).ok() }
1694 }
1695 pub fn RequestPayerName(&self) -> ::windows::core::Result<PaymentOptionPresence> {
1696 let this = self;
1697 unsafe {
1698 let mut result__ = ::windows::core::zeroed::<PaymentOptionPresence>();
1699 (::windows::core::Interface::vtable(this).RequestPayerName)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1700 }
1701 }
1702 pub fn SetRequestPayerName(&self, value: PaymentOptionPresence) -> ::windows::core::Result<()> {
1703 let this = self;
1704 unsafe { (::windows::core::Interface::vtable(this).SetRequestPayerName)(::windows::core::Interface::as_raw(this), value).ok() }
1705 }
1706 pub fn RequestPayerPhoneNumber(&self) -> ::windows::core::Result<PaymentOptionPresence> {
1707 let this = self;
1708 unsafe {
1709 let mut result__ = ::windows::core::zeroed::<PaymentOptionPresence>();
1710 (::windows::core::Interface::vtable(this).RequestPayerPhoneNumber)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1711 }
1712 }
1713 pub fn SetRequestPayerPhoneNumber(&self, value: PaymentOptionPresence) -> ::windows::core::Result<()> {
1714 let this = self;
1715 unsafe { (::windows::core::Interface::vtable(this).SetRequestPayerPhoneNumber)(::windows::core::Interface::as_raw(this), value).ok() }
1716 }
1717 pub fn RequestShipping(&self) -> ::windows::core::Result<bool> {
1718 let this = self;
1719 unsafe {
1720 let mut result__ = ::windows::core::zeroed::<bool>();
1721 (::windows::core::Interface::vtable(this).RequestShipping)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1722 }
1723 }
1724 pub fn SetRequestShipping(&self, value: bool) -> ::windows::core::Result<()> {
1725 let this = self;
1726 unsafe { (::windows::core::Interface::vtable(this).SetRequestShipping)(::windows::core::Interface::as_raw(this), value).ok() }
1727 }
1728 pub fn ShippingType(&self) -> ::windows::core::Result<PaymentShippingType> {
1729 let this = self;
1730 unsafe {
1731 let mut result__ = ::windows::core::zeroed::<PaymentShippingType>();
1732 (::windows::core::Interface::vtable(this).ShippingType)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1733 }
1734 }
1735 pub fn SetShippingType(&self, value: PaymentShippingType) -> ::windows::core::Result<()> {
1736 let this = self;
1737 unsafe { (::windows::core::Interface::vtable(this).SetShippingType)(::windows::core::Interface::as_raw(this), value).ok() }
1738 }
1739 }
1740 impl ::core::cmp::PartialEq for PaymentOptions {
1741 fn eq(&self, other: &Self) -> bool {
1742 self.0 == other.0
1743 }
1744 }
1745 impl ::core::cmp::Eq for PaymentOptions {}
1746 impl ::core::fmt::Debug for PaymentOptions {
1747 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1748 f.debug_tuple("PaymentOptions").field(&self.0).finish()
1749 }
1750 }
1751 impl ::windows::core::RuntimeType for PaymentOptions {
1752 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentOptions;{aaa30854-1f2b-4365-8251-01b58915a5bc})");
1753 }
1754 impl ::core::clone::Clone for PaymentOptions {
1755 fn clone(&self) -> Self {
1756 Self(self.0.clone())
1757 }
1758 }
1759 unsafe impl ::windows::core::Interface for PaymentOptions {
1760 type Vtable = IPaymentOptions_Vtbl;
1761 }
1762 unsafe impl ::windows::core::ComInterface for PaymentOptions {
1763 const IID: ::windows::core::GUID = <IPaymentOptions as ::windows::core::ComInterface>::IID;
1764 }
1765 impl ::windows::core::RuntimeName for PaymentOptions {
1766 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentOptions";
1767 }
1768 ::windows::imp::interface_hierarchy!(PaymentOptions, ::windows::core::IUnknown, ::windows::core::IInspectable);
1769 unsafe impl ::core::marker::Send for PaymentOptions {}
1770 unsafe impl ::core::marker::Sync for PaymentOptions {}
1771 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
1772 #[repr(transparent)]
1773 pub struct PaymentRequest(::windows::core::IUnknown);
1774 impl PaymentRequest {
1775 pub fn MerchantInfo(&self) -> ::windows::core::Result<PaymentMerchantInfo> {
1776 let this = self;
1777 unsafe {
1778 let mut result__ = ::windows::core::zeroed::<PaymentMerchantInfo>();
1779 (::windows::core::Interface::vtable(this).MerchantInfo)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1780 }
1781 }
1782 pub fn Details(&self) -> ::windows::core::Result<PaymentDetails> {
1783 let this = self;
1784 unsafe {
1785 let mut result__ = ::windows::core::zeroed::<PaymentDetails>();
1786 (::windows::core::Interface::vtable(this).Details)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1787 }
1788 }
1789 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1790 #[cfg(feature = "Foundation_Collections")]
1791 pub fn MethodData(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<PaymentMethodData>> {
1792 let this = self;
1793 unsafe {
1794 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<PaymentMethodData>>();
1795 (::windows::core::Interface::vtable(this).MethodData)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1796 }
1797 }
1798 pub fn Options(&self) -> ::windows::core::Result<PaymentOptions> {
1799 let this = self;
1800 unsafe {
1801 let mut result__ = ::windows::core::zeroed::<PaymentOptions>();
1802 (::windows::core::Interface::vtable(this).Options)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1803 }
1804 }
1805 pub fn Id(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
1806 let this = &::windows::core::ComInterface::cast::<IPaymentRequest2>(self)?;
1807 unsafe {
1808 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
1809 (::windows::core::Interface::vtable(this).Id)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1810 }
1811 }
1812 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1813 #[cfg(feature = "Foundation_Collections")]
1814 pub fn Create<P0>(details: &PaymentDetails, methoddata: P0) -> ::windows::core::Result<PaymentRequest>
1815 where
1816 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<PaymentMethodData>>,
1817 {
1818 Self::IPaymentRequestFactory(|this| unsafe {
1819 let mut result__ = ::windows::core::zeroed::<PaymentRequest>();
1820 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(details), methoddata.try_into_param()?.abi(), &mut result__).from_abi(result__)
1821 })
1822 }
1823 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1824 #[cfg(feature = "Foundation_Collections")]
1825 pub fn CreateWithMerchantInfo<P0>(details: &PaymentDetails, methoddata: P0, merchantinfo: &PaymentMerchantInfo) -> ::windows::core::Result<PaymentRequest>
1826 where
1827 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<PaymentMethodData>>,
1828 {
1829 Self::IPaymentRequestFactory(|this| unsafe {
1830 let mut result__ = ::windows::core::zeroed::<PaymentRequest>();
1831 (::windows::core::Interface::vtable(this).CreateWithMerchantInfo)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(details), methoddata.try_into_param()?.abi(), ::core::mem::transmute_copy(merchantinfo), &mut result__).from_abi(result__)
1832 })
1833 }
1834 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1835 #[cfg(feature = "Foundation_Collections")]
1836 pub fn CreateWithMerchantInfoAndOptions<P0>(details: &PaymentDetails, methoddata: P0, merchantinfo: &PaymentMerchantInfo, options: &PaymentOptions) -> ::windows::core::Result<PaymentRequest>
1837 where
1838 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<PaymentMethodData>>,
1839 {
1840 Self::IPaymentRequestFactory(|this| unsafe {
1841 let mut result__ = ::windows::core::zeroed::<PaymentRequest>();
1842 (::windows::core::Interface::vtable(this).CreateWithMerchantInfoAndOptions)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(details), methoddata.try_into_param()?.abi(), ::core::mem::transmute_copy(merchantinfo), ::core::mem::transmute_copy(options), &mut result__).from_abi(result__)
1843 })
1844 }
1845 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1846 #[cfg(feature = "Foundation_Collections")]
1847 pub fn CreateWithMerchantInfoOptionsAndId<P0>(details: &PaymentDetails, methoddata: P0, merchantinfo: &PaymentMerchantInfo, options: &PaymentOptions, id: &::windows::core::HSTRING) -> ::windows::core::Result<PaymentRequest>
1848 where
1849 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<PaymentMethodData>>,
1850 {
1851 Self::IPaymentRequestFactory2(|this| unsafe {
1852 let mut result__ = ::windows::core::zeroed::<PaymentRequest>();
1853 (::windows::core::Interface::vtable(this).CreateWithMerchantInfoOptionsAndId)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(details), methoddata.try_into_param()?.abi(), ::core::mem::transmute_copy(merchantinfo), ::core::mem::transmute_copy(options), ::core::mem::transmute_copy(id), &mut result__).from_abi(result__)
1854 })
1855 }
1856 #[doc(hidden)]
1857 pub fn IPaymentRequestFactory<R, F: FnOnce(&IPaymentRequestFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1858 static SHARED: ::windows::imp::FactoryCache<PaymentRequest, IPaymentRequestFactory> = ::windows::imp::FactoryCache::new();
1859 SHARED.call(callback)
1860 }
1861 #[doc(hidden)]
1862 pub fn IPaymentRequestFactory2<R, F: FnOnce(&IPaymentRequestFactory2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1863 static SHARED: ::windows::imp::FactoryCache<PaymentRequest, IPaymentRequestFactory2> = ::windows::imp::FactoryCache::new();
1864 SHARED.call(callback)
1865 }
1866 }
1867 impl ::core::cmp::PartialEq for PaymentRequest {
1868 fn eq(&self, other: &Self) -> bool {
1869 self.0 == other.0
1870 }
1871 }
1872 impl ::core::cmp::Eq for PaymentRequest {}
1873 impl ::core::fmt::Debug for PaymentRequest {
1874 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1875 f.debug_tuple("PaymentRequest").field(&self.0).finish()
1876 }
1877 }
1878 impl ::windows::core::RuntimeType for PaymentRequest {
1879 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentRequest;{b74942e1-ed7b-47eb-bc08-78cc5d6896b6})");
1880 }
1881 impl ::core::clone::Clone for PaymentRequest {
1882 fn clone(&self) -> Self {
1883 Self(self.0.clone())
1884 }
1885 }
1886 unsafe impl ::windows::core::Interface for PaymentRequest {
1887 type Vtable = IPaymentRequest_Vtbl;
1888 }
1889 unsafe impl ::windows::core::ComInterface for PaymentRequest {
1890 const IID: ::windows::core::GUID = <IPaymentRequest as ::windows::core::ComInterface>::IID;
1891 }
1892 impl ::windows::core::RuntimeName for PaymentRequest {
1893 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentRequest";
1894 }
1895 ::windows::imp::interface_hierarchy!(PaymentRequest, ::windows::core::IUnknown, ::windows::core::IInspectable);
1896 unsafe impl ::core::marker::Send for PaymentRequest {}
1897 unsafe impl ::core::marker::Sync for PaymentRequest {}
1898 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
1899 #[repr(transparent)]
1900 pub struct PaymentRequestChangedArgs(::windows::core::IUnknown);
1901 impl PaymentRequestChangedArgs {
1902 pub fn ChangeKind(&self) -> ::windows::core::Result<PaymentRequestChangeKind> {
1903 let this = self;
1904 unsafe {
1905 let mut result__ = ::windows::core::zeroed::<PaymentRequestChangeKind>();
1906 (::windows::core::Interface::vtable(this).ChangeKind)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1907 }
1908 }
1909 pub fn ShippingAddress(&self) -> ::windows::core::Result<PaymentAddress> {
1910 let this = self;
1911 unsafe {
1912 let mut result__ = ::windows::core::zeroed::<PaymentAddress>();
1913 (::windows::core::Interface::vtable(this).ShippingAddress)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1914 }
1915 }
1916 pub fn SelectedShippingOption(&self) -> ::windows::core::Result<PaymentShippingOption> {
1917 let this = self;
1918 unsafe {
1919 let mut result__ = ::windows::core::zeroed::<PaymentShippingOption>();
1920 (::windows::core::Interface::vtable(this).SelectedShippingOption)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1921 }
1922 }
1923 pub fn Acknowledge(&self, changeresult: &PaymentRequestChangedResult) -> ::windows::core::Result<()> {
1924 let this = self;
1925 unsafe { (::windows::core::Interface::vtable(this).Acknowledge)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(changeresult)).ok() }
1926 }
1927 }
1928 impl ::core::cmp::PartialEq for PaymentRequestChangedArgs {
1929 fn eq(&self, other: &Self) -> bool {
1930 self.0 == other.0
1931 }
1932 }
1933 impl ::core::cmp::Eq for PaymentRequestChangedArgs {}
1934 impl ::core::fmt::Debug for PaymentRequestChangedArgs {
1935 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1936 f.debug_tuple("PaymentRequestChangedArgs").field(&self.0).finish()
1937 }
1938 }
1939 impl ::windows::core::RuntimeType for PaymentRequestChangedArgs {
1940 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentRequestChangedArgs;{c6145e44-cd8b-4be4-b555-27c99194c0c5})");
1941 }
1942 impl ::core::clone::Clone for PaymentRequestChangedArgs {
1943 fn clone(&self) -> Self {
1944 Self(self.0.clone())
1945 }
1946 }
1947 unsafe impl ::windows::core::Interface for PaymentRequestChangedArgs {
1948 type Vtable = IPaymentRequestChangedArgs_Vtbl;
1949 }
1950 unsafe impl ::windows::core::ComInterface for PaymentRequestChangedArgs {
1951 const IID: ::windows::core::GUID = <IPaymentRequestChangedArgs as ::windows::core::ComInterface>::IID;
1952 }
1953 impl ::windows::core::RuntimeName for PaymentRequestChangedArgs {
1954 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentRequestChangedArgs";
1955 }
1956 ::windows::imp::interface_hierarchy!(PaymentRequestChangedArgs, ::windows::core::IUnknown, ::windows::core::IInspectable);
1957 unsafe impl ::core::marker::Send for PaymentRequestChangedArgs {}
1958 unsafe impl ::core::marker::Sync for PaymentRequestChangedArgs {}
1959 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
1960 #[repr(transparent)]
1961 pub struct PaymentRequestChangedResult(::windows::core::IUnknown);
1962 impl PaymentRequestChangedResult {
1963 pub fn ChangeAcceptedByMerchant(&self) -> ::windows::core::Result<bool> {
1964 let this = self;
1965 unsafe {
1966 let mut result__ = ::windows::core::zeroed::<bool>();
1967 (::windows::core::Interface::vtable(this).ChangeAcceptedByMerchant)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1968 }
1969 }
1970 pub fn SetChangeAcceptedByMerchant(&self, value: bool) -> ::windows::core::Result<()> {
1971 let this = self;
1972 unsafe { (::windows::core::Interface::vtable(this).SetChangeAcceptedByMerchant)(::windows::core::Interface::as_raw(this), value).ok() }
1973 }
1974 pub fn Message(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
1975 let this = self;
1976 unsafe {
1977 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
1978 (::windows::core::Interface::vtable(this).Message)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1979 }
1980 }
1981 pub fn SetMessage(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
1982 let this = self;
1983 unsafe { (::windows::core::Interface::vtable(this).SetMessage)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
1984 }
1985 pub fn UpdatedPaymentDetails(&self) -> ::windows::core::Result<PaymentDetails> {
1986 let this = self;
1987 unsafe {
1988 let mut result__ = ::windows::core::zeroed::<PaymentDetails>();
1989 (::windows::core::Interface::vtable(this).UpdatedPaymentDetails)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1990 }
1991 }
1992 pub fn SetUpdatedPaymentDetails(&self, value: &PaymentDetails) -> ::windows::core::Result<()> {
1993 let this = self;
1994 unsafe { (::windows::core::Interface::vtable(this).SetUpdatedPaymentDetails)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
1995 }
1996 pub fn Create(changeacceptedbymerchant: bool) -> ::windows::core::Result<PaymentRequestChangedResult> {
1997 Self::IPaymentRequestChangedResultFactory(|this| unsafe {
1998 let mut result__ = ::windows::core::zeroed::<PaymentRequestChangedResult>();
1999 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), changeacceptedbymerchant, &mut result__).from_abi(result__)
2000 })
2001 }
2002 pub fn CreateWithPaymentDetails(changeacceptedbymerchant: bool, updatedpaymentdetails: &PaymentDetails) -> ::windows::core::Result<PaymentRequestChangedResult> {
2003 Self::IPaymentRequestChangedResultFactory(|this| unsafe {
2004 let mut result__ = ::windows::core::zeroed::<PaymentRequestChangedResult>();
2005 (::windows::core::Interface::vtable(this).CreateWithPaymentDetails)(::windows::core::Interface::as_raw(this), changeacceptedbymerchant, ::core::mem::transmute_copy(updatedpaymentdetails), &mut result__).from_abi(result__)
2006 })
2007 }
2008 #[doc(hidden)]
2009 pub fn IPaymentRequestChangedResultFactory<R, F: FnOnce(&IPaymentRequestChangedResultFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
2010 static SHARED: ::windows::imp::FactoryCache<PaymentRequestChangedResult, IPaymentRequestChangedResultFactory> = ::windows::imp::FactoryCache::new();
2011 SHARED.call(callback)
2012 }
2013 }
2014 impl ::core::cmp::PartialEq for PaymentRequestChangedResult {
2015 fn eq(&self, other: &Self) -> bool {
2016 self.0 == other.0
2017 }
2018 }
2019 impl ::core::cmp::Eq for PaymentRequestChangedResult {}
2020 impl ::core::fmt::Debug for PaymentRequestChangedResult {
2021 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2022 f.debug_tuple("PaymentRequestChangedResult").field(&self.0).finish()
2023 }
2024 }
2025 impl ::windows::core::RuntimeType for PaymentRequestChangedResult {
2026 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentRequestChangedResult;{df699e5c-16c4-47ad-9401-8440ec0757db})");
2027 }
2028 impl ::core::clone::Clone for PaymentRequestChangedResult {
2029 fn clone(&self) -> Self {
2030 Self(self.0.clone())
2031 }
2032 }
2033 unsafe impl ::windows::core::Interface for PaymentRequestChangedResult {
2034 type Vtable = IPaymentRequestChangedResult_Vtbl;
2035 }
2036 unsafe impl ::windows::core::ComInterface for PaymentRequestChangedResult {
2037 const IID: ::windows::core::GUID = <IPaymentRequestChangedResult as ::windows::core::ComInterface>::IID;
2038 }
2039 impl ::windows::core::RuntimeName for PaymentRequestChangedResult {
2040 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentRequestChangedResult";
2041 }
2042 ::windows::imp::interface_hierarchy!(PaymentRequestChangedResult, ::windows::core::IUnknown, ::windows::core::IInspectable);
2043 unsafe impl ::core::marker::Send for PaymentRequestChangedResult {}
2044 unsafe impl ::core::marker::Sync for PaymentRequestChangedResult {}
2045 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
2046 #[repr(transparent)]
2047 pub struct PaymentRequestSubmitResult(::windows::core::IUnknown);
2048 impl PaymentRequestSubmitResult {
2049 pub fn Status(&self) -> ::windows::core::Result<PaymentRequestStatus> {
2050 let this = self;
2051 unsafe {
2052 let mut result__ = ::windows::core::zeroed::<PaymentRequestStatus>();
2053 (::windows::core::Interface::vtable(this).Status)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2054 }
2055 }
2056 pub fn Response(&self) -> ::windows::core::Result<PaymentResponse> {
2057 let this = self;
2058 unsafe {
2059 let mut result__ = ::windows::core::zeroed::<PaymentResponse>();
2060 (::windows::core::Interface::vtable(this).Response)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2061 }
2062 }
2063 }
2064 impl ::core::cmp::PartialEq for PaymentRequestSubmitResult {
2065 fn eq(&self, other: &Self) -> bool {
2066 self.0 == other.0
2067 }
2068 }
2069 impl ::core::cmp::Eq for PaymentRequestSubmitResult {}
2070 impl ::core::fmt::Debug for PaymentRequestSubmitResult {
2071 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2072 f.debug_tuple("PaymentRequestSubmitResult").field(&self.0).finish()
2073 }
2074 }
2075 impl ::windows::core::RuntimeType for PaymentRequestSubmitResult {
2076 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentRequestSubmitResult;{7b9c3912-30f2-4e90-b249-8ce7d78ffe56})");
2077 }
2078 impl ::core::clone::Clone for PaymentRequestSubmitResult {
2079 fn clone(&self) -> Self {
2080 Self(self.0.clone())
2081 }
2082 }
2083 unsafe impl ::windows::core::Interface for PaymentRequestSubmitResult {
2084 type Vtable = IPaymentRequestSubmitResult_Vtbl;
2085 }
2086 unsafe impl ::windows::core::ComInterface for PaymentRequestSubmitResult {
2087 const IID: ::windows::core::GUID = <IPaymentRequestSubmitResult as ::windows::core::ComInterface>::IID;
2088 }
2089 impl ::windows::core::RuntimeName for PaymentRequestSubmitResult {
2090 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentRequestSubmitResult";
2091 }
2092 ::windows::imp::interface_hierarchy!(PaymentRequestSubmitResult, ::windows::core::IUnknown, ::windows::core::IInspectable);
2093 unsafe impl ::core::marker::Send for PaymentRequestSubmitResult {}
2094 unsafe impl ::core::marker::Sync for PaymentRequestSubmitResult {}
2095 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
2096 #[repr(transparent)]
2097 pub struct PaymentResponse(::windows::core::IUnknown);
2098 impl PaymentResponse {
2099 pub fn PaymentToken(&self) -> ::windows::core::Result<PaymentToken> {
2100 let this = self;
2101 unsafe {
2102 let mut result__ = ::windows::core::zeroed::<PaymentToken>();
2103 (::windows::core::Interface::vtable(this).PaymentToken)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2104 }
2105 }
2106 pub fn ShippingOption(&self) -> ::windows::core::Result<PaymentShippingOption> {
2107 let this = self;
2108 unsafe {
2109 let mut result__ = ::windows::core::zeroed::<PaymentShippingOption>();
2110 (::windows::core::Interface::vtable(this).ShippingOption)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2111 }
2112 }
2113 pub fn ShippingAddress(&self) -> ::windows::core::Result<PaymentAddress> {
2114 let this = self;
2115 unsafe {
2116 let mut result__ = ::windows::core::zeroed::<PaymentAddress>();
2117 (::windows::core::Interface::vtable(this).ShippingAddress)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2118 }
2119 }
2120 pub fn PayerEmail(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
2121 let this = self;
2122 unsafe {
2123 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
2124 (::windows::core::Interface::vtable(this).PayerEmail)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2125 }
2126 }
2127 pub fn PayerName(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
2128 let this = self;
2129 unsafe {
2130 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
2131 (::windows::core::Interface::vtable(this).PayerName)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2132 }
2133 }
2134 pub fn PayerPhoneNumber(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
2135 let this = self;
2136 unsafe {
2137 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
2138 (::windows::core::Interface::vtable(this).PayerPhoneNumber)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2139 }
2140 }
2141 #[doc = "*Required features: `\"Foundation\"`*"]
2142 #[cfg(feature = "Foundation")]
2143 pub fn CompleteAsync(&self, status: PaymentRequestCompletionStatus) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> {
2144 let this = self;
2145 unsafe {
2146 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncAction>();
2147 (::windows::core::Interface::vtable(this).CompleteAsync)(::windows::core::Interface::as_raw(this), status, &mut result__).from_abi(result__)
2148 }
2149 }
2150 }
2151 impl ::core::cmp::PartialEq for PaymentResponse {
2152 fn eq(&self, other: &Self) -> bool {
2153 self.0 == other.0
2154 }
2155 }
2156 impl ::core::cmp::Eq for PaymentResponse {}
2157 impl ::core::fmt::Debug for PaymentResponse {
2158 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2159 f.debug_tuple("PaymentResponse").field(&self.0).finish()
2160 }
2161 }
2162 impl ::windows::core::RuntimeType for PaymentResponse {
2163 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentResponse;{e1389457-8bd2-4888-9fa8-97985545108e})");
2164 }
2165 impl ::core::clone::Clone for PaymentResponse {
2166 fn clone(&self) -> Self {
2167 Self(self.0.clone())
2168 }
2169 }
2170 unsafe impl ::windows::core::Interface for PaymentResponse {
2171 type Vtable = IPaymentResponse_Vtbl;
2172 }
2173 unsafe impl ::windows::core::ComInterface for PaymentResponse {
2174 const IID: ::windows::core::GUID = <IPaymentResponse as ::windows::core::ComInterface>::IID;
2175 }
2176 impl ::windows::core::RuntimeName for PaymentResponse {
2177 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentResponse";
2178 }
2179 ::windows::imp::interface_hierarchy!(PaymentResponse, ::windows::core::IUnknown, ::windows::core::IInspectable);
2180 unsafe impl ::core::marker::Send for PaymentResponse {}
2181 unsafe impl ::core::marker::Sync for PaymentResponse {}
2182 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
2183 #[repr(transparent)]
2184 pub struct PaymentShippingOption(::windows::core::IUnknown);
2185 impl PaymentShippingOption {
2186 pub fn Label(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
2187 let this = self;
2188 unsafe {
2189 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
2190 (::windows::core::Interface::vtable(this).Label)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2191 }
2192 }
2193 pub fn SetLabel(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
2194 let this = self;
2195 unsafe { (::windows::core::Interface::vtable(this).SetLabel)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
2196 }
2197 pub fn Amount(&self) -> ::windows::core::Result<PaymentCurrencyAmount> {
2198 let this = self;
2199 unsafe {
2200 let mut result__ = ::windows::core::zeroed::<PaymentCurrencyAmount>();
2201 (::windows::core::Interface::vtable(this).Amount)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2202 }
2203 }
2204 pub fn SetAmount(&self, value: &PaymentCurrencyAmount) -> ::windows::core::Result<()> {
2205 let this = self;
2206 unsafe { (::windows::core::Interface::vtable(this).SetAmount)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
2207 }
2208 pub fn Tag(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
2209 let this = self;
2210 unsafe {
2211 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
2212 (::windows::core::Interface::vtable(this).Tag)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2213 }
2214 }
2215 pub fn SetTag(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
2216 let this = self;
2217 unsafe { (::windows::core::Interface::vtable(this).SetTag)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
2218 }
2219 pub fn IsSelected(&self) -> ::windows::core::Result<bool> {
2220 let this = self;
2221 unsafe {
2222 let mut result__ = ::windows::core::zeroed::<bool>();
2223 (::windows::core::Interface::vtable(this).IsSelected)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2224 }
2225 }
2226 pub fn SetIsSelected(&self, value: bool) -> ::windows::core::Result<()> {
2227 let this = self;
2228 unsafe { (::windows::core::Interface::vtable(this).SetIsSelected)(::windows::core::Interface::as_raw(this), value).ok() }
2229 }
2230 pub fn Create(label: &::windows::core::HSTRING, amount: &PaymentCurrencyAmount) -> ::windows::core::Result<PaymentShippingOption> {
2231 Self::IPaymentShippingOptionFactory(|this| unsafe {
2232 let mut result__ = ::windows::core::zeroed::<PaymentShippingOption>();
2233 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(label), ::core::mem::transmute_copy(amount), &mut result__).from_abi(result__)
2234 })
2235 }
2236 pub fn CreateWithSelected(label: &::windows::core::HSTRING, amount: &PaymentCurrencyAmount, selected: bool) -> ::windows::core::Result<PaymentShippingOption> {
2237 Self::IPaymentShippingOptionFactory(|this| unsafe {
2238 let mut result__ = ::windows::core::zeroed::<PaymentShippingOption>();
2239 (::windows::core::Interface::vtable(this).CreateWithSelected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(label), ::core::mem::transmute_copy(amount), selected, &mut result__).from_abi(result__)
2240 })
2241 }
2242 pub fn CreateWithSelectedAndTag(label: &::windows::core::HSTRING, amount: &PaymentCurrencyAmount, selected: bool, tag: &::windows::core::HSTRING) -> ::windows::core::Result<PaymentShippingOption> {
2243 Self::IPaymentShippingOptionFactory(|this| unsafe {
2244 let mut result__ = ::windows::core::zeroed::<PaymentShippingOption>();
2245 (::windows::core::Interface::vtable(this).CreateWithSelectedAndTag)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(label), ::core::mem::transmute_copy(amount), selected, ::core::mem::transmute_copy(tag), &mut result__).from_abi(result__)
2246 })
2247 }
2248 #[doc(hidden)]
2249 pub fn IPaymentShippingOptionFactory<R, F: FnOnce(&IPaymentShippingOptionFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
2250 static SHARED: ::windows::imp::FactoryCache<PaymentShippingOption, IPaymentShippingOptionFactory> = ::windows::imp::FactoryCache::new();
2251 SHARED.call(callback)
2252 }
2253 }
2254 impl ::core::cmp::PartialEq for PaymentShippingOption {
2255 fn eq(&self, other: &Self) -> bool {
2256 self.0 == other.0
2257 }
2258 }
2259 impl ::core::cmp::Eq for PaymentShippingOption {}
2260 impl ::core::fmt::Debug for PaymentShippingOption {
2261 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2262 f.debug_tuple("PaymentShippingOption").field(&self.0).finish()
2263 }
2264 }
2265 impl ::windows::core::RuntimeType for PaymentShippingOption {
2266 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentShippingOption;{13372ada-9753-4574-8966-93145a76c7f9})");
2267 }
2268 impl ::core::clone::Clone for PaymentShippingOption {
2269 fn clone(&self) -> Self {
2270 Self(self.0.clone())
2271 }
2272 }
2273 unsafe impl ::windows::core::Interface for PaymentShippingOption {
2274 type Vtable = IPaymentShippingOption_Vtbl;
2275 }
2276 unsafe impl ::windows::core::ComInterface for PaymentShippingOption {
2277 const IID: ::windows::core::GUID = <IPaymentShippingOption as ::windows::core::ComInterface>::IID;
2278 }
2279 impl ::windows::core::RuntimeName for PaymentShippingOption {
2280 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentShippingOption";
2281 }
2282 ::windows::imp::interface_hierarchy!(PaymentShippingOption, ::windows::core::IUnknown, ::windows::core::IInspectable);
2283 unsafe impl ::core::marker::Send for PaymentShippingOption {}
2284 unsafe impl ::core::marker::Sync for PaymentShippingOption {}
2285 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
2286 #[repr(transparent)]
2287 pub struct PaymentToken(::windows::core::IUnknown);
2288 impl PaymentToken {
2289 pub fn PaymentMethodId(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
2290 let this = self;
2291 unsafe {
2292 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
2293 (::windows::core::Interface::vtable(this).PaymentMethodId)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2294 }
2295 }
2296 pub fn JsonDetails(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
2297 let this = self;
2298 unsafe {
2299 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
2300 (::windows::core::Interface::vtable(this).JsonDetails)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
2301 }
2302 }
2303 pub fn Create(paymentmethodid: &::windows::core::HSTRING) -> ::windows::core::Result<PaymentToken> {
2304 Self::IPaymentTokenFactory(|this| unsafe {
2305 let mut result__ = ::windows::core::zeroed::<PaymentToken>();
2306 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(paymentmethodid), &mut result__).from_abi(result__)
2307 })
2308 }
2309 pub fn CreateWithJsonDetails(paymentmethodid: &::windows::core::HSTRING, jsondetails: &::windows::core::HSTRING) -> ::windows::core::Result<PaymentToken> {
2310 Self::IPaymentTokenFactory(|this| unsafe {
2311 let mut result__ = ::windows::core::zeroed::<PaymentToken>();
2312 (::windows::core::Interface::vtable(this).CreateWithJsonDetails)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(paymentmethodid), ::core::mem::transmute_copy(jsondetails), &mut result__).from_abi(result__)
2313 })
2314 }
2315 #[doc(hidden)]
2316 pub fn IPaymentTokenFactory<R, F: FnOnce(&IPaymentTokenFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
2317 static SHARED: ::windows::imp::FactoryCache<PaymentToken, IPaymentTokenFactory> = ::windows::imp::FactoryCache::new();
2318 SHARED.call(callback)
2319 }
2320 }
2321 impl ::core::cmp::PartialEq for PaymentToken {
2322 fn eq(&self, other: &Self) -> bool {
2323 self.0 == other.0
2324 }
2325 }
2326 impl ::core::cmp::Eq for PaymentToken {}
2327 impl ::core::fmt::Debug for PaymentToken {
2328 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2329 f.debug_tuple("PaymentToken").field(&self.0).finish()
2330 }
2331 }
2332 impl ::windows::core::RuntimeType for PaymentToken {
2333 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.PaymentToken;{bbcac013-ccd0-41f2-b2a1-0a2e4b5dce25})");
2334 }
2335 impl ::core::clone::Clone for PaymentToken {
2336 fn clone(&self) -> Self {
2337 Self(self.0.clone())
2338 }
2339 }
2340 unsafe impl ::windows::core::Interface for PaymentToken {
2341 type Vtable = IPaymentToken_Vtbl;
2342 }
2343 unsafe impl ::windows::core::ComInterface for PaymentToken {
2344 const IID: ::windows::core::GUID = <IPaymentToken as ::windows::core::ComInterface>::IID;
2345 }
2346 impl ::windows::core::RuntimeName for PaymentToken {
2347 const NAME: &'static str = "Windows.ApplicationModel.Payments.PaymentToken";
2348 }
2349 ::windows::imp::interface_hierarchy!(PaymentToken, ::windows::core::IUnknown, ::windows::core::IInspectable);
2350 unsafe impl ::core::marker::Send for PaymentToken {}
2351 unsafe impl ::core::marker::Sync for PaymentToken {}
2352 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
2353 #[repr(transparent)]
2354 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2355 pub struct PaymentCanMakePaymentResultStatus(pub i32);
2356 impl PaymentCanMakePaymentResultStatus {
2357 pub const Unknown: Self = Self(0i32);
2358 pub const Yes: Self = Self(1i32);
2359 pub const No: Self = Self(2i32);
2360 pub const NotAllowed: Self = Self(3i32);
2361 pub const UserNotSignedIn: Self = Self(4i32);
2362 pub const SpecifiedPaymentMethodIdsNotSupported: Self = Self(5i32);
2363 pub const NoQualifyingCardOnFile: Self = Self(6i32);
2364 }
2365 impl ::core::marker::Copy for PaymentCanMakePaymentResultStatus {}
2366 impl ::core::clone::Clone for PaymentCanMakePaymentResultStatus {
2367 fn clone(&self) -> Self {
2368 *self
2369 }
2370 }
2371 impl ::core::default::Default for PaymentCanMakePaymentResultStatus {
2372 fn default() -> Self {
2373 Self(0)
2374 }
2375 }
2376 impl ::windows::core::TypeKind for PaymentCanMakePaymentResultStatus {
2377 type TypeKind = ::windows::core::CopyType;
2378 }
2379 impl ::core::fmt::Debug for PaymentCanMakePaymentResultStatus {
2380 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2381 f.debug_tuple("PaymentCanMakePaymentResultStatus").field(&self.0).finish()
2382 }
2383 }
2384 impl ::windows::core::RuntimeType for PaymentCanMakePaymentResultStatus {
2385 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Payments.PaymentCanMakePaymentResultStatus;i4)");
2386 }
2387 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
2388 #[repr(transparent)]
2389 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2390 pub struct PaymentOptionPresence(pub i32);
2391 impl PaymentOptionPresence {
2392 pub const None: Self = Self(0i32);
2393 pub const Optional: Self = Self(1i32);
2394 pub const Required: Self = Self(2i32);
2395 }
2396 impl ::core::marker::Copy for PaymentOptionPresence {}
2397 impl ::core::clone::Clone for PaymentOptionPresence {
2398 fn clone(&self) -> Self {
2399 *self
2400 }
2401 }
2402 impl ::core::default::Default for PaymentOptionPresence {
2403 fn default() -> Self {
2404 Self(0)
2405 }
2406 }
2407 impl ::windows::core::TypeKind for PaymentOptionPresence {
2408 type TypeKind = ::windows::core::CopyType;
2409 }
2410 impl ::core::fmt::Debug for PaymentOptionPresence {
2411 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2412 f.debug_tuple("PaymentOptionPresence").field(&self.0).finish()
2413 }
2414 }
2415 impl ::windows::core::RuntimeType for PaymentOptionPresence {
2416 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Payments.PaymentOptionPresence;i4)");
2417 }
2418 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
2419 #[repr(transparent)]
2420 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2421 pub struct PaymentRequestChangeKind(pub i32);
2422 impl PaymentRequestChangeKind {
2423 pub const ShippingOption: Self = Self(0i32);
2424 pub const ShippingAddress: Self = Self(1i32);
2425 }
2426 impl ::core::marker::Copy for PaymentRequestChangeKind {}
2427 impl ::core::clone::Clone for PaymentRequestChangeKind {
2428 fn clone(&self) -> Self {
2429 *self
2430 }
2431 }
2432 impl ::core::default::Default for PaymentRequestChangeKind {
2433 fn default() -> Self {
2434 Self(0)
2435 }
2436 }
2437 impl ::windows::core::TypeKind for PaymentRequestChangeKind {
2438 type TypeKind = ::windows::core::CopyType;
2439 }
2440 impl ::core::fmt::Debug for PaymentRequestChangeKind {
2441 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2442 f.debug_tuple("PaymentRequestChangeKind").field(&self.0).finish()
2443 }
2444 }
2445 impl ::windows::core::RuntimeType for PaymentRequestChangeKind {
2446 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Payments.PaymentRequestChangeKind;i4)");
2447 }
2448 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
2449 #[repr(transparent)]
2450 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2451 pub struct PaymentRequestCompletionStatus(pub i32);
2452 impl PaymentRequestCompletionStatus {
2453 pub const Succeeded: Self = Self(0i32);
2454 pub const Failed: Self = Self(1i32);
2455 pub const Unknown: Self = Self(2i32);
2456 }
2457 impl ::core::marker::Copy for PaymentRequestCompletionStatus {}
2458 impl ::core::clone::Clone for PaymentRequestCompletionStatus {
2459 fn clone(&self) -> Self {
2460 *self
2461 }
2462 }
2463 impl ::core::default::Default for PaymentRequestCompletionStatus {
2464 fn default() -> Self {
2465 Self(0)
2466 }
2467 }
2468 impl ::windows::core::TypeKind for PaymentRequestCompletionStatus {
2469 type TypeKind = ::windows::core::CopyType;
2470 }
2471 impl ::core::fmt::Debug for PaymentRequestCompletionStatus {
2472 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2473 f.debug_tuple("PaymentRequestCompletionStatus").field(&self.0).finish()
2474 }
2475 }
2476 impl ::windows::core::RuntimeType for PaymentRequestCompletionStatus {
2477 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Payments.PaymentRequestCompletionStatus;i4)");
2478 }
2479 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
2480 #[repr(transparent)]
2481 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2482 pub struct PaymentRequestStatus(pub i32);
2483 impl PaymentRequestStatus {
2484 pub const Succeeded: Self = Self(0i32);
2485 pub const Failed: Self = Self(1i32);
2486 pub const Canceled: Self = Self(2i32);
2487 }
2488 impl ::core::marker::Copy for PaymentRequestStatus {}
2489 impl ::core::clone::Clone for PaymentRequestStatus {
2490 fn clone(&self) -> Self {
2491 *self
2492 }
2493 }
2494 impl ::core::default::Default for PaymentRequestStatus {
2495 fn default() -> Self {
2496 Self(0)
2497 }
2498 }
2499 impl ::windows::core::TypeKind for PaymentRequestStatus {
2500 type TypeKind = ::windows::core::CopyType;
2501 }
2502 impl ::core::fmt::Debug for PaymentRequestStatus {
2503 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2504 f.debug_tuple("PaymentRequestStatus").field(&self.0).finish()
2505 }
2506 }
2507 impl ::windows::core::RuntimeType for PaymentRequestStatus {
2508 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Payments.PaymentRequestStatus;i4)");
2509 }
2510 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
2511 #[repr(transparent)]
2512 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2513 pub struct PaymentShippingType(pub i32);
2514 impl PaymentShippingType {
2515 pub const Shipping: Self = Self(0i32);
2516 pub const Delivery: Self = Self(1i32);
2517 pub const Pickup: Self = Self(2i32);
2518 }
2519 impl ::core::marker::Copy for PaymentShippingType {}
2520 impl ::core::clone::Clone for PaymentShippingType {
2521 fn clone(&self) -> Self {
2522 *self
2523 }
2524 }
2525 impl ::core::default::Default for PaymentShippingType {
2526 fn default() -> Self {
2527 Self(0)
2528 }
2529 }
2530 impl ::windows::core::TypeKind for PaymentShippingType {
2531 type TypeKind = ::windows::core::CopyType;
2532 }
2533 impl ::core::fmt::Debug for PaymentShippingType {
2534 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2535 f.debug_tuple("PaymentShippingType").field(&self.0).finish()
2536 }
2537 }
2538 impl ::windows::core::RuntimeType for PaymentShippingType {
2539 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Payments.PaymentShippingType;i4)");
2540 }
2541 #[doc = "*Required features: `\"ApplicationModel_Payments\"`*"]
2542 #[repr(transparent)]
2543 pub struct PaymentRequestChangedHandler(pub ::windows::core::IUnknown);
2544 impl PaymentRequestChangedHandler {
2545 pub fn new<F: FnMut(::core::option::Option<&PaymentRequest>, ::core::option::Option<&PaymentRequestChangedArgs>) -> ::windows::core::Result<()> + ::core::marker::Send + 'static>(invoke: F) -> Self {
2546 let com = PaymentRequestChangedHandlerBox::<F> { vtable: &PaymentRequestChangedHandlerBox::<F>::VTABLE, count: ::windows::imp::RefCount::new(1), invoke };
2547 unsafe { ::core::mem::transmute(::std::boxed::Box::new(com)) }
2548 }
2549 pub fn Invoke(&self, paymentrequest: &PaymentRequest, args: &PaymentRequestChangedArgs) -> ::windows::core::Result<()> {
2550 let this = self;
2551 unsafe { (::windows::core::Interface::vtable(this).Invoke)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(paymentrequest), ::core::mem::transmute_copy(args)).ok() }
2552 }
2553 }
2554 #[repr(C)]
2555 struct PaymentRequestChangedHandlerBox<F: FnMut(::core::option::Option<&PaymentRequest>, ::core::option::Option<&PaymentRequestChangedArgs>) -> ::windows::core::Result<()> + ::core::marker::Send + 'static> {
2556 vtable: *const PaymentRequestChangedHandler_Vtbl,
2557 invoke: F,
2558 count: ::windows::imp::RefCount,
2559 }
2560 impl<F: FnMut(::core::option::Option<&PaymentRequest>, ::core::option::Option<&PaymentRequestChangedArgs>) -> ::windows::core::Result<()> + ::core::marker::Send + 'static> PaymentRequestChangedHandlerBox<F> {
2561 const VTABLE: PaymentRequestChangedHandler_Vtbl = PaymentRequestChangedHandler_Vtbl {
2562 base__: ::windows::core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release },
2563 Invoke: Self::Invoke,
2564 };
2565 unsafe extern "system" fn QueryInterface(this: *mut ::core::ffi::c_void, iid: &::windows::core::GUID, interface: *mut *const ::core::ffi::c_void) -> ::windows::core::HRESULT {
2566 let this = this as *mut *mut ::core::ffi::c_void as *mut Self;
2567 *interface = if iid == &<PaymentRequestChangedHandler as ::windows::core::ComInterface>::IID || iid == &<::windows::core::IUnknown as ::windows::core::ComInterface>::IID || iid == &<::windows::imp::IAgileObject as ::windows::core::ComInterface>::IID { &mut (*this).vtable as *mut _ as _ } else { ::core::ptr::null_mut() };
2568 if (*interface).is_null() {
2569 ::windows::core::HRESULT(-2147467262)
2570 } else {
2571 (*this).count.add_ref();
2572 ::windows::core::HRESULT(0)
2573 }
2574 }
2575 unsafe extern "system" fn AddRef(this: *mut ::core::ffi::c_void) -> u32 {
2576 let this = this as *mut *mut ::core::ffi::c_void as *mut Self;
2577 (*this).count.add_ref()
2578 }
2579 unsafe extern "system" fn Release(this: *mut ::core::ffi::c_void) -> u32 {
2580 let this = this as *mut *mut ::core::ffi::c_void as *mut Self;
2581 let remaining = (*this).count.release();
2582 if remaining == 0 {
2583 let _ = ::std::boxed::Box::from_raw(this);
2584 }
2585 remaining
2586 }
2587 unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, paymentrequest: *mut ::core::ffi::c_void, args: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
2588 let this = this as *mut *mut ::core::ffi::c_void as *mut Self;
2589 ((*this).invoke)(::windows::core::from_raw_borrowed(&paymentrequest), ::windows::core::from_raw_borrowed(&args)).into()
2590 }
2591 }
2592 impl ::core::cmp::PartialEq for PaymentRequestChangedHandler {
2593 fn eq(&self, other: &Self) -> bool {
2594 self.0 == other.0
2595 }
2596 }
2597 impl ::core::cmp::Eq for PaymentRequestChangedHandler {}
2598 impl ::core::fmt::Debug for PaymentRequestChangedHandler {
2599 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2600 f.debug_tuple("PaymentRequestChangedHandler").field(&self.0).finish()
2601 }
2602 }
2603 unsafe impl ::windows::core::Interface for PaymentRequestChangedHandler {
2604 type Vtable = PaymentRequestChangedHandler_Vtbl;
2605 }
2606 impl ::core::clone::Clone for PaymentRequestChangedHandler {
2607 fn clone(&self) -> Self {
2608 Self(self.0.clone())
2609 }
2610 }
2611 unsafe impl ::windows::core::ComInterface for PaymentRequestChangedHandler {
2612 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5078b9e1_f398_4f2c_a27e_94d371cf6c7d);
2613 }
2614 impl ::windows::core::RuntimeType for PaymentRequestChangedHandler {
2615 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"{5078b9e1-f398-4f2c-a27e-94d371cf6c7d}");
2616 }
2617 #[repr(C)]
2618 #[doc(hidden)]
2619 pub struct PaymentRequestChangedHandler_Vtbl {
2620 pub base__: ::windows::core::IUnknown_Vtbl,
2621 pub Invoke: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, paymentrequest: *mut ::core::ffi::c_void, args: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
2622 }
2623 #[cfg(feature = "implement")]
2624 ::core::include!("impl.rs");