// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Networking_BackgroundTransfer_H #define WINRT_Windows_Networking_BackgroundTransfer_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.Networking.h" #include "winrt/impl/Windows.ApplicationModel.Background.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Security.Credentials.2.h" #include "winrt/impl/Windows.Storage.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.UI.Notifications.2.h" #include "winrt/impl/Windows.Web.2.h" #include "winrt/impl/Windows.Networking.BackgroundTransfer.2.h" namespace winrt::impl { template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader::CreateDownload(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::Storage::IStorageFile const& resultFile) const { void* operation{}; 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->CreateDownload(*(void**)(&uri), *(void**)(&resultFile), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateDownload(*(void**)(&uri), *(void**)(&resultFile), &operation)); } return winrt::Windows::Networking::BackgroundTransfer::DownloadOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader::CreateDownload(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::Storage::IStorageFile const& resultFile, winrt::Windows::Storage::IStorageFile const& requestBodyFile) const { void* operation{}; 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->CreateDownloadFromFile(*(void**)(&uri), *(void**)(&resultFile), *(void**)(&requestBodyFile), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateDownloadFromFile(*(void**)(&uri), *(void**)(&resultFile), *(void**)(&requestBodyFile), &operation)); } return winrt::Windows::Networking::BackgroundTransfer::DownloadOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader::CreateDownloadAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::Storage::IStorageFile const& resultFile, winrt::Windows::Storage::Streams::IInputStream const& requestBodyStream) const { void* operation{}; 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->CreateDownloadAsync(*(void**)(&uri), *(void**)(&resultFile), *(void**)(&requestBodyStream), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateDownloadAsync(*(void**)(&uri), *(void**)(&resultFile), *(void**)(&requestBodyStream), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader2::TransferGroup() 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_TransferGroup(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TransferGroup(&value)); } return winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferGroup{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader2::TransferGroup(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferGroup const& 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_TransferGroup(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_TransferGroup(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader2::SuccessToastNotification() 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_SuccessToastNotification(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SuccessToastNotification(&value)); } return winrt::Windows::UI::Notifications::ToastNotification{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader2::SuccessToastNotification(winrt::Windows::UI::Notifications::ToastNotification const& 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_SuccessToastNotification(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SuccessToastNotification(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader2::FailureToastNotification() 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_FailureToastNotification(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FailureToastNotification(&value)); } return winrt::Windows::UI::Notifications::ToastNotification{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader2::FailureToastNotification(winrt::Windows::UI::Notifications::ToastNotification const& 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_FailureToastNotification(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_FailureToastNotification(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader2::SuccessTileNotification() 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_SuccessTileNotification(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SuccessTileNotification(&value)); } return winrt::Windows::UI::Notifications::TileNotification{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader2::SuccessTileNotification(winrt::Windows::UI::Notifications::TileNotification const& 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_SuccessTileNotification(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SuccessTileNotification(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader2::FailureTileNotification() 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_FailureTileNotification(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FailureTileNotification(&value)); } return winrt::Windows::UI::Notifications::TileNotification{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader2::FailureTileNotification(winrt::Windows::UI::Notifications::TileNotification const& 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_FailureTileNotification(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_FailureTileNotification(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloader3::CompletionGroup() 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_CompletionGroup(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CompletionGroup(&value)); } return winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroup{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloaderFactory::CreateWithCompletionGroup(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroup const& completionGroup) const { void* backgroundDownloader{}; 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->CreateWithCompletionGroup(*(void**)(&completionGroup), &backgroundDownloader)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithCompletionGroup(*(void**)(&completionGroup), &backgroundDownloader)); } return winrt::Windows::Networking::BackgroundTransfer::BackgroundDownloader{ backgroundDownloader, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloaderStaticMethods::GetCurrentDownloadsAsync() const { void* operation{}; 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->GetCurrentDownloadsAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentDownloadsAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloaderStaticMethods::GetCurrentDownloadsAsync(param::hstring const& group) const { void* operation{}; 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->GetCurrentDownloadsForGroupAsync(*(void**)(&group), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentDownloadsForGroupAsync(*(void**)(&group), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloaderStaticMethods2::GetCurrentDownloadsForTransferGroupAsync(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferGroup const& group) const { void* operation{}; 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->GetCurrentDownloadsForTransferGroupAsync(*(void**)(&group), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentDownloadsForTransferGroupAsync(*(void**)(&group), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundDownloaderUserConsent::RequestUnconstrainedDownloadsAsync(param::async_iterable const& operations) const { void* operation{}; 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->RequestUnconstrainedDownloadsAsync(*(void**)(&operations), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestUnconstrainedDownloadsAsync(*(void**)(&operations), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferBase::SetRequestHeader(param::hstring const& headerName, param::hstring const& headerValue) 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->SetRequestHeader(*(void**)(&headerName), *(void**)(&headerValue))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetRequestHeader(*(void**)(&headerName), *(void**)(&headerValue))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferBase::ServerCredential() const { void* credential{}; 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_ServerCredential(&credential)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ServerCredential(&credential)); } return winrt::Windows::Security::Credentials::PasswordCredential{ credential, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferBase::ServerCredential(winrt::Windows::Security::Credentials::PasswordCredential const& credential) 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_ServerCredential(*(void**)(&credential))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ServerCredential(*(void**)(&credential))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferBase::ProxyCredential() const { void* credential{}; 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_ProxyCredential(&credential)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProxyCredential(&credential)); } return winrt::Windows::Security::Credentials::PasswordCredential{ credential, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferBase::ProxyCredential(winrt::Windows::Security::Credentials::PasswordCredential const& credential) 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_ProxyCredential(*(void**)(&credential))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ProxyCredential(*(void**)(&credential))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferBase::Method() 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_Method(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Method(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferBase::Method(param::hstring const& 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_Method(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Method(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferBase::Group() 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_Group(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Group(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferBase::Group(param::hstring const& 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_Group(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Group(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferBase::CostPolicy() const { winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferCostPolicy 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_CostPolicy(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CostPolicy(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferBase::CostPolicy(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferCostPolicy const& 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_CostPolicy(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CostPolicy(static_cast(value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferCompletionGroup::Trigger() 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_Trigger(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Trigger(&value)); } return winrt::Windows::ApplicationModel::Background::IBackgroundTrigger{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferCompletionGroup::IsEnabled() 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_IsEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsEnabled(&value)); } return value; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferCompletionGroup::Enable() 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->Enable()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Enable()); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferCompletionGroupTriggerDetails::Downloads() 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_Downloads(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Downloads(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferCompletionGroupTriggerDetails::Uploads() 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_Uploads(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Uploads(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferContentPart::SetHeader(param::hstring const& headerName, param::hstring const& headerValue) 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->SetHeader(*(void**)(&headerName), *(void**)(&headerValue))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetHeader(*(void**)(&headerName), *(void**)(&headerValue))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferContentPart::SetText(param::hstring const& 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->SetText(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetText(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferContentPart::SetFile(winrt::Windows::Storage::IStorageFile const& 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->SetFile(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetFile(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferContentPartFactory::CreateWithName(param::hstring const& name) 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->CreateWithName(*(void**)(&name), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithName(*(void**)(&name), &value)); } return winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferContentPart{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferContentPartFactory::CreateWithNameAndFileName(param::hstring const& name, param::hstring const& fileName) 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->CreateWithNameAndFileName(*(void**)(&name), *(void**)(&fileName), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithNameAndFileName(*(void**)(&name), *(void**)(&fileName), &value)); } return winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferContentPart{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferErrorStaticMethods::GetStatus(int32_t hresult) const { winrt::Windows::Web::WebErrorStatus status{}; 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->GetStatus(hresult, reinterpret_cast(&status))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetStatus(hresult, reinterpret_cast(&status))); } return status; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferGroup::Name() 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_Name(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Name(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferGroup::TransferBehavior() const { winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferBehavior 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_TransferBehavior(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TransferBehavior(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferGroup::TransferBehavior(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferBehavior const& 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_TransferBehavior(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_TransferBehavior(static_cast(value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferGroupStatics::CreateGroup(param::hstring const& name) 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->CreateGroup(*(void**)(&name), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateGroup(*(void**)(&name), &value)); } return winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferGroup{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferOperation::Guid() const { winrt::guid 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_Guid(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Guid(put_abi(value))); } return value; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferOperation::RequestedUri() 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_RequestedUri(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RequestedUri(&value)); } return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferOperation::Method() 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_Method(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Method(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferOperation::Group() 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_Group(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Group(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferOperation::CostPolicy() const { winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferCostPolicy 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_CostPolicy(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CostPolicy(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferOperation::CostPolicy(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferCostPolicy const& 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_CostPolicy(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CostPolicy(static_cast(value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferOperation::GetResultStreamAt(uint64_t position) 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->GetResultStreamAt(position, &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetResultStreamAt(position, &value)); } return winrt::Windows::Storage::Streams::IInputStream{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferOperation::GetResponseInformation() 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->GetResponseInformation(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetResponseInformation(&value)); } return winrt::Windows::Networking::BackgroundTransfer::ResponseInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferOperationPriority::Priority() const { winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferPriority 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_Priority(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Priority(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferOperationPriority::Priority(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferPriority const& 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_Priority(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Priority(static_cast(value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferRangesDownloadedEventArgs::WasDownloadRestarted() 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_WasDownloadRestarted(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WasDownloadRestarted(&value)); } return value; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferRangesDownloadedEventArgs::AddedRanges() 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_AddedRanges(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AddedRanges(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundTransferRangesDownloadedEventArgs::GetDeferral() const { void* result{}; 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(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&result)); } return winrt::Windows::Foundation::Deferral{ result, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader::CreateUpload(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::Storage::IStorageFile const& sourceFile) const { void* operation{}; 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->CreateUpload(*(void**)(&uri), *(void**)(&sourceFile), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateUpload(*(void**)(&uri), *(void**)(&sourceFile), &operation)); } return winrt::Windows::Networking::BackgroundTransfer::UploadOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader::CreateUploadFromStreamAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::Storage::Streams::IInputStream const& sourceStream) const { void* operation{}; 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->CreateUploadFromStreamAsync(*(void**)(&uri), *(void**)(&sourceStream), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateUploadFromStreamAsync(*(void**)(&uri), *(void**)(&sourceStream), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader::CreateUploadAsync(winrt::Windows::Foundation::Uri const& uri, param::async_iterable const& parts) const { void* operation{}; 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->CreateUploadWithFormDataAndAutoBoundaryAsync(*(void**)(&uri), *(void**)(&parts), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateUploadWithFormDataAndAutoBoundaryAsync(*(void**)(&uri), *(void**)(&parts), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader::CreateUploadAsync(winrt::Windows::Foundation::Uri const& uri, param::async_iterable const& parts, param::hstring const& subType) const { void* operation{}; 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->CreateUploadWithSubTypeAsync(*(void**)(&uri), *(void**)(&parts), *(void**)(&subType), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateUploadWithSubTypeAsync(*(void**)(&uri), *(void**)(&parts), *(void**)(&subType), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader::CreateUploadAsync(winrt::Windows::Foundation::Uri const& uri, param::async_iterable const& parts, param::hstring const& subType, param::hstring const& boundary) const { void* operation{}; 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->CreateUploadWithSubTypeAndBoundaryAsync(*(void**)(&uri), *(void**)(&parts), *(void**)(&subType), *(void**)(&boundary), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateUploadWithSubTypeAndBoundaryAsync(*(void**)(&uri), *(void**)(&parts), *(void**)(&subType), *(void**)(&boundary), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader2::TransferGroup() 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_TransferGroup(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TransferGroup(&value)); } return winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferGroup{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader2::TransferGroup(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferGroup const& 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_TransferGroup(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_TransferGroup(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader2::SuccessToastNotification() 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_SuccessToastNotification(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SuccessToastNotification(&value)); } return winrt::Windows::UI::Notifications::ToastNotification{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader2::SuccessToastNotification(winrt::Windows::UI::Notifications::ToastNotification const& 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_SuccessToastNotification(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SuccessToastNotification(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader2::FailureToastNotification() 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_FailureToastNotification(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FailureToastNotification(&value)); } return winrt::Windows::UI::Notifications::ToastNotification{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader2::FailureToastNotification(winrt::Windows::UI::Notifications::ToastNotification const& 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_FailureToastNotification(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_FailureToastNotification(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader2::SuccessTileNotification() 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_SuccessTileNotification(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SuccessTileNotification(&value)); } return winrt::Windows::UI::Notifications::TileNotification{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader2::SuccessTileNotification(winrt::Windows::UI::Notifications::TileNotification const& 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_SuccessTileNotification(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SuccessTileNotification(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader2::FailureTileNotification() 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_FailureTileNotification(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FailureTileNotification(&value)); } return winrt::Windows::UI::Notifications::TileNotification{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader2::FailureTileNotification(winrt::Windows::UI::Notifications::TileNotification const& 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_FailureTileNotification(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_FailureTileNotification(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploader3::CompletionGroup() 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_CompletionGroup(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CompletionGroup(&value)); } return winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroup{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploaderFactory::CreateWithCompletionGroup(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroup const& completionGroup) const { void* backgroundUploader{}; 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->CreateWithCompletionGroup(*(void**)(&completionGroup), &backgroundUploader)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithCompletionGroup(*(void**)(&completionGroup), &backgroundUploader)); } return winrt::Windows::Networking::BackgroundTransfer::BackgroundUploader{ backgroundUploader, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploaderStaticMethods::GetCurrentUploadsAsync() const { void* operation{}; 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->GetCurrentUploadsAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentUploadsAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploaderStaticMethods::GetCurrentUploadsAsync(param::hstring const& group) const { void* operation{}; 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->GetCurrentUploadsForGroupAsync(*(void**)(&group), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentUploadsForGroupAsync(*(void**)(&group), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploaderStaticMethods2::GetCurrentUploadsForTransferGroupAsync(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferGroup const& group) const { void* operation{}; 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->GetCurrentUploadsForTransferGroupAsync(*(void**)(&group), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentUploadsForTransferGroupAsync(*(void**)(&group), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IBackgroundUploaderUserConsent::RequestUnconstrainedUploadsAsync(param::async_iterable const& operations) const { void* operation{}; 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->RequestUnconstrainedUploadsAsync(*(void**)(&operations), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestUnconstrainedUploadsAsync(*(void**)(&operations), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IContentPrefetcher::ContentUris() 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_ContentUris(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ContentUris(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IContentPrefetcher::IndirectContentUri(winrt::Windows::Foundation::Uri const& 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_IndirectContentUri(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IndirectContentUri(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IContentPrefetcher::IndirectContentUri() 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_IndirectContentUri(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IndirectContentUri(&value)); } return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IContentPrefetcherTime::LastSuccessfulPrefetchTime() 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_LastSuccessfulPrefetchTime(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LastSuccessfulPrefetchTime(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation::ResultFile() 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_ResultFile(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ResultFile(&value)); } return winrt::Windows::Storage::IStorageFile{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation::Progress() const { winrt::Windows::Networking::BackgroundTransfer::BackgroundDownloadProgress 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_Progress(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Progress(put_abi(value))); } return value; } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation::StartAsync() const { void* operation{}; 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->StartAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StartAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation::AttachAsync() const { void* operation{}; 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->AttachAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AttachAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation::Pause() 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->Pause()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Pause()); } } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation::Resume() 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->Resume()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Resume()); } } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation2::TransferGroup() 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_TransferGroup(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TransferGroup(&value)); } return winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferGroup{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation3::IsRandomAccessRequired() 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_IsRandomAccessRequired(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsRandomAccessRequired(&value)); } return value; } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation3::IsRandomAccessRequired(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_IsRandomAccessRequired(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsRandomAccessRequired(value)); } } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation3::GetResultRandomAccessStreamReference() const { void* stream{}; 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->GetResultRandomAccessStreamReference(&stream)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetResultRandomAccessStreamReference(&stream)); } return winrt::Windows::Storage::Streams::IRandomAccessStreamReference{ stream, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation3::GetDownloadedRanges() 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->GetDownloadedRanges(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDownloadedRanges(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation3::RangesDownloaded(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { winrt::event_token eventCookie{}; 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_RangesDownloaded(*(void**)(&eventHandler), put_abi(eventCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_RangesDownloaded(*(void**)(&eventHandler), put_abi(eventCookie))); } return eventCookie; } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation3::RangesDownloaded(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, RangesDownloaded(eventHandler)); } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation3::RangesDownloaded(winrt::event_token const& eventCookie) 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_RangesDownloaded(impl::bind_in(eventCookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_RangesDownloaded(impl::bind_in(eventCookie)); } } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation3::RequestedUri(winrt::Windows::Foundation::Uri const& 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_RequestedUri(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_RequestedUri(*(void**)(&value))); } } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation3::RecoverableWebErrorStatuses() 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_RecoverableWebErrorStatuses(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RecoverableWebErrorStatuses(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation3::CurrentWebErrorStatus() 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_CurrentWebErrorStatus(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentWebErrorStatus(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation4::MakeCurrentInTransferGroup() 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->MakeCurrentInTransferGroup()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->MakeCurrentInTransferGroup()); } } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation5::SetRequestHeader(param::hstring const& headerName, param::hstring const& headerValue) 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->SetRequestHeader(*(void**)(&headerName), *(void**)(&headerValue))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetRequestHeader(*(void**)(&headerName), *(void**)(&headerValue))); } } template auto consume_Windows_Networking_BackgroundTransfer_IDownloadOperation5::RemoveRequestHeader(param::hstring const& headerName) 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->RemoveRequestHeader(*(void**)(&headerName))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RemoveRequestHeader(*(void**)(&headerName))); } } template auto consume_Windows_Networking_BackgroundTransfer_IResponseInformation::IsResumable() 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_IsResumable(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsResumable(&value)); } return value; } template auto consume_Windows_Networking_BackgroundTransfer_IResponseInformation::ActualUri() 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_ActualUri(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ActualUri(&value)); } return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IResponseInformation::StatusCode() 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_StatusCode(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StatusCode(&value)); } return value; } template auto consume_Windows_Networking_BackgroundTransfer_IResponseInformation::Headers() 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_Headers(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Headers(&value)); } return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IUnconstrainedTransferRequestResult::IsUnconstrained() 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_IsUnconstrained(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsUnconstrained(&value)); } return value; } template auto consume_Windows_Networking_BackgroundTransfer_IUploadOperation::SourceFile() 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_SourceFile(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SourceFile(&value)); } return winrt::Windows::Storage::IStorageFile{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IUploadOperation::Progress() const { winrt::Windows::Networking::BackgroundTransfer::BackgroundUploadProgress 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_Progress(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Progress(put_abi(value))); } return value; } template auto consume_Windows_Networking_BackgroundTransfer_IUploadOperation::StartAsync() const { void* operation{}; 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->StartAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StartAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IUploadOperation::AttachAsync() const { void* operation{}; 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->AttachAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AttachAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IUploadOperation2::TransferGroup() 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_TransferGroup(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TransferGroup(&value)); } return winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferGroup{ value, take_ownership_from_abi }; } template auto consume_Windows_Networking_BackgroundTransfer_IUploadOperation3::MakeCurrentInTransferGroup() 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->MakeCurrentInTransferGroup()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->MakeCurrentInTransferGroup()); } } template auto consume_Windows_Networking_BackgroundTransfer_IUploadOperation4::SetRequestHeader(param::hstring const& headerName, param::hstring const& headerValue) 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->SetRequestHeader(*(void**)(&headerName), *(void**)(&headerValue))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetRequestHeader(*(void**)(&headerName), *(void**)(&headerValue))); } } template auto consume_Windows_Networking_BackgroundTransfer_IUploadOperation4::RemoveRequestHeader(param::hstring const& headerName) 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->RemoveRequestHeader(*(void**)(&headerName))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RemoveRequestHeader(*(void**)(&headerName))); } } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateDownload(void* uri, void* resultFile, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().CreateDownload(*reinterpret_cast(&uri), *reinterpret_cast(&resultFile))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateDownloadFromFile(void* uri, void* resultFile, void* requestBodyFile, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().CreateDownload(*reinterpret_cast(&uri), *reinterpret_cast(&resultFile), *reinterpret_cast(&requestBodyFile))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateDownloadAsync(void* uri, void* resultFile, void* requestBodyStream, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateDownloadAsync(*reinterpret_cast(&uri), *reinterpret_cast(&resultFile), *reinterpret_cast(&requestBodyStream))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_TransferGroup(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TransferGroup()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_TransferGroup(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TransferGroup(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SuccessToastNotification(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SuccessToastNotification()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SuccessToastNotification(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SuccessToastNotification(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FailureToastNotification(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FailureToastNotification()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_FailureToastNotification(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().FailureToastNotification(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SuccessTileNotification(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SuccessTileNotification()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SuccessTileNotification(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SuccessTileNotification(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FailureTileNotification(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FailureTileNotification()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_FailureTileNotification(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().FailureTileNotification(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CompletionGroup(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CompletionGroup()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWithCompletionGroup(void* completionGroup, void** backgroundDownloader) noexcept final try { clear_abi(backgroundDownloader); typename D::abi_guard guard(this->shim()); *backgroundDownloader = detach_from(this->shim().CreateWithCompletionGroup(*reinterpret_cast(&completionGroup))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetCurrentDownloadsAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetCurrentDownloadsAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCurrentDownloadsForGroupAsync(void* group, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetCurrentDownloadsAsync(*reinterpret_cast(&group))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetCurrentDownloadsForTransferGroupAsync(void* group, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetCurrentDownloadsForTransferGroupAsync(*reinterpret_cast(&group))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RequestUnconstrainedDownloadsAsync(void* operations, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestUnconstrainedDownloadsAsync(*reinterpret_cast const*>(&operations))); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall SetRequestHeader(void* headerName, void* headerValue) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetRequestHeader(*reinterpret_cast(&headerName), *reinterpret_cast(&headerValue)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerCredential(void** credential) noexcept final try { clear_abi(credential); typename D::abi_guard guard(this->shim()); *credential = detach_from(this->shim().ServerCredential()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ServerCredential(void* credential) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ServerCredential(*reinterpret_cast(&credential)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProxyCredential(void** credential) noexcept final try { clear_abi(credential); typename D::abi_guard guard(this->shim()); *credential = detach_from(this->shim().ProxyCredential()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ProxyCredential(void* credential) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ProxyCredential(*reinterpret_cast(&credential)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Method(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Method()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Method(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Method(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Group(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Group()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Group(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Group(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CostPolicy(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CostPolicy()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CostPolicy(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CostPolicy(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Trigger(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Trigger()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Enable() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Enable(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Downloads(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Downloads()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Uploads(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Uploads()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall SetHeader(void* headerName, void* headerValue) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetHeader(*reinterpret_cast(&headerName), *reinterpret_cast(&headerValue)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetText(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetText(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetFile(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetFile(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall CreateWithName(void* name, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateWithName(*reinterpret_cast(&name))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithNameAndFileName(void* name, void* fileName, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateWithNameAndFileName(*reinterpret_cast(&name), *reinterpret_cast(&fileName))); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetStatus(int32_t hresult, int32_t* status) noexcept final try { typename D::abi_guard guard(this->shim()); *status = detach_from(this->shim().GetStatus(hresult)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Name(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Name()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TransferBehavior(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TransferBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_TransferBehavior(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TransferBehavior(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateGroup(void* name, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateGroup(*reinterpret_cast(&name))); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_Guid(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Guid()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RequestedUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RequestedUri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Method(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Method()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Group(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Group()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CostPolicy(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CostPolicy()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CostPolicy(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CostPolicy(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetResultStreamAt(uint64_t position, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetResultStreamAt(position)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetResponseInformation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetResponseInformation()); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall get_Priority(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Priority()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Priority(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Priority(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WasDownloadRestarted(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WasDownloadRestarted()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AddedRanges(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().AddedRanges()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = 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 CreateUpload(void* uri, void* sourceFile, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().CreateUpload(*reinterpret_cast(&uri), *reinterpret_cast(&sourceFile))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateUploadFromStreamAsync(void* uri, void* sourceStream, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateUploadFromStreamAsync(*reinterpret_cast(&uri), *reinterpret_cast(&sourceStream))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateUploadWithFormDataAndAutoBoundaryAsync(void* uri, void* parts, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateUploadAsync(*reinterpret_cast(&uri), *reinterpret_cast const*>(&parts))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateUploadWithSubTypeAsync(void* uri, void* parts, void* subType, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateUploadAsync(*reinterpret_cast(&uri), *reinterpret_cast const*>(&parts), *reinterpret_cast(&subType))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateUploadWithSubTypeAndBoundaryAsync(void* uri, void* parts, void* subType, void* boundary, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateUploadAsync(*reinterpret_cast(&uri), *reinterpret_cast const*>(&parts), *reinterpret_cast(&subType), *reinterpret_cast(&boundary))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_TransferGroup(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TransferGroup()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_TransferGroup(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TransferGroup(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SuccessToastNotification(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SuccessToastNotification()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SuccessToastNotification(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SuccessToastNotification(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FailureToastNotification(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FailureToastNotification()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_FailureToastNotification(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().FailureToastNotification(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SuccessTileNotification(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SuccessTileNotification()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SuccessTileNotification(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SuccessTileNotification(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FailureTileNotification(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FailureTileNotification()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_FailureTileNotification(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().FailureTileNotification(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CompletionGroup(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CompletionGroup()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWithCompletionGroup(void* completionGroup, void** backgroundUploader) noexcept final try { clear_abi(backgroundUploader); typename D::abi_guard guard(this->shim()); *backgroundUploader = detach_from(this->shim().CreateWithCompletionGroup(*reinterpret_cast(&completionGroup))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetCurrentUploadsAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetCurrentUploadsAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCurrentUploadsForGroupAsync(void* group, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetCurrentUploadsAsync(*reinterpret_cast(&group))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetCurrentUploadsForTransferGroupAsync(void* group, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetCurrentUploadsForTransferGroupAsync(*reinterpret_cast(&group))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RequestUnconstrainedUploadsAsync(void* operations, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestUnconstrainedUploadsAsync(*reinterpret_cast const*>(&operations))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ContentUris(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ContentUris()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IndirectContentUri(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IndirectContentUri(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IndirectContentUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IndirectContentUri()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_LastSuccessfulPrefetchTime(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().LastSuccessfulPrefetchTime()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ResultFile(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ResultFile()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Progress(struct struct_Windows_Networking_BackgroundTransfer_BackgroundDownloadProgress* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Progress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StartAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().StartAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall AttachAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().AttachAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Pause() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Pause(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Resume() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Resume(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_TransferGroup(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TransferGroup()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsRandomAccessRequired(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsRandomAccessRequired()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsRandomAccessRequired(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsRandomAccessRequired(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetResultRandomAccessStreamReference(void** stream) noexcept final try { clear_abi(stream); typename D::abi_guard guard(this->shim()); *stream = detach_from(this->shim().GetResultRandomAccessStreamReference()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDownloadedRanges(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetDownloadedRanges()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_RangesDownloaded(void* eventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().RangesDownloaded(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_RangesDownloaded(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().RangesDownloaded(*reinterpret_cast(&eventCookie)); return 0; } int32_t __stdcall put_RequestedUri(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RequestedUri(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RecoverableWebErrorStatuses(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().RecoverableWebErrorStatuses()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentWebErrorStatus(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().CurrentWebErrorStatus()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall MakeCurrentInTransferGroup() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MakeCurrentInTransferGroup(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall SetRequestHeader(void* headerName, void* headerValue) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetRequestHeader(*reinterpret_cast(&headerName), *reinterpret_cast(&headerValue)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveRequestHeader(void* headerName) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RemoveRequestHeader(*reinterpret_cast(&headerName)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsResumable(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsResumable()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ActualUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ActualUri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StatusCode(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StatusCode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Headers(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Headers()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsUnconstrained(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsUnconstrained()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SourceFile(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SourceFile()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Progress(struct struct_Windows_Networking_BackgroundTransfer_BackgroundUploadProgress* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Progress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StartAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().StartAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall AttachAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().AttachAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_TransferGroup(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TransferGroup()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall MakeCurrentInTransferGroup() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MakeCurrentInTransferGroup(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall SetRequestHeader(void* headerName, void* headerValue) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetRequestHeader(*reinterpret_cast(&headerName), *reinterpret_cast(&headerValue)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveRequestHeader(void* headerName) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RemoveRequestHeader(*reinterpret_cast(&headerName)); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Networking::BackgroundTransfer { inline BackgroundDownloader::BackgroundDownloader() : BackgroundDownloader(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline BackgroundDownloader::BackgroundDownloader(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroup const& completionGroup) : BackgroundDownloader(impl::call_factory([&](IBackgroundDownloaderFactory const& f) { return f.CreateWithCompletionGroup(completionGroup); })) { } inline auto BackgroundDownloader::GetCurrentDownloadsAsync() { return impl::call_factory_cast>(*)(IBackgroundDownloaderStaticMethods const&), BackgroundDownloader, IBackgroundDownloaderStaticMethods>([](IBackgroundDownloaderStaticMethods const& f) { return f.GetCurrentDownloadsAsync(); }); } inline auto BackgroundDownloader::GetCurrentDownloadsAsync(param::hstring const& group) { return impl::call_factory([&](IBackgroundDownloaderStaticMethods const& f) { return f.GetCurrentDownloadsAsync(group); }); } inline auto BackgroundDownloader::GetCurrentDownloadsForTransferGroupAsync(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferGroup const& group) { return impl::call_factory([&](IBackgroundDownloaderStaticMethods2 const& f) { return f.GetCurrentDownloadsForTransferGroupAsync(group); }); } inline auto BackgroundDownloader::RequestUnconstrainedDownloadsAsync(param::async_iterable const& operations) { return impl::call_factory([&](IBackgroundDownloaderUserConsent const& f) { return f.RequestUnconstrainedDownloadsAsync(operations); }); } inline BackgroundTransferCompletionGroup::BackgroundTransferCompletionGroup() : BackgroundTransferCompletionGroup(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline BackgroundTransferContentPart::BackgroundTransferContentPart() : BackgroundTransferContentPart(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline BackgroundTransferContentPart::BackgroundTransferContentPart(param::hstring const& name) : BackgroundTransferContentPart(impl::call_factory([&](IBackgroundTransferContentPartFactory const& f) { return f.CreateWithName(name); })) { } inline BackgroundTransferContentPart::BackgroundTransferContentPart(param::hstring const& name, param::hstring const& fileName) : BackgroundTransferContentPart(impl::call_factory([&](IBackgroundTransferContentPartFactory const& f) { return f.CreateWithNameAndFileName(name, fileName); })) { } inline auto BackgroundTransferError::GetStatus(int32_t hresult) { return impl::call_factory([&](IBackgroundTransferErrorStaticMethods const& f) { return f.GetStatus(hresult); }); } inline auto BackgroundTransferGroup::CreateGroup(param::hstring const& name) { return impl::call_factory([&](IBackgroundTransferGroupStatics const& f) { return f.CreateGroup(name); }); } inline BackgroundUploader::BackgroundUploader() : BackgroundUploader(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline BackgroundUploader::BackgroundUploader(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferCompletionGroup const& completionGroup) : BackgroundUploader(impl::call_factory([&](IBackgroundUploaderFactory const& f) { return f.CreateWithCompletionGroup(completionGroup); })) { } inline auto BackgroundUploader::GetCurrentUploadsAsync() { return impl::call_factory_cast>(*)(IBackgroundUploaderStaticMethods const&), BackgroundUploader, IBackgroundUploaderStaticMethods>([](IBackgroundUploaderStaticMethods const& f) { return f.GetCurrentUploadsAsync(); }); } inline auto BackgroundUploader::GetCurrentUploadsAsync(param::hstring const& group) { return impl::call_factory([&](IBackgroundUploaderStaticMethods const& f) { return f.GetCurrentUploadsAsync(group); }); } inline auto BackgroundUploader::GetCurrentUploadsForTransferGroupAsync(winrt::Windows::Networking::BackgroundTransfer::BackgroundTransferGroup const& group) { return impl::call_factory([&](IBackgroundUploaderStaticMethods2 const& f) { return f.GetCurrentUploadsForTransferGroupAsync(group); }); } inline auto BackgroundUploader::RequestUnconstrainedUploadsAsync(param::async_iterable const& operations) { return impl::call_factory([&](IBackgroundUploaderUserConsent const& f) { return f.RequestUnconstrainedUploadsAsync(operations); }); } inline auto ContentPrefetcher::ContentUris() { return impl::call_factory_cast(*)(IContentPrefetcher const&), ContentPrefetcher, IContentPrefetcher>([](IContentPrefetcher const& f) { return f.ContentUris(); }); } inline auto ContentPrefetcher::IndirectContentUri(winrt::Windows::Foundation::Uri const& value) { impl::call_factory([&](IContentPrefetcher const& f) { return f.IndirectContentUri(value); }); } inline auto ContentPrefetcher::IndirectContentUri() { return impl::call_factory_cast([](IContentPrefetcher const& f) { return f.IndirectContentUri(); }); } inline auto ContentPrefetcher::LastSuccessfulPrefetchTime() { return impl::call_factory_cast(*)(IContentPrefetcherTime const&), ContentPrefetcher, IContentPrefetcherTime>([](IContentPrefetcherTime const& f) { return f.LastSuccessfulPrefetchTime(); }); } } 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 {}; 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