// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Services_TargetedContent_H #define WINRT_Windows_Services_TargetedContent_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/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.Services.TargetedContent.2.h" namespace winrt::impl { template auto consume_Windows_Services_TargetedContent_ITargetedContentAction::InvokeAsync() const { void* asyncAction{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->InvokeAsync(&asyncAction)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->InvokeAsync(&asyncAction)); } return winrt::Windows::Foundation::IAsyncAction{ asyncAction, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentAvailabilityChangedEventArgs::GetDeferral() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentChangedEventArgs::GetDeferral() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentChangedEventArgs::HasPreviousContentExpired() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_HasPreviousContentExpired(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasPreviousContentExpired(&value)); } return value; } template auto consume_Windows_Services_TargetedContent_ITargetedContentCollection::Id() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Id(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentCollection::ReportInteraction(winrt::Windows::Services::TargetedContent::TargetedContentInteraction const& interaction) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ReportInteraction(static_cast(interaction))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ReportInteraction(static_cast(interaction))); } } template auto consume_Windows_Services_TargetedContent_ITargetedContentCollection::ReportCustomInteraction(param::hstring const& customInteractionName) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ReportCustomInteraction(*(void**)(&customInteractionName))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ReportCustomInteraction(*(void**)(&customInteractionName))); } } template auto consume_Windows_Services_TargetedContent_ITargetedContentCollection::Path() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Path(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Path(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentCollection::Properties() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Properties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Properties(&value)); } return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentCollection::Collections() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Collections(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Collections(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentCollection::Items() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Items(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Items(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentContainer::Id() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Id(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentContainer::Timestamp() const { winrt::Windows::Foundation::DateTime value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Timestamp(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Timestamp(put_abi(value))); } return value; } template auto consume_Windows_Services_TargetedContent_ITargetedContentContainer::Availability() const { winrt::Windows::Services::TargetedContent::TargetedContentAvailability value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Availability(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Availability(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Services_TargetedContent_ITargetedContentContainer::Content() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Content(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Content(&value)); } return winrt::Windows::Services::TargetedContent::TargetedContentCollection{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentContainer::SelectSingleObject(param::hstring const& path) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SelectSingleObject(*(void**)(&path), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SelectSingleObject(*(void**)(&path), &value)); } return winrt::Windows::Services::TargetedContent::TargetedContentObject{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentContainerStatics::GetAsync(param::hstring const& contentId) const { void* asyncOperation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsync(*(void**)(&contentId), &asyncOperation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsync(*(void**)(&contentId), &asyncOperation)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOperation, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentImage::Height() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Height(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Height(&value)); } return value; } template auto consume_Windows_Services_TargetedContent_ITargetedContentImage::Width() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Width(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Width(&value)); } return value; } template auto consume_Windows_Services_TargetedContent_ITargetedContentItem::Path() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Path(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Path(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentItem::ReportInteraction(winrt::Windows::Services::TargetedContent::TargetedContentInteraction const& interaction) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ReportInteraction(static_cast(interaction))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ReportInteraction(static_cast(interaction))); } } template auto consume_Windows_Services_TargetedContent_ITargetedContentItem::ReportCustomInteraction(param::hstring const& customInteractionName) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ReportCustomInteraction(*(void**)(&customInteractionName))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ReportCustomInteraction(*(void**)(&customInteractionName))); } } template auto consume_Windows_Services_TargetedContent_ITargetedContentItem::State() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_State(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_State(&value)); } return winrt::Windows::Services::TargetedContent::TargetedContentItemState{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentItem::Properties() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Properties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Properties(&value)); } return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentItem::Collections() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Collections(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Collections(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentItemState::ShouldDisplay() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ShouldDisplay(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ShouldDisplay(&value)); } return value; } template auto consume_Windows_Services_TargetedContent_ITargetedContentItemState::AppInstallationState() const { winrt::Windows::Services::TargetedContent::TargetedContentAppInstallationState value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AppInstallationState(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppInstallationState(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Services_TargetedContent_ITargetedContentObject::ObjectKind() const { winrt::Windows::Services::TargetedContent::TargetedContentObjectKind value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ObjectKind(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ObjectKind(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Services_TargetedContent_ITargetedContentObject::Collection() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Collection(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Collection(&value)); } return winrt::Windows::Services::TargetedContent::TargetedContentCollection{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentObject::Item() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Item(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Item(&value)); } return winrt::Windows::Services::TargetedContent::TargetedContentItem{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentObject::Value() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Value(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(&value)); } return winrt::Windows::Services::TargetedContent::TargetedContentValue{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentStateChangedEventArgs::GetDeferral() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscription::Id() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Id(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscription::GetContentContainerAsync() const { void* asyncOperation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetContentContainerAsync(&asyncOperation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetContentContainerAsync(&asyncOperation)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOperation, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscription::ContentChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ContentChanged(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ContentChanged(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscription::ContentChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ContentChanged(handler)); } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscription::ContentChanged(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ContentChanged(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ContentChanged(impl::bind_in(cookie)); } } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscription::AvailabilityChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_AvailabilityChanged(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AvailabilityChanged(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscription::AvailabilityChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, AvailabilityChanged(handler)); } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscription::AvailabilityChanged(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_AvailabilityChanged(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AvailabilityChanged(impl::bind_in(cookie)); } } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscription::StateChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_StateChanged(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_StateChanged(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscription::StateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, StateChanged(handler)); } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscription::StateChanged(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_StateChanged(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_StateChanged(impl::bind_in(cookie)); } } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscriptionOptions::SubscriptionId() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SubscriptionId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SubscriptionId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscriptionOptions::AllowPartialContentAvailability() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AllowPartialContentAvailability(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AllowPartialContentAvailability(&value)); } return value; } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscriptionOptions::AllowPartialContentAvailability(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AllowPartialContentAvailability(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AllowPartialContentAvailability(value)); } } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscriptionOptions::CloudQueryParameters() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CloudQueryParameters(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CloudQueryParameters(&value)); } return winrt::Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscriptionOptions::LocalFilters() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_LocalFilters(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LocalFilters(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscriptionOptions::Update() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Update()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Update()); } } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscriptionStatics::GetAsync(param::hstring const& subscriptionId) const { void* asyncOperation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsync(*(void**)(&subscriptionId), &asyncOperation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsync(*(void**)(&subscriptionId), &asyncOperation)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOperation, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentSubscriptionStatics::GetOptions(param::hstring const& subscriptionId) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetOptions(*(void**)(&subscriptionId), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetOptions(*(void**)(&subscriptionId), &value)); } return winrt::Windows::Services::TargetedContent::TargetedContentSubscriptionOptions{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::ValueKind() const { winrt::Windows::Services::TargetedContent::TargetedContentValueKind value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ValueKind(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ValueKind(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::Path() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Path(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Path(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::String() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_String(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_String(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::Uri() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Uri(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Uri(&value)); } return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::Number() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Number(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Number(&value)); } return value; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::Boolean() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Boolean(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Boolean(&value)); } return value; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::File() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_File(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_File(&value)); } return winrt::Windows::Services::TargetedContent::TargetedContentFile{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::ImageFile() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ImageFile(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ImageFile(&value)); } return winrt::Windows::Services::TargetedContent::TargetedContentImage{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::Action() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Action(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Action(&value)); } return winrt::Windows::Services::TargetedContent::TargetedContentAction{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::Strings() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Strings(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Strings(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::Uris() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Uris(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Uris(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::Numbers() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Numbers(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Numbers(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::Booleans() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Booleans(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Booleans(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::Files() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Files(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Files(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::ImageFiles() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ImageFiles(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ImageFiles(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Services_TargetedContent_ITargetedContentValue::Actions() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Actions(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Actions(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall InvokeAsync(void** asyncAction) noexcept final try { clear_abi(asyncAction); typename D::abi_guard guard(this->shim()); *asyncAction = detach_from(this->shim().InvokeAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HasPreviousContentExpired(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasPreviousContentExpired()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ReportInteraction(int32_t interaction) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReportInteraction(*reinterpret_cast(&interaction)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ReportCustomInteraction(void* customInteractionName) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReportCustomInteraction(*reinterpret_cast(&customInteractionName)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Path(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Path()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Collections(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Collections()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Items(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Items()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Timestamp(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Timestamp()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Availability(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Availability()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Content(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Content()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SelectSingleObject(void* path, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectSingleObject(*reinterpret_cast(&path))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsync(void* contentId, void** asyncOperation) noexcept final try { clear_abi(asyncOperation); typename D::abi_guard guard(this->shim()); *asyncOperation = detach_from>(this->shim().GetAsync(*reinterpret_cast(&contentId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Height(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Height()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Width(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Width()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Path(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Path()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ReportInteraction(int32_t interaction) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReportInteraction(*reinterpret_cast(&interaction)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ReportCustomInteraction(void* customInteractionName) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReportCustomInteraction(*reinterpret_cast(&customInteractionName)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_State(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().State()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Collections(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Collections()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ShouldDisplay(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ShouldDisplay()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AppInstallationState(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppInstallationState()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ObjectKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ObjectKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Collection(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Collection()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Item(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Item()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetContentContainerAsync(void** asyncOperation) noexcept final try { clear_abi(asyncOperation); typename D::abi_guard guard(this->shim()); *asyncOperation = detach_from>(this->shim().GetContentContainerAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_ContentChanged(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().ContentChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ContentChanged(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ContentChanged(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_AvailabilityChanged(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().AvailabilityChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AvailabilityChanged(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AvailabilityChanged(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_StateChanged(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().StateChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_StateChanged(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().StateChanged(*reinterpret_cast(&cookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SubscriptionId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SubscriptionId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AllowPartialContentAvailability(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowPartialContentAvailability()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowPartialContentAvailability(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowPartialContentAvailability(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CloudQueryParameters(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().CloudQueryParameters()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LocalFilters(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().LocalFilters()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Update() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Update(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAsync(void* subscriptionId, void** asyncOperation) noexcept final try { clear_abi(asyncOperation); typename D::abi_guard guard(this->shim()); *asyncOperation = detach_from>(this->shim().GetAsync(*reinterpret_cast(&subscriptionId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetOptions(void* subscriptionId, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetOptions(*reinterpret_cast(&subscriptionId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ValueKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ValueKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Path(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Path()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_String(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().String()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Uri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Uri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Number(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Number()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Boolean(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Boolean()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_File(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().File()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ImageFile(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ImageFile()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Action(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Action()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Strings(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Strings()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Uris(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Uris()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Numbers(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Numbers()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Booleans(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Booleans()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Files(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Files()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ImageFiles(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ImageFiles()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Actions(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Actions()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Services::TargetedContent { inline auto TargetedContentContainer::GetAsync(param::hstring const& contentId) { return impl::call_factory([&](ITargetedContentContainerStatics const& f) { return f.GetAsync(contentId); }); } inline auto TargetedContentSubscription::GetAsync(param::hstring const& subscriptionId) { return impl::call_factory([&](ITargetedContentSubscriptionStatics const& f) { return f.GetAsync(subscriptionId); }); } inline auto TargetedContentSubscription::GetOptions(param::hstring const& subscriptionId) { return impl::call_factory([&](ITargetedContentSubscriptionStatics const& f) { return f.GetOptions(subscriptionId); }); } } 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 {}; 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 {}; 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 {}; 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 {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif