portable-devtools / msvc /Windows Kits /10 /Include /10.0.26100.0 /cppwinrt /winrt /windows.applicationmodel.payments.provider.h
| // C++/WinRT v2.0.250303.1 | |
| // Copyright (c) Microsoft Corporation. All rights reserved. | |
| // Licensed under the MIT License. | |
| static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); | |
| namespace winrt::impl | |
| { | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentAppCanMakePaymentTriggerDetails<D>::Request() const | |
| { | |
| void* result{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppCanMakePaymentTriggerDetails>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppCanMakePaymentTriggerDetails, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppCanMakePaymentTriggerDetails>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->get_Request(&result)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppCanMakePaymentTriggerDetails>**)this; | |
| check_hresult(_winrt_abi_type->get_Request(&result)); | |
| } | |
| return winrt::Windows::ApplicationModel::Payments::PaymentRequest{ result, take_ownership_from_abi }; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentAppCanMakePaymentTriggerDetails<D>::ReportCanMakePaymentResult(winrt::Windows::ApplicationModel::Payments::PaymentCanMakePaymentResult const& value) const | |
| { | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppCanMakePaymentTriggerDetails>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppCanMakePaymentTriggerDetails, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppCanMakePaymentTriggerDetails>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->ReportCanMakePaymentResult(*(void**)(&value))); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppCanMakePaymentTriggerDetails>**)this; | |
| check_hresult(_winrt_abi_type->ReportCanMakePaymentResult(*(void**)(&value))); | |
| } | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentAppManager<D>::RegisterAsync(param::async_iterable<hstring> const& supportedPaymentMethodIds) const | |
| { | |
| void* result{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManager>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManager>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->RegisterAsync(*(void**)(&supportedPaymentMethodIds), &result)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManager>**)this; | |
| check_hresult(_winrt_abi_type->RegisterAsync(*(void**)(&supportedPaymentMethodIds), &result)); | |
| } | |
| return winrt::Windows::Foundation::IAsyncAction{ result, take_ownership_from_abi }; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentAppManager<D>::UnregisterAsync() const | |
| { | |
| void* result{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManager>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManager, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManager>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->UnregisterAsync(&result)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManager>**)this; | |
| check_hresult(_winrt_abi_type->UnregisterAsync(&result)); | |
| } | |
| return winrt::Windows::Foundation::IAsyncAction{ result, take_ownership_from_abi }; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentAppManagerStatics<D>::Current() const | |
| { | |
| void* value{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManagerStatics>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManagerStatics>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->get_Current(&value)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManagerStatics>**)this; | |
| check_hresult(_winrt_abi_type->get_Current(&value)); | |
| } | |
| return winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppManager{ value, take_ownership_from_abi }; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentTransaction<D>::PaymentRequest() const | |
| { | |
| void* value{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->get_PaymentRequest(&value)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)this; | |
| check_hresult(_winrt_abi_type->get_PaymentRequest(&value)); | |
| } | |
| return winrt::Windows::ApplicationModel::Payments::PaymentRequest{ value, take_ownership_from_abi }; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentTransaction<D>::PayerEmail() const | |
| { | |
| void* value{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->get_PayerEmail(&value)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)this; | |
| check_hresult(_winrt_abi_type->get_PayerEmail(&value)); | |
| } | |
| return hstring{ value, take_ownership_from_abi }; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentTransaction<D>::PayerEmail(param::hstring const& value) const | |
| { | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->put_PayerEmail(*(void**)(&value))); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)this; | |
| check_hresult(_winrt_abi_type->put_PayerEmail(*(void**)(&value))); | |
| } | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentTransaction<D>::PayerName() const | |
| { | |
| void* value{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->get_PayerName(&value)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)this; | |
| check_hresult(_winrt_abi_type->get_PayerName(&value)); | |
| } | |
| return hstring{ value, take_ownership_from_abi }; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentTransaction<D>::PayerName(param::hstring const& value) const | |
| { | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->put_PayerName(*(void**)(&value))); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)this; | |
| check_hresult(_winrt_abi_type->put_PayerName(*(void**)(&value))); | |
| } | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentTransaction<D>::PayerPhoneNumber() const | |
| { | |
| void* value{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->get_PayerPhoneNumber(&value)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)this; | |
| check_hresult(_winrt_abi_type->get_PayerPhoneNumber(&value)); | |
| } | |
| return hstring{ value, take_ownership_from_abi }; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentTransaction<D>::PayerPhoneNumber(param::hstring const& value) const | |
| { | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->put_PayerPhoneNumber(*(void**)(&value))); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)this; | |
| check_hresult(_winrt_abi_type->put_PayerPhoneNumber(*(void**)(&value))); | |
| } | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentTransaction<D>::UpdateShippingAddressAsync(winrt::Windows::ApplicationModel::Payments::PaymentAddress const& shippingAddress) const | |
| { | |
| void* result{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->UpdateShippingAddressAsync(*(void**)(&shippingAddress), &result)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)this; | |
| check_hresult(_winrt_abi_type->UpdateShippingAddressAsync(*(void**)(&shippingAddress), &result)); | |
| } | |
| return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::Payments::PaymentRequestChangedResult>{ result, take_ownership_from_abi }; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentTransaction<D>::UpdateSelectedShippingOptionAsync(winrt::Windows::ApplicationModel::Payments::PaymentShippingOption const& selectedShippingOption) const | |
| { | |
| void* result{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->UpdateSelectedShippingOptionAsync(*(void**)(&selectedShippingOption), &result)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)this; | |
| check_hresult(_winrt_abi_type->UpdateSelectedShippingOptionAsync(*(void**)(&selectedShippingOption), &result)); | |
| } | |
| return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::Payments::PaymentRequestChangedResult>{ result, take_ownership_from_abi }; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentTransaction<D>::AcceptAsync(winrt::Windows::ApplicationModel::Payments::PaymentToken const& paymentToken) const | |
| { | |
| void* result{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->AcceptAsync(*(void**)(&paymentToken), &result)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)this; | |
| check_hresult(_winrt_abi_type->AcceptAsync(*(void**)(&paymentToken), &result)); | |
| } | |
| return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransactionAcceptResult>{ result, take_ownership_from_abi }; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentTransaction<D>::Reject() const | |
| { | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->Reject()); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction>**)this; | |
| check_hresult(_winrt_abi_type->Reject()); | |
| } | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentTransactionAcceptResult<D>::Status() const | |
| { | |
| winrt::Windows::ApplicationModel::Payments::PaymentRequestCompletionStatus value{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionAcceptResult>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionAcceptResult, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionAcceptResult>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->get_Status(reinterpret_cast<int32_t*>(&value))); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionAcceptResult>**)this; | |
| check_hresult(_winrt_abi_type->get_Status(reinterpret_cast<int32_t*>(&value))); | |
| } | |
| return value; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_Payments_Provider_IPaymentTransactionStatics<D>::FromIdAsync(param::hstring const& id) const | |
| { | |
| void* result{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionStatics>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionStatics>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->FromIdAsync(*(void**)(&id), &result)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionStatics>**)this; | |
| check_hresult(_winrt_abi_type->FromIdAsync(*(void**)(&id), &result)); | |
| } | |
| return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransaction>{ result, take_ownership_from_abi }; | |
| } | |
| template <typename D> | |
| struct produce<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppCanMakePaymentTriggerDetails> : produce_base<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppCanMakePaymentTriggerDetails> | |
| { | |
| int32_t __stdcall get_Request(void** result) noexcept final try | |
| { | |
| clear_abi(result); | |
| typename D::abi_guard guard(this->shim()); | |
| *result = detach_from<winrt::Windows::ApplicationModel::Payments::PaymentRequest>(this->shim().Request()); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall ReportCanMakePaymentResult(void* value) noexcept final try | |
| { | |
| typename D::abi_guard guard(this->shim()); | |
| this->shim().ReportCanMakePaymentResult(*reinterpret_cast<winrt::Windows::ApplicationModel::Payments::PaymentCanMakePaymentResult const*>(&value)); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| }; | |
| template <typename D> | |
| struct produce<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManager> : produce_base<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManager> | |
| { | |
| int32_t __stdcall RegisterAsync(void* supportedPaymentMethodIds, void** result) noexcept final try | |
| { | |
| clear_abi(result); | |
| typename D::abi_guard guard(this->shim()); | |
| *result = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().RegisterAsync(*reinterpret_cast<winrt::Windows::Foundation::Collections::IIterable<hstring> const*>(&supportedPaymentMethodIds))); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall UnregisterAsync(void** result) noexcept final try | |
| { | |
| clear_abi(result); | |
| typename D::abi_guard guard(this->shim()); | |
| *result = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().UnregisterAsync()); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| }; | |
| template <typename D> | |
| struct produce<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManagerStatics> : produce_base<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManagerStatics> | |
| { | |
| int32_t __stdcall get_Current(void** value) noexcept final try | |
| { | |
| clear_abi(value); | |
| typename D::abi_guard guard(this->shim()); | |
| *value = detach_from<winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppManager>(this->shim().Current()); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| }; | |
| template <typename D> | |
| struct produce<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction> : produce_base<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction> | |
| { | |
| int32_t __stdcall get_PaymentRequest(void** value) noexcept final try | |
| { | |
| clear_abi(value); | |
| typename D::abi_guard guard(this->shim()); | |
| *value = detach_from<winrt::Windows::ApplicationModel::Payments::PaymentRequest>(this->shim().PaymentRequest()); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall get_PayerEmail(void** value) noexcept final try | |
| { | |
| clear_abi(value); | |
| typename D::abi_guard guard(this->shim()); | |
| *value = detach_from<hstring>(this->shim().PayerEmail()); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall put_PayerEmail(void* value) noexcept final try | |
| { | |
| typename D::abi_guard guard(this->shim()); | |
| this->shim().PayerEmail(*reinterpret_cast<hstring const*>(&value)); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall get_PayerName(void** value) noexcept final try | |
| { | |
| clear_abi(value); | |
| typename D::abi_guard guard(this->shim()); | |
| *value = detach_from<hstring>(this->shim().PayerName()); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall put_PayerName(void* value) noexcept final try | |
| { | |
| typename D::abi_guard guard(this->shim()); | |
| this->shim().PayerName(*reinterpret_cast<hstring const*>(&value)); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall get_PayerPhoneNumber(void** value) noexcept final try | |
| { | |
| clear_abi(value); | |
| typename D::abi_guard guard(this->shim()); | |
| *value = detach_from<hstring>(this->shim().PayerPhoneNumber()); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall put_PayerPhoneNumber(void* value) noexcept final try | |
| { | |
| typename D::abi_guard guard(this->shim()); | |
| this->shim().PayerPhoneNumber(*reinterpret_cast<hstring const*>(&value)); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall UpdateShippingAddressAsync(void* shippingAddress, void** result) noexcept final try | |
| { | |
| clear_abi(result); | |
| typename D::abi_guard guard(this->shim()); | |
| *result = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::Payments::PaymentRequestChangedResult>>(this->shim().UpdateShippingAddressAsync(*reinterpret_cast<winrt::Windows::ApplicationModel::Payments::PaymentAddress const*>(&shippingAddress))); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall UpdateSelectedShippingOptionAsync(void* selectedShippingOption, void** result) noexcept final try | |
| { | |
| clear_abi(result); | |
| typename D::abi_guard guard(this->shim()); | |
| *result = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::Payments::PaymentRequestChangedResult>>(this->shim().UpdateSelectedShippingOptionAsync(*reinterpret_cast<winrt::Windows::ApplicationModel::Payments::PaymentShippingOption const*>(&selectedShippingOption))); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall AcceptAsync(void* paymentToken, void** result) noexcept final try | |
| { | |
| clear_abi(result); | |
| typename D::abi_guard guard(this->shim()); | |
| *result = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransactionAcceptResult>>(this->shim().AcceptAsync(*reinterpret_cast<winrt::Windows::ApplicationModel::Payments::PaymentToken const*>(&paymentToken))); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall Reject() noexcept final try | |
| { | |
| typename D::abi_guard guard(this->shim()); | |
| this->shim().Reject(); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| }; | |
| template <typename D> | |
| struct produce<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionAcceptResult> : produce_base<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionAcceptResult> | |
| { | |
| int32_t __stdcall get_Status(int32_t* value) noexcept final try | |
| { | |
| typename D::abi_guard guard(this->shim()); | |
| *value = detach_from<winrt::Windows::ApplicationModel::Payments::PaymentRequestCompletionStatus>(this->shim().Status()); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| }; | |
| template <typename D> | |
| struct produce<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionStatics> : produce_base<D, winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionStatics> | |
| { | |
| int32_t __stdcall FromIdAsync(void* id, void** result) noexcept final try | |
| { | |
| clear_abi(result); | |
| typename D::abi_guard guard(this->shim()); | |
| *result = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransaction>>(this->shim().FromIdAsync(*reinterpret_cast<hstring const*>(&id))); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| }; | |
| } | |
| WINRT_EXPORT namespace winrt::Windows::ApplicationModel::Payments::Provider | |
| { | |
| inline auto PaymentAppManager::Current() | |
| { | |
| return impl::call_factory_cast<winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppManager(*)(IPaymentAppManagerStatics const&), PaymentAppManager, IPaymentAppManagerStatics>([](IPaymentAppManagerStatics const& f) { return f.Current(); }); | |
| } | |
| inline auto PaymentTransaction::FromIdAsync(param::hstring const& id) | |
| { | |
| return impl::call_factory<PaymentTransaction, IPaymentTransactionStatics>([&](IPaymentTransactionStatics const& f) { return f.FromIdAsync(id); }); | |
| } | |
| } | |
| namespace std | |
| { | |
| template<> struct hash<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppCanMakePaymentTriggerDetails> : winrt::impl::hash_base {}; | |
| template<> struct hash<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManager> : winrt::impl::hash_base {}; | |
| template<> struct hash<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentAppManagerStatics> : winrt::impl::hash_base {}; | |
| template<> struct hash<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransaction> : winrt::impl::hash_base {}; | |
| template<> struct hash<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionAcceptResult> : winrt::impl::hash_base {}; | |
| template<> struct hash<winrt::Windows::ApplicationModel::Payments::Provider::IPaymentTransactionStatics> : winrt::impl::hash_base {}; | |
| template<> struct hash<winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppCanMakePaymentTriggerDetails> : winrt::impl::hash_base {}; | |
| template<> struct hash<winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppManager> : winrt::impl::hash_base {}; | |
| template<> struct hash<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransaction> : winrt::impl::hash_base {}; | |
| template<> struct hash<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransactionAcceptResult> : winrt::impl::hash_base {}; | |
| } | |