// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #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.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #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 auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore::GetItemsAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore)->GetItemsAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore::DeleteAsync(winrt::Windows::ApplicationModel::Wallet::WalletItem const& item) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore)->DeleteAsync(*(void**)(&item), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore::ImportItemAsync(winrt::Windows::Storage::Streams::IRandomAccessStreamReference const& stream) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore)->ImportItemAsync(*(void**)(&stream), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore::GetAppStatusForItem(winrt::Windows::ApplicationModel::Wallet::WalletItem const& item) const { winrt::Windows::ApplicationModel::Wallet::System::WalletItemAppAssociation result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore)->GetAppStatusForItem(*(void**)(&item), reinterpret_cast(&result))); return result; } template auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore::LaunchAppForItemAsync(winrt::Windows::ApplicationModel::Wallet::WalletItem const& item) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore)->LaunchAppForItemAsync(*(void**)(&item), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore2::ItemsChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore2)->add_ItemsChanged(*(void**)(&handler), put_abi(cookie))); return cookie; } template auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore2::ItemsChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ItemsChanged(handler)); } template auto consume_Windows_ApplicationModel_Wallet_System_IWalletItemSystemStore2::ItemsChanged(winrt::event_token const& cookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Wallet::System::IWalletItemSystemStore2)->remove_ItemsChanged(impl::bind_in(cookie)); } template auto consume_Windows_ApplicationModel_Wallet_System_IWalletManagerSystemStatics::RequestStoreAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Wallet::System::IWalletManagerSystemStatics)->RequestStoreAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetItemsAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(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(this->shim().DeleteAsync(*reinterpret_cast(&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>(this->shim().ImportItemAsync(*reinterpret_cast(&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(this->shim().GetAppStatusForItem(*reinterpret_cast(&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>(this->shim().LaunchAppForItemAsync(*reinterpret_cast(&item))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_ItemsChanged(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().ItemsChanged(*reinterpret_cast 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(&cookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RequestStoreAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(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(*)(IWalletManagerSystemStatics const&), WalletManagerSystem, IWalletManagerSystemStatics>([](IWalletManagerSystemStatics const& f) { return f.RequestStoreAsync(); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif