// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_ApplicationModel_ExtendedExecution_H #define WINRT_Windows_ApplicationModel_ExtendedExecution_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #include "winrt/Windows.ApplicationModel.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.ApplicationModel.ExtendedExecution.2.h" namespace winrt::impl { template auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionRevokedEventArgs::Reason() const { winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedReason value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionRevokedEventArgs)->get_Reason(reinterpret_cast(&value))); return value; } template auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession::Reason() const { winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionReason value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession)->get_Reason(reinterpret_cast(&value))); return value; } template auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession::Reason(winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionReason const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession)->put_Reason(static_cast(value))); } template auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession::Description() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession)->get_Description(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession::Description(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession)->put_Description(*(void**)(&value))); } template auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession::PercentProgress() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession)->get_PercentProgress(&value)); return value; } template auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession::PercentProgress(uint32_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession)->put_PercentProgress(value)); } template auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession::Revoked(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession)->add_Revoked(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession::Revoked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Revoked(handler)); } template auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession::Revoked(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession)->remove_Revoked(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_ExtendedExecution_IExtendedExecutionSession::RequestExtensionAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::ExtendedExecution::IExtendedExecutionSession)->RequestExtensionAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Reason(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Reason()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Reason(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(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(&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(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(&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(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(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Revoked(*reinterpret_cast 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(&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>(this->shim().RequestExtensionAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::ApplicationModel::ExtendedExecution { inline ExtendedExecutionSession::ExtendedExecutionSession() : ExtendedExecutionSession(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif