portable-devtools / msvc /Windows Kits /10 /Include /10.0.26100.0 /cppwinrt /winrt /windows.applicationmodel.extendedexecution.h
| // C++/WinRT v2.0.250303.1 | |
| // Copyright (c) Microsoft Corporation. All rights reserved. | |
| // Licensed under the MIT License. | |
| static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); | |
| namespace winrt::impl | |
| { | |
| template <typename D> auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionRevokedEventArgs<D>::Reason() const | |
| { | |
| winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedReason value{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionRevokedEventArgs>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionRevokedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionRevokedEventArgs>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value))); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionRevokedEventArgs>**)this; | |
| check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value))); | |
| } | |
| return value; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession<D>::Reason() const | |
| { | |
| winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionReason value{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value))); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)this; | |
| check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast<int32_t*>(&value))); | |
| } | |
| return value; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession<D>::Reason(winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionReason const& value) const | |
| { | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->put_Reason(static_cast<int32_t>(value))); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)this; | |
| check_hresult(_winrt_abi_type->put_Reason(static_cast<int32_t>(value))); | |
| } | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession<D>::Description() const | |
| { | |
| void* value{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->get_Description(&value)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)this; | |
| check_hresult(_winrt_abi_type->get_Description(&value)); | |
| } | |
| return hstring{ value, take_ownership_from_abi }; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession<D>::Description(param::hstring const& value) const | |
| { | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->put_Description(*(void**)(&value))); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)this; | |
| check_hresult(_winrt_abi_type->put_Description(*(void**)(&value))); | |
| } | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession<D>::PercentProgress() const | |
| { | |
| uint32_t value{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->get_PercentProgress(&value)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)this; | |
| check_hresult(_winrt_abi_type->get_PercentProgress(&value)); | |
| } | |
| return value; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession<D>::PercentProgress(uint32_t value) const | |
| { | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->put_PercentProgress(value)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)this; | |
| check_hresult(_winrt_abi_type->put_PercentProgress(value)); | |
| } | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession<D>::Revoked(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Foundation::IInspectable, winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs> const& handler) const | |
| { | |
| winrt::event_token token{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->add_Revoked(*(void**)(&handler), put_abi(token))); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)this; | |
| check_hresult(_winrt_abi_type->add_Revoked(*(void**)(&handler), put_abi(token))); | |
| } | |
| return token; | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession<D>::Revoked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Foundation::IInspectable, winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs> const& handler) const | |
| { | |
| return impl::make_event_revoker<D, Revoked_revoker>(this, Revoked(handler)); | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession<D>::Revoked(winrt::event_token const& token) const noexcept | |
| { | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)&_winrt_casted_result; | |
| _winrt_abi_type->remove_Revoked(impl::bind_in(token)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)this; | |
| _winrt_abi_type->remove_Revoked(impl::bind_in(token)); | |
| } | |
| } | |
| template <typename D> auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession<D>::RequestExtensionAsync() const | |
| { | |
| void* operation{}; | |
| if constexpr (!std::is_same_v<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>) | |
| { | |
| winrt::hresult _winrt_cast_result_code; | |
| auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession, D const*>(static_cast<D const*>(this), _winrt_cast_result_code); | |
| check_hresult(_winrt_cast_result_code); | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)&_winrt_casted_result; | |
| check_hresult(_winrt_abi_type->RequestExtensionAsync(&operation)); | |
| } | |
| else | |
| { | |
| auto const _winrt_abi_type = *(abi_t<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession>**)this; | |
| check_hresult(_winrt_abi_type->RequestExtensionAsync(&operation)); | |
| } | |
| return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionResult>{ operation, take_ownership_from_abi }; | |
| } | |
| template <typename D> | |
| struct produce<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionRevokedEventArgs> : produce_base<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionRevokedEventArgs> | |
| { | |
| int32_t __stdcall get_Reason(int32_t* value) noexcept final try | |
| { | |
| typename D::abi_guard guard(this->shim()); | |
| *value = detach_from<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedReason>(this->shim().Reason()); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| }; | |
| template <typename D> | |
| struct produce<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession> : produce_base<D, winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession> | |
| { | |
| int32_t __stdcall get_Reason(int32_t* value) noexcept final try | |
| { | |
| typename D::abi_guard guard(this->shim()); | |
| *value = detach_from<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionReason>(this->shim().Reason()); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall put_Reason(int32_t value) noexcept final try | |
| { | |
| typename D::abi_guard guard(this->shim()); | |
| this->shim().Reason(*reinterpret_cast<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionReason const*>(&value)); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall get_Description(void** value) noexcept final try | |
| { | |
| clear_abi(value); | |
| typename D::abi_guard guard(this->shim()); | |
| *value = detach_from<hstring>(this->shim().Description()); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall put_Description(void* value) noexcept final try | |
| { | |
| typename D::abi_guard guard(this->shim()); | |
| this->shim().Description(*reinterpret_cast<hstring const*>(&value)); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall get_PercentProgress(uint32_t* value) noexcept final try | |
| { | |
| typename D::abi_guard guard(this->shim()); | |
| *value = detach_from<uint32_t>(this->shim().PercentProgress()); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall put_PercentProgress(uint32_t value) noexcept final try | |
| { | |
| typename D::abi_guard guard(this->shim()); | |
| this->shim().PercentProgress(value); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall add_Revoked(void* handler, winrt::event_token* token) noexcept final try | |
| { | |
| zero_abi<winrt::event_token>(token); | |
| typename D::abi_guard guard(this->shim()); | |
| *token = detach_from<winrt::event_token>(this->shim().Revoked(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Foundation::IInspectable, winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs> const*>(&handler))); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| int32_t __stdcall remove_Revoked(winrt::event_token token) noexcept final | |
| { | |
| typename D::abi_guard guard(this->shim()); | |
| this->shim().Revoked(*reinterpret_cast<winrt::event_token const*>(&token)); | |
| return 0; | |
| } | |
| int32_t __stdcall RequestExtensionAsync(void** operation) noexcept final try | |
| { | |
| clear_abi(operation); | |
| typename D::abi_guard guard(this->shim()); | |
| *operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionResult>>(this->shim().RequestExtensionAsync()); | |
| return 0; | |
| } | |
| catch (...) { return to_hresult(); } | |
| }; | |
| } | |
| WINRT_EXPORT namespace winrt::Windows::ApplicationModel::ExtendedExecution | |
| { | |
| inline ExtendedExecutionSession::ExtendedExecutionSession() : | |
| ExtendedExecutionSession(impl::call_factory_cast<ExtendedExecutionSession(*)(winrt::Windows::Foundation::IActivationFactory const&), ExtendedExecutionSession>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ExtendedExecutionSession>(); })) | |
| { | |
| } | |
| } | |
| namespace std | |
| { | |
| template<> struct hash<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionRevokedEventArgs> : winrt::impl::hash_base {}; | |
| template<> struct hash<winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession> : winrt::impl::hash_base {}; | |
| template<> struct hash<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs> : winrt::impl::hash_base {}; | |
| template<> struct hash<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession> : winrt::impl::hash_base {}; | |
| } | |