// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_UI_Shell_Tasks_H #define WINRT_Windows_UI_Shell_Tasks_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.UI.Shell.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.UI.Shell.Tasks.2.h" namespace winrt::impl { template auto consume_Windows_UI_Shell_Tasks_IAppTaskContent::AddButton(param::hstring const& text, winrt::Windows::Foundation::Uri const& actionUri) 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->AddButton(*(void**)(&text), *(void**)(&actionUri))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AddButton(*(void**)(&text), *(void**)(&actionUri))); } } template auto consume_Windows_UI_Shell_Tasks_IAppTaskContent::SetTextInput(param::hstring const& placeholderText, param::hstring const& actionUriTemplate) 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->SetTextInput(*(void**)(&placeholderText), *(void**)(&actionUriTemplate))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetTextInput(*(void**)(&placeholderText), *(void**)(&actionUriTemplate))); } } template auto consume_Windows_UI_Shell_Tasks_IAppTaskContent::SetQuestion(param::hstring const& question) 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->SetQuestion(*(void**)(&question))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetQuestion(*(void**)(&question))); } } template auto consume_Windows_UI_Shell_Tasks_IAppTaskContentStatics::CreateSequenceOfSteps(array_view completedSteps, param::hstring const& executingStep) 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->CreateSequenceOfSteps(completedSteps.size(), get_abi(completedSteps), *(void**)(&executingStep), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateSequenceOfSteps(completedSteps.size(), get_abi(completedSteps), *(void**)(&executingStep), &result)); } return winrt::Windows::UI::Shell::Tasks::AppTaskContent{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskContentStatics::CreatePreviewThumbnail(winrt::Windows::Foundation::Uri const& imageUri, param::hstring const& executingStep) 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->CreatePreviewThumbnail(*(void**)(&imageUri), *(void**)(&executingStep), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreatePreviewThumbnail(*(void**)(&imageUri), *(void**)(&executingStep), &result)); } return winrt::Windows::UI::Shell::Tasks::AppTaskContent{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskContentStatics::CreateTextSummaryResult(param::hstring const& text) 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->CreateTextSummaryResult(*(void**)(&text), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateTextSummaryResult(*(void**)(&text), &result)); } return winrt::Windows::UI::Shell::Tasks::AppTaskContent{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskContentStatics::CreateGeneratedAssetsResult(array_view assets) 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->CreateGeneratedAssetsResult(assets.size(), get_abi(assets), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateGeneratedAssetsResult(assets.size(), get_abi(assets), &result)); } return winrt::Windows::UI::Shell::Tasks::AppTaskContent{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskContentStatics::MaxButtons() 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_MaxButtons(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxButtons(&value)); } return value; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo::Remove() 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->Remove()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Remove()); } } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo::Update(winrt::Windows::UI::Shell::Tasks::AppTaskState const& state, winrt::Windows::UI::Shell::Tasks::AppTaskContent const& content) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Update(static_cast(state), *(void**)(&content))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Update(static_cast(state), *(void**)(&content))); } } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo::UpdateState(winrt::Windows::UI::Shell::Tasks::AppTaskState const& state) 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->UpdateState(static_cast(state))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UpdateState(static_cast(state))); } } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo::UpdateTitles(param::hstring const& title, param::hstring const& subtitle) 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->UpdateTitles(*(void**)(&title), *(void**)(&subtitle))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UpdateTitles(*(void**)(&title), *(void**)(&subtitle))); } } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo::GetCompletedSteps() const { uint32_t result_impl_size{}; 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->GetCompletedSteps(&result_impl_size, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCompletedSteps(&result_impl_size, &result)); } return com_array{ result, result_impl_size, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo::GetExecutingStep() 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->GetExecutingStep(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetExecutingStep(&result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo::Title() 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_Title(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Title(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo::Subtitle() 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_Subtitle(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Subtitle(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo::DeepLink() 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_DeepLink(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeepLink(&value)); } return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo::IconUri() 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_IconUri(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IconUri(&value)); } return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo::State() const { winrt::Windows::UI::Shell::Tasks::AppTaskState value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_State(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_State(reinterpret_cast(&value))); } return value; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo::StartTime() const { winrt::Windows::Foundation::DateTime value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_StartTime(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StartTime(put_abi(value))); } return value; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo::EndTime() 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_EndTime(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EndTime(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo2::Id() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Id(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo2::HiddenByUser() 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_HiddenByUser(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HiddenByUser(&value)); } return value; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfo2::UpdateDeepLink(winrt::Windows::Foundation::Uri const& deepLink) 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->UpdateDeepLink(*(void**)(&deepLink))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UpdateDeepLink(*(void**)(&deepLink))); } } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfoStatics::IsSupported() const { bool 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->IsSupported(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsSupported(&result)); } return result; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfoStatics::FindAll() const { uint32_t result_impl_size{}; 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->FindAll(&result_impl_size, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAll(&result_impl_size, &result)); } return com_array{ result, result_impl_size, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskInfoStatics::Create(param::hstring const& title, param::hstring const& subtitle, winrt::Windows::Foundation::Uri const& deepLink, winrt::Windows::Foundation::Uri const& iconUri, winrt::Windows::UI::Shell::Tasks::AppTaskContent const& content) 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->Create(*(void**)(&title), *(void**)(&subtitle), *(void**)(&deepLink), *(void**)(&iconUri), *(void**)(&content), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(*(void**)(&title), *(void**)(&subtitle), *(void**)(&deepLink), *(void**)(&iconUri), *(void**)(&content), &result)); } return winrt::Windows::UI::Shell::Tasks::AppTaskInfo{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Shell_Tasks_IAppTaskResultAssetFactory::CreateInstance(param::hstring const& name, param::hstring const& context, winrt::Windows::Foundation::Uri const& iconUri, winrt::Windows::Foundation::Uri const& assetUri) 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->CreateInstance(*(void**)(&name), *(void**)(&context), *(void**)(&iconUri), *(void**)(&assetUri), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&name), *(void**)(&context), *(void**)(&iconUri), *(void**)(&assetUri), &value)); } return winrt::Windows::UI::Shell::Tasks::AppTaskResultAsset{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall AddButton(void* text, void* actionUri) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AddButton(*reinterpret_cast(&text), *reinterpret_cast(&actionUri)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetTextInput(void* placeholderText, void* actionUriTemplate) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetTextInput(*reinterpret_cast(&placeholderText), *reinterpret_cast(&actionUriTemplate)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetQuestion(void* question) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetQuestion(*reinterpret_cast(&question)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateSequenceOfSteps(uint32_t __completedStepsSize, void** completedSteps, void* executingStep, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateSequenceOfSteps(array_view(reinterpret_cast(completedSteps), reinterpret_cast(completedSteps) + __completedStepsSize), *reinterpret_cast(&executingStep))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreatePreviewThumbnail(void* imageUri, void* executingStep, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreatePreviewThumbnail(*reinterpret_cast(&imageUri), *reinterpret_cast(&executingStep))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateTextSummaryResult(void* text, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateTextSummaryResult(*reinterpret_cast(&text))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateGeneratedAssetsResult(uint32_t __assetsSize, void** assets, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateGeneratedAssetsResult(array_view(reinterpret_cast(assets), reinterpret_cast(assets) + __assetsSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxButtons(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxButtons()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Remove() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Remove(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Update(int32_t state, void* content) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Update(*reinterpret_cast(&state), *reinterpret_cast(&content)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpdateState(int32_t state) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UpdateState(*reinterpret_cast(&state)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpdateTitles(void* title, void* subtitle) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UpdateTitles(*reinterpret_cast(&title), *reinterpret_cast(&subtitle)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCompletedSteps(uint32_t* __resultSize, void*** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); std::tie(*__resultSize, *result) = detach_abi(this->shim().GetCompletedSteps()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetExecutingStep(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetExecutingStep()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Title(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Title()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Subtitle(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Subtitle()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DeepLink(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DeepLink()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IconUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IconUri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_State(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().State()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StartTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StartTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_EndTime(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().EndTime()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HiddenByUser(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HiddenByUser()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpdateDeepLink(void* deepLink) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UpdateDeepLink(*reinterpret_cast(&deepLink)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IsSupported(bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAll(uint32_t* __resultSize, void*** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); std::tie(*__resultSize, *result) = detach_abi(this->shim().FindAll()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create(void* title, void* subtitle, void* deepLink, void* iconUri, void* content, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast(&title), *reinterpret_cast(&subtitle), *reinterpret_cast(&deepLink), *reinterpret_cast(&iconUri), *reinterpret_cast(&content))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(void* name, void* context, void* iconUri, void* assetUri, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&name), *reinterpret_cast(&context), *reinterpret_cast(&iconUri), *reinterpret_cast(&assetUri))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::UI::Shell::Tasks { inline auto AppTaskContent::CreateSequenceOfSteps(array_view completedSteps, param::hstring const& executingStep) { return impl::call_factory([&](IAppTaskContentStatics const& f) { return f.CreateSequenceOfSteps(completedSteps, executingStep); }); } inline auto AppTaskContent::CreatePreviewThumbnail(winrt::Windows::Foundation::Uri const& imageUri, param::hstring const& executingStep) { return impl::call_factory([&](IAppTaskContentStatics const& f) { return f.CreatePreviewThumbnail(imageUri, executingStep); }); } inline auto AppTaskContent::CreateTextSummaryResult(param::hstring const& text) { return impl::call_factory([&](IAppTaskContentStatics const& f) { return f.CreateTextSummaryResult(text); }); } inline auto AppTaskContent::CreateGeneratedAssetsResult(array_view assets) { return impl::call_factory([&](IAppTaskContentStatics const& f) { return f.CreateGeneratedAssetsResult(assets); }); } inline auto AppTaskContent::MaxButtons() { return impl::call_factory_cast([](IAppTaskContentStatics const& f) { return f.MaxButtons(); }); } inline auto AppTaskInfo::IsSupported() { return impl::call_factory_cast([](IAppTaskInfoStatics const& f) { return f.IsSupported(); }); } inline auto AppTaskInfo::FindAll() { return impl::call_factory_cast(*)(IAppTaskInfoStatics const&), AppTaskInfo, IAppTaskInfoStatics>([](IAppTaskInfoStatics const& f) { return f.FindAll(); }); } inline auto AppTaskInfo::Create(param::hstring const& title, param::hstring const& subtitle, winrt::Windows::Foundation::Uri const& deepLink, winrt::Windows::Foundation::Uri const& iconUri, winrt::Windows::UI::Shell::Tasks::AppTaskContent const& content) { return impl::call_factory([&](IAppTaskInfoStatics const& f) { return f.Create(title, subtitle, deepLink, iconUri, content); }); } inline AppTaskResultAsset::AppTaskResultAsset(param::hstring const& name, param::hstring const& context, winrt::Windows::Foundation::Uri const& iconUri, winrt::Windows::Foundation::Uri const& assetUri) : AppTaskResultAsset(impl::call_factory([&](IAppTaskResultAssetFactory const& f) { return f.CreateInstance(name, context, iconUri, assetUri); })) { } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif