// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_ApplicationModel_Store_LicenseManagement_H #define WINRT_Windows_ApplicationModel_Store_LicenseManagement_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.Store.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.Store.LicenseManagement.2.h" namespace winrt::impl { template auto consume_Windows_ApplicationModel_Store_LicenseManagement_ILicenseManagerStatics::AddLicenseAsync(winrt::Windows::Storage::Streams::IBuffer const& license) const { void* action{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseManagerStatics)->AddLicenseAsync(*(void**)(&license), &action)); return winrt::Windows::Foundation::IAsyncAction{ action, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Store_LicenseManagement_ILicenseManagerStatics::GetSatisfactionInfosAsync(param::async_iterable const& contentIds, param::async_iterable const& keyIds) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseManagerStatics)->GetSatisfactionInfosAsync(*(void**)(&contentIds), *(void**)(&keyIds), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Store_LicenseManagement_ILicenseManagerStatics2::RefreshLicensesAsync(winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseRefreshOption const& refreshOption) const { void* action{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseManagerStatics2)->RefreshLicensesAsync(static_cast(refreshOption), &action)); return winrt::Windows::Foundation::IAsyncAction{ action, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Store_LicenseManagement_ILicenseSatisfactionInfo::SatisfiedByDevice() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseSatisfactionInfo)->get_SatisfiedByDevice(&value)); return value; } template auto consume_Windows_ApplicationModel_Store_LicenseManagement_ILicenseSatisfactionInfo::SatisfiedByOpenLicense() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseSatisfactionInfo)->get_SatisfiedByOpenLicense(&value)); return value; } template auto consume_Windows_ApplicationModel_Store_LicenseManagement_ILicenseSatisfactionInfo::SatisfiedByTrial() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseSatisfactionInfo)->get_SatisfiedByTrial(&value)); return value; } template auto consume_Windows_ApplicationModel_Store_LicenseManagement_ILicenseSatisfactionInfo::SatisfiedByPass() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseSatisfactionInfo)->get_SatisfiedByPass(&value)); return value; } template auto consume_Windows_ApplicationModel_Store_LicenseManagement_ILicenseSatisfactionInfo::SatisfiedByInstallMedia() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseSatisfactionInfo)->get_SatisfiedByInstallMedia(&value)); return value; } template auto consume_Windows_ApplicationModel_Store_LicenseManagement_ILicenseSatisfactionInfo::SatisfiedBySignedInUser() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseSatisfactionInfo)->get_SatisfiedBySignedInUser(&value)); return value; } template auto consume_Windows_ApplicationModel_Store_LicenseManagement_ILicenseSatisfactionInfo::IsSatisfied() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseSatisfactionInfo)->get_IsSatisfied(&value)); return value; } template auto consume_Windows_ApplicationModel_Store_LicenseManagement_ILicenseSatisfactionResult::LicenseSatisfactionInfos() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseSatisfactionResult)->get_LicenseSatisfactionInfos(&value)); return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Store_LicenseManagement_ILicenseSatisfactionResult::ExtendedError() const { winrt::hresult value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Store::LicenseManagement::ILicenseSatisfactionResult)->get_ExtendedError(put_abi(value))); return value; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall AddLicenseAsync(void* license, void** action) noexcept final try { clear_abi(action); typename D::abi_guard guard(this->shim()); *action = detach_from(this->shim().AddLicenseAsync(*reinterpret_cast(&license))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetSatisfactionInfosAsync(void* contentIds, void* keyIds, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetSatisfactionInfosAsync(*reinterpret_cast const*>(&contentIds), *reinterpret_cast const*>(&keyIds))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RefreshLicensesAsync(int32_t refreshOption, void** action) noexcept final try { clear_abi(action); typename D::abi_guard guard(this->shim()); *action = detach_from(this->shim().RefreshLicensesAsync(*reinterpret_cast(&refreshOption))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SatisfiedByDevice(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SatisfiedByDevice()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SatisfiedByOpenLicense(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SatisfiedByOpenLicense()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SatisfiedByTrial(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SatisfiedByTrial()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SatisfiedByPass(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SatisfiedByPass()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SatisfiedByInstallMedia(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SatisfiedByInstallMedia()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SatisfiedBySignedInUser(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SatisfiedBySignedInUser()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsSatisfied(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSatisfied()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_LicenseSatisfactionInfos(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().LicenseSatisfactionInfos()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedError()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::ApplicationModel::Store::LicenseManagement { inline auto LicenseManager::AddLicenseAsync(winrt::Windows::Storage::Streams::IBuffer const& license) { return impl::call_factory([&](ILicenseManagerStatics const& f) { return f.AddLicenseAsync(license); }); } inline auto LicenseManager::GetSatisfactionInfosAsync(param::async_iterable const& contentIds, param::async_iterable const& keyIds) { return impl::call_factory([&](ILicenseManagerStatics const& f) { return f.GetSatisfactionInfosAsync(contentIds, keyIds); }); } inline auto LicenseManager::RefreshLicensesAsync(winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseRefreshOption const& refreshOption) { return impl::call_factory([&](ILicenseManagerStatics2 const& f) { return f.RefreshLicensesAsync(refreshOption); }); } } 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 {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif