blob: f29c3e9501854f9aa90a2b5e71a724ee40d81cd4 [file] [log] [blame]
#[doc(hidden)]
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)]
pub struct IPaymentAppCanMakePaymentTriggerDetails(::windows_core::IUnknown);
unsafe impl ::windows_core::Interface for IPaymentAppCanMakePaymentTriggerDetails {
type Vtable = IPaymentAppCanMakePaymentTriggerDetails_Vtbl;
}
unsafe impl ::windows_core::ComInterface for IPaymentAppCanMakePaymentTriggerDetails {
const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x0ce201f0_8b93_4eb6_8c46_2e4a6c6a26f6);
}
#[repr(C)]
#[doc(hidden)]
pub struct IPaymentAppCanMakePaymentTriggerDetails_Vtbl {
pub base__: ::windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
pub ReportCanMakePaymentResult: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
}
#[doc(hidden)]
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)]
pub struct IPaymentAppManager(::windows_core::IUnknown);
unsafe impl ::windows_core::Interface for IPaymentAppManager {
type Vtable = IPaymentAppManager_Vtbl;
}
unsafe impl ::windows_core::ComInterface for IPaymentAppManager {
const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x0e47aa53_8521_4969_a957_df2538a3a98f);
}
#[repr(C)]
#[doc(hidden)]
pub struct IPaymentAppManager_Vtbl {
pub base__: ::windows_core::IInspectable_Vtbl,
#[cfg(feature = "Foundation_Collections")]
pub RegisterAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, supportedpaymentmethodids: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))]
RegisterAsync: usize,
#[cfg(feature = "Foundation")]
pub UnregisterAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
#[cfg(not(feature = "Foundation"))]
UnregisterAsync: usize,
}
#[doc(hidden)]
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)]
pub struct IPaymentAppManagerStatics(::windows_core::IUnknown);
unsafe impl ::windows_core::Interface for IPaymentAppManagerStatics {
type Vtable = IPaymentAppManagerStatics_Vtbl;
}
unsafe impl ::windows_core::ComInterface for IPaymentAppManagerStatics {
const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xa341ac28_fc89_4406_b4d9_34e7fe79dfb6);
}
#[repr(C)]
#[doc(hidden)]
pub struct IPaymentAppManagerStatics_Vtbl {
pub base__: ::windows_core::IInspectable_Vtbl,
pub Current: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
}
#[doc(hidden)]
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)]
pub struct IPaymentTransaction(::windows_core::IUnknown);
unsafe impl ::windows_core::Interface for IPaymentTransaction {
type Vtable = IPaymentTransaction_Vtbl;
}
unsafe impl ::windows_core::ComInterface for IPaymentTransaction {
const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x62581da0_26a5_4e9b_a6eb_66606cf001d3);
}
#[repr(C)]
#[doc(hidden)]
pub struct IPaymentTransaction_Vtbl {
pub base__: ::windows_core::IInspectable_Vtbl,
pub PaymentRequest: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
pub PayerEmail: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT,
pub SetPayerEmail: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT,
pub PayerName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT,
pub SetPayerName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT,
pub PayerPhoneNumber: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT,
pub SetPayerPhoneNumber: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT,
#[cfg(feature = "Foundation")]
pub UpdateShippingAddressAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, shippingaddress: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
#[cfg(not(feature = "Foundation"))]
UpdateShippingAddressAsync: usize,
#[cfg(feature = "Foundation")]
pub UpdateSelectedShippingOptionAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, selectedshippingoption: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
#[cfg(not(feature = "Foundation"))]
UpdateSelectedShippingOptionAsync: usize,
#[cfg(feature = "Foundation")]
pub AcceptAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, paymenttoken: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
#[cfg(not(feature = "Foundation"))]
AcceptAsync: usize,
pub Reject: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
}
#[doc(hidden)]
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)]
pub struct IPaymentTransactionAcceptResult(::windows_core::IUnknown);
unsafe impl ::windows_core::Interface for IPaymentTransactionAcceptResult {
type Vtable = IPaymentTransactionAcceptResult_Vtbl;
}
unsafe impl ::windows_core::ComInterface for IPaymentTransactionAcceptResult {
const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x060e3276_d30c_4817_95a2_df7ae9273b56);
}
#[repr(C)]
#[doc(hidden)]
pub struct IPaymentTransactionAcceptResult_Vtbl {
pub base__: ::windows_core::IInspectable_Vtbl,
pub Status: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::PaymentRequestCompletionStatus) -> ::windows_core::HRESULT,
}
#[doc(hidden)]
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)]
pub struct IPaymentTransactionStatics(::windows_core::IUnknown);
unsafe impl ::windows_core::Interface for IPaymentTransactionStatics {
type Vtable = IPaymentTransactionStatics_Vtbl;
}
unsafe impl ::windows_core::ComInterface for IPaymentTransactionStatics {
const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x8d639750_ee0a_4df5_9b1e_1c0f9ec59881);
}
#[repr(C)]
#[doc(hidden)]
pub struct IPaymentTransactionStatics_Vtbl {
pub base__: ::windows_core::IInspectable_Vtbl,
#[cfg(feature = "Foundation")]
pub FromIdAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, id: ::std::mem::MaybeUninit<::windows_core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
#[cfg(not(feature = "Foundation"))]
FromIdAsync: usize,
}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)]
pub struct PaymentAppCanMakePaymentTriggerDetails(::windows_core::IUnknown);
impl PaymentAppCanMakePaymentTriggerDetails {
pub fn Request(&self) -> ::windows_core::Result<super::PaymentRequest> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Request)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__)
}
}
pub fn ReportCanMakePaymentResult<P0>(&self, value: P0) -> ::windows_core::Result<()>
where
P0: ::windows_core::IntoParam<super::PaymentCanMakePaymentResult>,
{
let this = self;
unsafe { (::windows_core::Interface::vtable(this).ReportCanMakePaymentResult)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() }
}
}
impl ::windows_core::RuntimeType for PaymentAppCanMakePaymentTriggerDetails {
const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.Provider.PaymentAppCanMakePaymentTriggerDetails;{0ce201f0-8b93-4eb6-8c46-2e4a6c6a26f6})");
}
unsafe impl ::windows_core::Interface for PaymentAppCanMakePaymentTriggerDetails {
type Vtable = IPaymentAppCanMakePaymentTriggerDetails_Vtbl;
}
unsafe impl ::windows_core::ComInterface for PaymentAppCanMakePaymentTriggerDetails {
const IID: ::windows_core::GUID = <IPaymentAppCanMakePaymentTriggerDetails as ::windows_core::ComInterface>::IID;
}
impl ::windows_core::RuntimeName for PaymentAppCanMakePaymentTriggerDetails {
const NAME: &'static str = "Windows.ApplicationModel.Payments.Provider.PaymentAppCanMakePaymentTriggerDetails";
}
::windows_core::imp::interface_hierarchy!(PaymentAppCanMakePaymentTriggerDetails, ::windows_core::IUnknown, ::windows_core::IInspectable);
unsafe impl ::core::marker::Send for PaymentAppCanMakePaymentTriggerDetails {}
unsafe impl ::core::marker::Sync for PaymentAppCanMakePaymentTriggerDetails {}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)]
pub struct PaymentAppManager(::windows_core::IUnknown);
impl PaymentAppManager {
#[doc = "Required features: `\"Foundation_Collections\"`"]
#[cfg(feature = "Foundation_Collections")]
pub fn RegisterAsync<P0>(&self, supportedpaymentmethodids: P0) -> ::windows_core::Result<super::super::super::Foundation::IAsyncAction>
where
P0: ::windows_core::TryIntoParam<super::super::super::Foundation::Collections::IIterable<::windows_core::HSTRING>>,
{
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).RegisterAsync)(::windows_core::Interface::as_raw(this), supportedpaymentmethodids.try_into_param()?.abi(), &mut result__).from_abi(result__)
}
}
#[doc = "Required features: `\"Foundation\"`"]
#[cfg(feature = "Foundation")]
pub fn UnregisterAsync(&self) -> ::windows_core::Result<super::super::super::Foundation::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).UnregisterAsync)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__)
}
}
pub fn Current() -> ::windows_core::Result<PaymentAppManager> {
Self::IPaymentAppManagerStatics(|this| unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Current)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__)
})
}
#[doc(hidden)]
pub fn IPaymentAppManagerStatics<R, F: FnOnce(&IPaymentAppManagerStatics) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> {
static SHARED: ::windows_core::imp::FactoryCache<PaymentAppManager, IPaymentAppManagerStatics> = ::windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl ::windows_core::RuntimeType for PaymentAppManager {
const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.Provider.PaymentAppManager;{0e47aa53-8521-4969-a957-df2538a3a98f})");
}
unsafe impl ::windows_core::Interface for PaymentAppManager {
type Vtable = IPaymentAppManager_Vtbl;
}
unsafe impl ::windows_core::ComInterface for PaymentAppManager {
const IID: ::windows_core::GUID = <IPaymentAppManager as ::windows_core::ComInterface>::IID;
}
impl ::windows_core::RuntimeName for PaymentAppManager {
const NAME: &'static str = "Windows.ApplicationModel.Payments.Provider.PaymentAppManager";
}
::windows_core::imp::interface_hierarchy!(PaymentAppManager, ::windows_core::IUnknown, ::windows_core::IInspectable);
unsafe impl ::core::marker::Send for PaymentAppManager {}
unsafe impl ::core::marker::Sync for PaymentAppManager {}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)]
pub struct PaymentTransaction(::windows_core::IUnknown);
impl PaymentTransaction {
pub fn PaymentRequest(&self) -> ::windows_core::Result<super::PaymentRequest> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).PaymentRequest)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__)
}
}
pub fn PayerEmail(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).PayerEmail)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__)
}
}
pub fn SetPayerEmail(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> {
let this = self;
unsafe { (::windows_core::Interface::vtable(this).SetPayerEmail)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
}
pub fn PayerName(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).PayerName)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__)
}
}
pub fn SetPayerName(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> {
let this = self;
unsafe { (::windows_core::Interface::vtable(this).SetPayerName)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
}
pub fn PayerPhoneNumber(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).PayerPhoneNumber)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__)
}
}
pub fn SetPayerPhoneNumber(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> {
let this = self;
unsafe { (::windows_core::Interface::vtable(this).SetPayerPhoneNumber)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
}
#[doc = "Required features: `\"Foundation\"`"]
#[cfg(feature = "Foundation")]
pub fn UpdateShippingAddressAsync<P0>(&self, shippingaddress: P0) -> ::windows_core::Result<super::super::super::Foundation::IAsyncOperation<super::PaymentRequestChangedResult>>
where
P0: ::windows_core::IntoParam<super::PaymentAddress>,
{
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).UpdateShippingAddressAsync)(::windows_core::Interface::as_raw(this), shippingaddress.into_param().abi(), &mut result__).from_abi(result__)
}
}
#[doc = "Required features: `\"Foundation\"`"]
#[cfg(feature = "Foundation")]
pub fn UpdateSelectedShippingOptionAsync<P0>(&self, selectedshippingoption: P0) -> ::windows_core::Result<super::super::super::Foundation::IAsyncOperation<super::PaymentRequestChangedResult>>
where
P0: ::windows_core::IntoParam<super::PaymentShippingOption>,
{
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).UpdateSelectedShippingOptionAsync)(::windows_core::Interface::as_raw(this), selectedshippingoption.into_param().abi(), &mut result__).from_abi(result__)
}
}
#[doc = "Required features: `\"Foundation\"`"]
#[cfg(feature = "Foundation")]
pub fn AcceptAsync<P0>(&self, paymenttoken: P0) -> ::windows_core::Result<super::super::super::Foundation::IAsyncOperation<PaymentTransactionAcceptResult>>
where
P0: ::windows_core::IntoParam<super::PaymentToken>,
{
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).AcceptAsync)(::windows_core::Interface::as_raw(this), paymenttoken.into_param().abi(), &mut result__).from_abi(result__)
}
}
pub fn Reject(&self) -> ::windows_core::Result<()> {
let this = self;
unsafe { (::windows_core::Interface::vtable(this).Reject)(::windows_core::Interface::as_raw(this)).ok() }
}
#[doc = "Required features: `\"Foundation\"`"]
#[cfg(feature = "Foundation")]
pub fn FromIdAsync(id: &::windows_core::HSTRING) -> ::windows_core::Result<super::super::super::Foundation::IAsyncOperation<PaymentTransaction>> {
Self::IPaymentTransactionStatics(|this| unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).FromIdAsync)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(id), &mut result__).from_abi(result__)
})
}
#[doc(hidden)]
pub fn IPaymentTransactionStatics<R, F: FnOnce(&IPaymentTransactionStatics) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> {
static SHARED: ::windows_core::imp::FactoryCache<PaymentTransaction, IPaymentTransactionStatics> = ::windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl ::windows_core::RuntimeType for PaymentTransaction {
const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.Provider.PaymentTransaction;{62581da0-26a5-4e9b-a6eb-66606cf001d3})");
}
unsafe impl ::windows_core::Interface for PaymentTransaction {
type Vtable = IPaymentTransaction_Vtbl;
}
unsafe impl ::windows_core::ComInterface for PaymentTransaction {
const IID: ::windows_core::GUID = <IPaymentTransaction as ::windows_core::ComInterface>::IID;
}
impl ::windows_core::RuntimeName for PaymentTransaction {
const NAME: &'static str = "Windows.ApplicationModel.Payments.Provider.PaymentTransaction";
}
::windows_core::imp::interface_hierarchy!(PaymentTransaction, ::windows_core::IUnknown, ::windows_core::IInspectable);
unsafe impl ::core::marker::Send for PaymentTransaction {}
unsafe impl ::core::marker::Sync for PaymentTransaction {}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)]
pub struct PaymentTransactionAcceptResult(::windows_core::IUnknown);
impl PaymentTransactionAcceptResult {
pub fn Status(&self) -> ::windows_core::Result<super::PaymentRequestCompletionStatus> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Status)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__)
}
}
}
impl ::windows_core::RuntimeType for PaymentTransactionAcceptResult {
const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Payments.Provider.PaymentTransactionAcceptResult;{060e3276-d30c-4817-95a2-df7ae9273b56})");
}
unsafe impl ::windows_core::Interface for PaymentTransactionAcceptResult {
type Vtable = IPaymentTransactionAcceptResult_Vtbl;
}
unsafe impl ::windows_core::ComInterface for PaymentTransactionAcceptResult {
const IID: ::windows_core::GUID = <IPaymentTransactionAcceptResult as ::windows_core::ComInterface>::IID;
}
impl ::windows_core::RuntimeName for PaymentTransactionAcceptResult {
const NAME: &'static str = "Windows.ApplicationModel.Payments.Provider.PaymentTransactionAcceptResult";
}
::windows_core::imp::interface_hierarchy!(PaymentTransactionAcceptResult, ::windows_core::IUnknown, ::windows_core::IInspectable);
unsafe impl ::core::marker::Send for PaymentTransactionAcceptResult {}
unsafe impl ::core::marker::Sync for PaymentTransactionAcceptResult {}