mirror of
https://github.com/WinDurango/WinDurango.git
synced 2026-01-31 00:55:17 +01:00
263 lines
17 KiB
C++
263 lines
17 KiB
C++
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1
|
|
|
|
#pragma once
|
|
#ifndef WINRT_Windows_ApplicationModel_Wallet_System_H
|
|
#define WINRT_Windows_ApplicationModel_Wallet_System_H
|
|
#include "winrt/base.h"
|
|
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers.");
|
|
#define CPPWINRT_VERSION "2.0.250303.1"
|
|
#include "winrt/Windows.ApplicationModel.Wallet.h"
|
|
#include "winrt/impl/Windows.ApplicationModel.Wallet.2.h"
|
|
#include "winrt/impl/Windows.Foundation.2.h"
|
|
#include "winrt/impl/Windows.Foundation.Collections.2.h"
|
|
#include "winrt/impl/Windows.Storage.Streams.2.h"
|
|
#include "winrt/impl/Windows.ApplicationModel.Wallet.System.2.h"
|
|
namespace winrt::impl
|
|
{
|
|
template <typename D> auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore<D>::GetItemsAsync() const
|
|
{
|
|
void* operation{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore, 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::Wallet::System::IWalletItemSystemStore>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->GetItemsAsync(&operation));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore>**)this;
|
|
check_hresult(_winrt_abi_type->GetItemsAsync(&operation));
|
|
}
|
|
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::ApplicationModel::Wallet::WalletItem>>{ operation, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore<D>::DeleteAsync(winrt::Windows::ApplicationModel::Wallet::WalletItem const& item) const
|
|
{
|
|
void* operation{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore, 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::Wallet::System::IWalletItemSystemStore>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->DeleteAsync(*(void**)(&item), &operation));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore>**)this;
|
|
check_hresult(_winrt_abi_type->DeleteAsync(*(void**)(&item), &operation));
|
|
}
|
|
return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore<D>::ImportItemAsync(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& stream) const
|
|
{
|
|
void* operation{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore, 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::Wallet::System::IWalletItemSystemStore>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->ImportItemAsync(*(void**)(&stream), &operation));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore>**)this;
|
|
check_hresult(_winrt_abi_type->ImportItemAsync(*(void**)(&stream), &operation));
|
|
}
|
|
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::Wallet::WalletItem>{ operation, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore<D>::GetAppStatusForItem(winrt::Windows::ApplicationModel::Wallet::WalletItem const& item) const
|
|
{
|
|
winrt::Windows::ApplicationModel::Wallet::System::WalletItemAppAssociation result{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore, 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::Wallet::System::IWalletItemSystemStore>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->GetAppStatusForItem(*(void**)(&item), reinterpret_cast<int32_t*>(&result)));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore>**)this;
|
|
check_hresult(_winrt_abi_type->GetAppStatusForItem(*(void**)(&item), reinterpret_cast<int32_t*>(&result)));
|
|
}
|
|
return result;
|
|
}
|
|
template <typename D> auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore<D>::LaunchAppForItemAsync(winrt::Windows::ApplicationModel::Wallet::WalletItem const& item) const
|
|
{
|
|
void* operation{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore, 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::Wallet::System::IWalletItemSystemStore>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->LaunchAppForItemAsync(*(void**)(&item), &operation));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore>**)this;
|
|
check_hresult(_winrt_abi_type->LaunchAppForItemAsync(*(void**)(&item), &operation));
|
|
}
|
|
return winrt::Windows::Foundation::IAsyncOperation<bool>{ operation, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore2<D>::ItemsChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Wallet::System::WalletItemSystemStore, winrt::Windows::Foundation::IInspectable> const& handler) const
|
|
{
|
|
winrt::event_token cookie{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore2>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore2, 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::Wallet::System::IWalletItemSystemStore2>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->add_ItemsChanged(*(void**)(&handler), put_abi(cookie)));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore2>**)this;
|
|
check_hresult(_winrt_abi_type->add_ItemsChanged(*(void**)(&handler), put_abi(cookie)));
|
|
}
|
|
return cookie;
|
|
}
|
|
template <typename D> auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore2<D>::ItemsChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Wallet::System::WalletItemSystemStore, winrt::Windows::Foundation::IInspectable> const& handler) const
|
|
{
|
|
return impl::make_event_revoker<D, ItemsChanged_revoker>(this, ItemsChanged(handler));
|
|
}
|
|
template <typename D> auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore2<D>::ItemsChanged(winrt::event_token const& cookie) const noexcept
|
|
{
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore2>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore2, 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::Wallet::System::IWalletItemSystemStore2>**)&_winrt_casted_result;
|
|
_winrt_abi_type->remove_ItemsChanged(impl::bind_in(cookie));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore2>**)this;
|
|
_winrt_abi_type->remove_ItemsChanged(impl::bind_in(cookie));
|
|
}
|
|
}
|
|
template <typename D> auto consume_Windows_ApplicationModel_Wallet_System_IWalletManagerSystemStatics<D>::RequestStoreAsync() const
|
|
{
|
|
void* operation{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletManagerSystemStatics>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::Wallet::System::IWalletManagerSystemStatics, 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::Wallet::System::IWalletManagerSystemStatics>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->RequestStoreAsync(&operation));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::Wallet::System::IWalletManagerSystemStatics>**)this;
|
|
check_hresult(_winrt_abi_type->RequestStoreAsync(&operation));
|
|
}
|
|
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::Wallet::System::WalletItemSystemStore>{ operation, take_ownership_from_abi };
|
|
}
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore> : produce_base<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore>
|
|
{
|
|
int32_t __stdcall GetItemsAsync(void** operation) noexcept final try
|
|
{
|
|
clear_abi(operation);
|
|
typename D::abi_guard guard(this->shim());
|
|
*operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::ApplicationModel::Wallet::WalletItem>>>(this->shim().GetItemsAsync());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall DeleteAsync(void* item, void** operation) noexcept final try
|
|
{
|
|
clear_abi(operation);
|
|
typename D::abi_guard guard(this->shim());
|
|
*operation = detach_from<winrt::Windows::Foundation::IAsyncAction>(this->shim().DeleteAsync(*reinterpret_cast<winrt::Windows::ApplicationModel::Wallet::WalletItem const*>(&item)));
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall ImportItemAsync(void* stream, void** operation) noexcept final try
|
|
{
|
|
clear_abi(operation);
|
|
typename D::abi_guard guard(this->shim());
|
|
*operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::Wallet::WalletItem>>(this->shim().ImportItemAsync(*reinterpret_cast<winrt::Windows::Storage::Streams::IRandomAccessStreamReference const*>(&stream)));
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall GetAppStatusForItem(void* item, int32_t* result) noexcept final try
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
*result = detach_from<winrt::Windows::ApplicationModel::Wallet::System::WalletItemAppAssociation>(this->shim().GetAppStatusForItem(*reinterpret_cast<winrt::Windows::ApplicationModel::Wallet::WalletItem const*>(&item)));
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall LaunchAppForItemAsync(void* item, void** operation) noexcept final try
|
|
{
|
|
clear_abi(operation);
|
|
typename D::abi_guard guard(this->shim());
|
|
*operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<bool>>(this->shim().LaunchAppForItemAsync(*reinterpret_cast<winrt::Windows::ApplicationModel::Wallet::WalletItem const*>(&item)));
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
};
|
|
#endif
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore2> : produce_base<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore2>
|
|
{
|
|
int32_t __stdcall add_ItemsChanged(void* handler, winrt::event_token* cookie) noexcept final try
|
|
{
|
|
zero_abi<winrt::event_token>(cookie);
|
|
typename D::abi_guard guard(this->shim());
|
|
*cookie = detach_from<winrt::event_token>(this->shim().ItemsChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Wallet::System::WalletItemSystemStore, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall remove_ItemsChanged(winrt::event_token cookie) noexcept final
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
this->shim().ItemsChanged(*reinterpret_cast<winrt::event_token const*>(&cookie));
|
|
return 0;
|
|
}
|
|
};
|
|
#endif
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletManagerSystemStatics> : produce_base<D, winrt::Windows::ApplicationModel::Wallet::System::IWalletManagerSystemStatics>
|
|
{
|
|
int32_t __stdcall RequestStoreAsync(void** operation) noexcept final try
|
|
{
|
|
clear_abi(operation);
|
|
typename D::abi_guard guard(this->shim());
|
|
*operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::Wallet::System::WalletItemSystemStore>>(this->shim().RequestStoreAsync());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
};
|
|
#endif
|
|
}
|
|
WINRT_EXPORT namespace winrt::Windows::ApplicationModel::Wallet::System
|
|
{
|
|
inline auto WalletManagerSystem::RequestStoreAsync()
|
|
{
|
|
return impl::call_factory_cast<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::Wallet::System::WalletItemSystemStore>(*)(IWalletManagerSystemStatics const&), WalletManagerSystem, IWalletManagerSystemStatics>([](IWalletManagerSystemStatics const& f) { return f.RequestStoreAsync(); });
|
|
}
|
|
}
|
|
namespace std
|
|
{
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template<> struct hash<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore2> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::ApplicationModel::Wallet::System::IWalletManagerSystemStatics> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::ApplicationModel::Wallet::System::WalletItemSystemStore> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::ApplicationModel::Wallet::System::WalletManagerSystem> : winrt::impl::hash_base {};
|
|
#endif
|
|
#ifdef __cpp_lib_format
|
|
#endif
|
|
}
|
|
#endif
|