// WARNING: Please don't edit this file. It was generated by C++/WinRT // v2.0.250303.1 #pragma once #ifndef WINRT_Windows_System_Power_Thermal_H #define WINRT_Windows_System_Power_Thermal_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.System.Power.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.System.Power.Thermal.2.h" namespace winrt::impl { template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelConfiguration< D>::Id() const { winrt::Windows::System::Power::Thermal::PowerThermalChannelId 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(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(put_abi(value))); } return value; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelConfiguration< D>::ConfigurationString() 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_ConfigurationString(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ConfigurationString(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelConfiguration< D>::GetConfigurationNumericParameters() const { uint32_t result_impl_size{}; int32_t* 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->GetConfigurationNumericParameters( &result_impl_size, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetConfigurationNumericParameters( &result_impl_size, &result)); } return com_array{result, result_impl_size, take_ownership_from_abi}; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataConsumer< D>::GetChannelIds() const { uint32_t result_impl_size{}; struct struct_Windows_System_Power_Thermal_PowerThermalChannelId* 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->GetChannelIds(&result_impl_size, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetChannelIds(&result_impl_size, &result)); } return com_array< winrt::Windows::System::Power::Thermal::PowerThermalChannelId>{ result, result_impl_size, take_ownership_from_abi}; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataConsumer< D>::GetChannelConfigurations() 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->GetChannelConfigurations(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetChannelConfigurations(&result)); } return winrt::Windows::Foundation::Collections::IMapView< winrt::Windows::System::Power::Thermal::PowerThermalChannelId, winrt::Windows::System::Power::Thermal::PowerThermalChannelConfiguration>{ result, take_ownership_from_abi}; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataConsumer< D>::Start() 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->Start()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Start()); } } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataConsumer< D>::Stop() 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->Stop()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Stop()); } } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataConsumer:: ChannelDataReceived(winrt::Windows::Foundation::TypedEventHandler< winrt::Windows::System::Power::Thermal:: PowerThermalChannelDataConsumer, winrt::Windows::System::Power::Thermal:: PowerThermalChannelDataReceivedEventArgs> const& handler) const { winrt::event_token token{}; 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_ChannelDataReceived(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ChannelDataReceived(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataConsumer:: ChannelDataReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Windows::System::Power::Thermal:: PowerThermalChannelDataConsumer, winrt::Windows::System::Power::Thermal:: PowerThermalChannelDataReceivedEventArgs> const& handler) const { return impl::make_event_revoker( this, ChannelDataReceived(handler)); } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataConsumer< D>::ChannelDataReceived(winrt::event_token const& token) 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_ChannelDataReceived(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ChannelDataReceived(impl::bind_in(token)); } } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataConsumer< D>::BackEndStatus() const { winrt::Windows::System::Power::Thermal::PowerThermalBackEndStatus 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_BackEndStatus(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_BackEndStatus(reinterpret_cast(&value))); } return value; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataConsumer:: BackEndStatusChanged( winrt::Windows::Foundation::TypedEventHandler< winrt::Windows::System::Power::Thermal:: PowerThermalChannelDataConsumer, winrt::Windows::Foundation::IInspectable> const& handler) const { winrt::event_token token{}; 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_BackEndStatusChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_BackEndStatusChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataConsumer:: BackEndStatusChanged( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Windows::System::Power::Thermal:: PowerThermalChannelDataConsumer, winrt::Windows::Foundation::IInspectable> const& handler) const { return impl::make_event_revoker( this, BackEndStatusChanged(handler)); } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataConsumer< D>::BackEndStatusChanged(winrt::event_token const& token) 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_BackEndStatusChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_BackEndStatusChanged(impl::bind_in(token)); } } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataConsumerFactory< D>::CreateInstance(array_view channelIds) 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::Windows::System::Power::Thermal:: IPowerThermalChannelDataConsumerFactory>**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateInstance(channelIds.size(), get_abi(channelIds), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateInstance(channelIds.size(), get_abi(channelIds), &value)); } return winrt::Windows::System::Power::Thermal:: PowerThermalChannelDataConsumer{value, take_ownership_from_abi}; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataProducer< D>::GetChannelIds() const { uint32_t result_impl_size{}; struct struct_Windows_System_Power_Thermal_PowerThermalChannelId* 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->GetChannelIds(&result_impl_size, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetChannelIds(&result_impl_size, &result)); } return com_array< winrt::Windows::System::Power::Thermal::PowerThermalChannelId>{ result, result_impl_size, take_ownership_from_abi}; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataProducer< D>::GetChannelConfigurations() 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->GetChannelConfigurations(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetChannelConfigurations(&result)); } return winrt::Windows::Foundation::Collections::IMapView< winrt::Windows::System::Power::Thermal::PowerThermalChannelId, winrt::Windows::System::Power::Thermal::PowerThermalChannelConfiguration>{ result, take_ownership_from_abi}; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataProducer:: DisableChannel( winrt::Windows::System::Power::Thermal::PowerThermalChannelId const& channelId) 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->DisableChannel(impl::bind_in(channelId))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->DisableChannel(impl::bind_in(channelId))); } } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataProducer< D>::Start() 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->Start()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Start()); } } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataProducer< D>::Stop() 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->Stop()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Stop()); } } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataProducer:: PublishInputChannelData(array_view data) 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->PublishInputChannelData(data.size(), get_abi(data))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->PublishInputChannelData(data.size(), get_abi(data))); } } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataProducer< D>::BackEndStatus() const { winrt::Windows::System::Power::Thermal::PowerThermalBackEndStatus 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_BackEndStatus(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_BackEndStatus(reinterpret_cast(&value))); } return value; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataProducer:: BackEndStatusChanged( winrt::Windows::Foundation::TypedEventHandler< winrt::Windows::System::Power::Thermal:: PowerThermalChannelDataProducer, winrt::Windows::Foundation::IInspectable> const& handler) const { winrt::event_token token{}; 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_BackEndStatusChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_BackEndStatusChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataProducer:: BackEndStatusChanged( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Windows::System::Power::Thermal:: PowerThermalChannelDataProducer, winrt::Windows::Foundation::IInspectable> const& handler) const { return impl::make_event_revoker( this, BackEndStatusChanged(handler)); } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataProducer< D>::BackEndStatusChanged(winrt::event_token const& token) 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_BackEndStatusChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_BackEndStatusChanged(impl::bind_in(token)); } } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataProducerFactory< D>::CreateInstance(array_view channelIds) 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::Windows::System::Power::Thermal:: IPowerThermalChannelDataProducerFactory>**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateInstance(channelIds.size(), get_abi(channelIds), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateInstance(channelIds.size(), get_abi(channelIds), &value)); } return winrt::Windows::System::Power::Thermal:: PowerThermalChannelDataProducer{value, take_ownership_from_abi}; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDataReceivedEventArgs< D>::GetData() const { uint32_t result_impl_size{}; struct struct_Windows_System_Power_Thermal_PowerThermalChannelData* result{}; if constexpr (!std::is_same_v< D, winrt::Windows::System::Power::Thermal:: IPowerThermalChannelDataReceivedEventArgs>) { 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::Windows::System::Power::Thermal:: IPowerThermalChannelDataReceivedEventArgs>**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetData(&result_impl_size, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetData(&result_impl_size, &result)); } return com_array< winrt::Windows::System::Power::Thermal::PowerThermalChannelData>{ result, result_impl_size, take_ownership_from_abi}; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDiagnosticsStatics< D>::Current() 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::Windows::System::Power::Thermal:: IPowerThermalChannelDiagnosticsStatics>**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Current(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Current(&value)); } return winrt::Windows::System::Power::Thermal::PowerThermalChannelDiagnostics{ value, take_ownership_from_abi}; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelDiagnosticsStatics< D>::GetDataForChannels(array_view channelIds) const { uint32_t result_impl_size{}; struct struct_Windows_System_Power_Thermal_PowerThermalChannelData* 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::Windows::System::Power::Thermal:: IPowerThermalChannelDiagnosticsStatics>**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDataForChannels( channelIds.size(), get_abi(channelIds), &result_impl_size, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDataForChannels( channelIds.size(), get_abi(channelIds), &result_impl_size, &result)); } return com_array< winrt::Windows::System::Power::Thermal::PowerThermalChannelData>{ result, result_impl_size, take_ownership_from_abi}; } template auto consume_Windows_System_Power_Thermal_IPowerThermalChannelFinderStatics< D>::FindChannels(winrt::guid const& channelInterfaceType) const { uint32_t result_impl_size{}; struct struct_Windows_System_Power_Thermal_PowerThermalChannelId* 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->FindChannels( impl::bind_in(channelInterfaceType), &result_impl_size, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindChannels( impl::bind_in(channelInterfaceType), &result_impl_size, &result)); } return com_array< winrt::Windows::System::Power::Thermal::PowerThermalChannelId>{ result, result_impl_size, take_ownership_from_abi}; } #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Windows::System::Power::Thermal::IPowerThermalChannelConfiguration> : produce_base { int32_t __stdcall get_Id( struct struct_Windows_System_Power_Thermal_PowerThermalChannelId* value) noexcept final try { zero_abi( value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::System::Power::Thermal::PowerThermalChannelId>( this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ConfigurationString(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ConfigurationString()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetConfigurationNumericParameters( uint32_t* __resultSize, int32_t** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); std::tie(*__resultSize, *result) = detach_abi(this->shim().GetConfigurationNumericParameters()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Windows::System::Power::Thermal::IPowerThermalChannelDataConsumer> : produce_base { int32_t __stdcall GetChannelIds( uint32_t* __resultSize, struct struct_Windows_System_Power_Thermal_PowerThermalChannelId** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); std::tie(*__resultSize, *result) = detach_abi(this->shim().GetChannelIds()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetChannelConfigurations(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>( this->shim().GetChannelConfigurations()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Start() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Start(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Stop() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Stop(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_ChannelDataReceived( void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ChannelDataReceived( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ChannelDataReceived( winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ChannelDataReceived( *reinterpret_cast(&token)); return 0; } int32_t __stdcall get_BackEndStatus(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::System::Power::Thermal::PowerThermalBackEndStatus>( this->shim().BackEndStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_BackEndStatusChanged( void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BackEndStatusChanged( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BackEndStatusChanged( winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BackEndStatusChanged( *reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance( uint32_t __channelIdsSize, struct struct_Windows_System_Power_Thermal_PowerThermalChannelId* channelIds, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().CreateInstance( array_view( reinterpret_cast(channelIds), reinterpret_cast(channelIds) + __channelIdsSize))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Windows::System::Power::Thermal::IPowerThermalChannelDataProducer> : produce_base { int32_t __stdcall GetChannelIds( uint32_t* __resultSize, struct struct_Windows_System_Power_Thermal_PowerThermalChannelId** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); std::tie(*__resultSize, *result) = detach_abi(this->shim().GetChannelIds()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetChannelConfigurations(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>( this->shim().GetChannelConfigurations()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DisableChannel( struct struct_Windows_System_Power_Thermal_PowerThermalChannelId channelId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DisableChannel( *reinterpret_cast(&channelId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Start() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Start(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Stop() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Stop(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PublishInputChannelData( uint32_t __dataSize, struct struct_Windows_System_Power_Thermal_PowerThermalChannelData* data) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PublishInputChannelData( array_view( reinterpret_cast(data), reinterpret_cast(data) + __dataSize)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BackEndStatus(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::System::Power::Thermal::PowerThermalBackEndStatus>( this->shim().BackEndStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_BackEndStatusChanged( void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BackEndStatusChanged( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BackEndStatusChanged( winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BackEndStatusChanged( *reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance( uint32_t __channelIdsSize, struct struct_Windows_System_Power_Thermal_PowerThermalChannelId* channelIds, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().CreateInstance( array_view( reinterpret_cast(channelIds), reinterpret_cast(channelIds) + __channelIdsSize))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetData( uint32_t* __resultSize, struct struct_Windows_System_Power_Thermal_PowerThermalChannelData** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); std::tie(*__resultSize, *result) = detach_abi(this->shim().GetData()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Windows::System::Power::Thermal::IPowerThermalChannelDiagnostics> : produce_base {}; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Current(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::System::Power::Thermal::PowerThermalChannelDiagnostics>( this->shim().Current()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDataForChannels( uint32_t __channelIdsSize, struct struct_Windows_System_Power_Thermal_PowerThermalChannelId* channelIds, uint32_t* __resultSize, struct struct_Windows_System_Power_Thermal_PowerThermalChannelData** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); std::tie(*__resultSize, *result) = detach_abi(this->shim().GetDataForChannels( array_view( reinterpret_cast(channelIds), reinterpret_cast(channelIds) + __channelIdsSize))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Windows::System::Power::Thermal::IPowerThermalChannelFinderStatics> : produce_base { int32_t __stdcall FindChannels( winrt::guid channelInterfaceType, uint32_t* __resultSize, struct struct_Windows_System_Power_Thermal_PowerThermalChannelId** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); std::tie(*__resultSize, *result) = detach_abi(this->shim().FindChannels( *reinterpret_cast(&channelInterfaceType))); return 0; } catch (...) { return to_hresult(); } }; #endif } // namespace winrt::impl WINRT_EXPORT namespace winrt::Windows::System::Power::Thermal { inline PowerThermalChannelDataConsumer::PowerThermalChannelDataConsumer( array_view< winrt::Windows::System::Power::Thermal::PowerThermalChannelId const> channelIds) : PowerThermalChannelDataConsumer( impl::call_factory( [&](IPowerThermalChannelDataConsumerFactory const& f) { return f.CreateInstance(channelIds); })) {} inline PowerThermalChannelDataProducer::PowerThermalChannelDataProducer( array_view< winrt::Windows::System::Power::Thermal::PowerThermalChannelId const> channelIds) : PowerThermalChannelDataProducer( impl::call_factory( [&](IPowerThermalChannelDataProducerFactory const& f) { return f.CreateInstance(channelIds); })) {} inline auto PowerThermalChannelDiagnostics::Current() { return impl::call_factory_cast< winrt::Windows::System::Power::Thermal:: PowerThermalChannelDiagnostics (*)( IPowerThermalChannelDiagnosticsStatics const&), PowerThermalChannelDiagnostics, IPowerThermalChannelDiagnosticsStatics>( [](IPowerThermalChannelDiagnosticsStatics const& f) { return f.Current(); }); } inline auto PowerThermalChannelDiagnostics::GetDataForChannels( array_view< winrt::Windows::System::Power::Thermal::PowerThermalChannelId const> channelIds) { return impl::call_factory( [&](IPowerThermalChannelDiagnosticsStatics const& f) { return f.GetDataForChannels(channelIds); }); } inline auto PowerThermalChannelFinder::FindChannels( winrt::guid const& channelInterfaceType) { return impl::call_factory( [&](IPowerThermalChannelFinderStatics const& f) { return f.FindChannels(channelInterfaceType); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template <> struct hash< winrt::Windows::System::Power::Thermal::IPowerThermalChannelConfiguration> : winrt::impl::hash_base {}; template <> struct hash< winrt::Windows::System::Power::Thermal::IPowerThermalChannelDataConsumer> : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash< winrt::Windows::System::Power::Thermal::IPowerThermalChannelDataProducer> : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash< winrt::Windows::System::Power::Thermal::IPowerThermalChannelDiagnostics> : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash< winrt::Windows::System::Power::Thermal::IPowerThermalChannelFinderStatics> : winrt::impl::hash_base {}; template <> struct hash< winrt::Windows::System::Power::Thermal::PowerThermalChannelConfiguration> : winrt::impl::hash_base {}; template <> struct hash< winrt::Windows::System::Power::Thermal::PowerThermalChannelDataConsumer> : winrt::impl::hash_base {}; template <> struct hash< winrt::Windows::System::Power::Thermal::PowerThermalChannelDataProducer> : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash< winrt::Windows::System::Power::Thermal::PowerThermalChannelDiagnostics> : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } // namespace std #endif