// WARNING: Please don't edit this file. It was generated by C++/WinRT // v2.0.250303.1 #pragma once #ifndef WINRT_Microsoft_Windows_AppNotifications_H #define WINRT_Microsoft_Windows_AppNotifications_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/impl/Microsoft.Windows.AppNotifications.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" namespace winrt::impl { template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Tag() 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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_Tag(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Tag(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Tag( 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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_Tag(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Tag(*(void**)(&value))); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_Microsoft_Windows_AppNotifications_IAppNotification::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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_Microsoft_Windows_AppNotifications_IAppNotification::Id() 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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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 value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Payload() 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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_Payload(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Payload(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Progress() 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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Progress(&value)); } return winrt::Microsoft::Windows::AppNotifications:: AppNotificationProgressData{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Progress( winrt::Microsoft::Windows::AppNotifications:: AppNotificationProgressData 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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_Progress(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Progress(*(void**)(&value))); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification< D>::Expiration() 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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_Expiration(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Expiration(put_abi(value))); } return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Expiration( winrt::Windows::Foundation::DateTime 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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_Expiration(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Expiration(impl::bind_in(value))); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification< D>::ExpiresOnReboot() 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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_ExpiresOnReboot(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExpiresOnReboot(&value)); } return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification< D>::ExpiresOnReboot(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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_ExpiresOnReboot(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ExpiresOnReboot(value)); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Priority() const { winrt::Microsoft::Windows::AppNotifications::AppNotificationPriority value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_Microsoft_Windows_AppNotifications_IAppNotification::Priority( winrt::Microsoft::Windows::AppNotifications::AppNotificationPriority 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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_Microsoft_Windows_AppNotifications_IAppNotification< D>::SuppressDisplay() 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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_SuppressDisplay(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SuppressDisplay(&value)); } return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification< D>::SuppressDisplay(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< winrt::Microsoft::Windows::AppNotifications::IAppNotification, D const*>(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_SuppressDisplay(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SuppressDisplay(value)); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationActivatedEventArgs< D>::Argument() 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_Argument(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Argument(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationActivatedEventArgs< D>::UserInput() 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_UserInput(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UserInput(&value)); } return winrt::Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationActivatedEventArgs2< D>::Arguments() 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_Arguments(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Arguments(&value)); } return winrt::Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationFactory< D>::CreateInstance(param::hstring const& payload) 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< winrt::Microsoft::Windows::AppNotifications::IAppNotificationFactory, D const*>(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**)(&payload), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&payload), &value)); } return winrt::Microsoft::Windows::AppNotifications::AppNotification{ value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::Register() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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->Register()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Register()); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::Unregister() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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->Unregister()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Unregister()); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::UnregisterAll() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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->UnregisterAll()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UnregisterAll()); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager:: NotificationInvoked( winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::Windows::AppNotifications::AppNotificationManager, winrt::Microsoft::Windows::AppNotifications:: AppNotificationActivatedEventArgs> 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< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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_NotificationInvoked(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_NotificationInvoked(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager:: NotificationInvoked( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::Windows::AppNotifications::AppNotificationManager, winrt::Microsoft::Windows::AppNotifications:: AppNotificationActivatedEventArgs> const& handler) const { return impl::make_event_revoker( this, NotificationInvoked(handler)); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::NotificationInvoked(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< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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_NotificationInvoked(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_NotificationInvoked(impl::bind_in(token)); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::Show(winrt::Microsoft::Windows::AppNotifications::AppNotification const& notification) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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->Show(*(void**)(¬ification))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Show(*(void**)(¬ification))); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::UpdateAsync(winrt::Microsoft::Windows::AppNotifications:: AppNotificationProgressData const& data, param::hstring const& tag, 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< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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->UpdateAsync( *(void**)(&data), *(void**)(&tag), *(void**)(&group), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UpdateAsync( *(void**)(&data), *(void**)(&tag), *(void**)(&group), &operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::AppNotifications:: AppNotificationProgressResult>{operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::UpdateAsync(winrt::Microsoft::Windows::AppNotifications:: AppNotificationProgressData const& data, param::hstring const& tag) 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< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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->UpdateAsync2(*(void**)(&data), *(void**)(&tag), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UpdateAsync2(*(void**)(&data), *(void**)(&tag), &operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::AppNotifications:: AppNotificationProgressResult>{operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::Setting() const { winrt::Microsoft::Windows::AppNotifications::AppNotificationSetting value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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_Setting(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_Setting(reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::RemoveByIdAsync(uint32_t notificationId) 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< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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->RemoveByIdAsync(notificationId, &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RemoveByIdAsync(notificationId, &operation)); } return winrt::Windows::Foundation::IAsyncAction{operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::RemoveByTagAsync(param::hstring const& tag) 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< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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->RemoveByTagAsync(*(void**)(&tag), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->RemoveByTagAsync(*(void**)(&tag), &operation)); } return winrt::Windows::Foundation::IAsyncAction{operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::RemoveByTagAndGroupAsync(param::hstring const& tag, 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< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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->RemoveByTagAndGroupAsync( *(void**)(&tag), *(void**)(&group), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RemoveByTagAndGroupAsync( *(void**)(&tag), *(void**)(&group), &operation)); } return winrt::Windows::Foundation::IAsyncAction{operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::RemoveByGroupAsync(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< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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->RemoveByGroupAsync(*(void**)(&group), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->RemoveByGroupAsync(*(void**)(&group), &operation)); } return winrt::Windows::Foundation::IAsyncAction{operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::RemoveAllAsync() 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< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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->RemoveAllAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RemoveAllAsync(&operation)); } return winrt::Windows::Foundation::IAsyncAction{operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager< D>::GetAllAsync() 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< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager, D const*>(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->GetAllAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAllAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Windows::Foundation::Collections::IVector< winrt::Microsoft::Windows::AppNotifications::AppNotification>>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager2< D>::Register(param::hstring const& displayName, winrt::Windows::Foundation::Uri const& iconUri) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager2, D const*>(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->Register(*(void**)(&displayName), *(void**)(&iconUri))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Register(*(void**)(&displayName), *(void**)(&iconUri))); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManagerStatics< D>::Default() 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_Default(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Default(&value)); } return winrt::Microsoft::Windows::AppNotifications::AppNotificationManager{ value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManagerStatics2< D>::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_Microsoft_Windows_AppNotifications_IAppNotificationProgressData< D>::SequenceNumber() 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_SequenceNumber(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SequenceNumber(&value)); } return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData< D>::SequenceNumber(uint32_t 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_SequenceNumber(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SequenceNumber(value)); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData< D>::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_Microsoft_Windows_AppNotifications_IAppNotificationProgressData< D>::Title(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_Title(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData< D>::Value() const { double 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_Value(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(&value)); } return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData< D>::Value(double 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_Value(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Value(value)); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData< D>::ValueStringOverride() 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_ValueStringOverride(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ValueStringOverride(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData< D>::ValueStringOverride(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_ValueStringOverride(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ValueStringOverride(*(void**)(&value))); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData< D>::Status() 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_Status(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData< D>::Status(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_Status(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Status(*(void**)(&value))); } } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressDataFactory< D>::CreateInstance(uint32_t sequenceNumber) 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(sequenceNumber, &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateInstance(sequenceNumber, &value)); } return winrt::Microsoft::Windows::AppNotifications:: AppNotificationProgressData{value, take_ownership_from_abi}; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::Windows::AppNotifications::IAppNotification> { int32_t __stdcall get_Tag(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Tag()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Tag(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Tag(*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_Id(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Payload(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Payload()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Progress(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Progress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Progress(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Progress( *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Expiration(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().Expiration()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Expiration(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Expiration( *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExpiresOnReboot(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExpiresOnReboot()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ExpiresOnReboot(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ExpiresOnReboot(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Priority(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AppNotifications::AppNotificationPriority>( 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(); } int32_t __stdcall get_SuppressDisplay(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SuppressDisplay()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SuppressDisplay(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SuppressDisplay(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Argument(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Argument()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UserInput(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::Collections::IMap>( this->shim().UserInput()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Arguments(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::Collections::IMap>( this->shim().Arguments()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AppNotifications::IAppNotificationFactory> : produce_base { int32_t __stdcall CreateInstance(void* payload, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AppNotifications::AppNotification>( this->shim().CreateInstance( *reinterpret_cast(&payload))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager> : produce_base { int32_t __stdcall Register() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Register(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Unregister() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Unregister(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UnregisterAll() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UnregisterAll(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_NotificationInvoked( void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().NotificationInvoked( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_NotificationInvoked( winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().NotificationInvoked( *reinterpret_cast(&token)); return 0; } int32_t __stdcall Show(void* notification) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Show( *reinterpret_cast(¬ification)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpdateAsync(void* data, void* tag, void* group, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().UpdateAsync( *reinterpret_cast(&data), *reinterpret_cast(&tag), *reinterpret_cast(&group))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpdateAsync2(void* data, void* tag, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().UpdateAsync( *reinterpret_cast(&data), *reinterpret_cast(&tag))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Setting(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AppNotifications::AppNotificationSetting>( this->shim().Setting()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveByIdAsync(uint32_t notificationId, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from( this->shim().RemoveByIdAsync(notificationId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveByTagAsync(void* tag, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from( this->shim().RemoveByTagAsync(*reinterpret_cast(&tag))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveByTagAndGroupAsync(void* tag, void* group, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from( this->shim().RemoveByTagAndGroupAsync( *reinterpret_cast(&tag), *reinterpret_cast(&group))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveByGroupAsync(void* group, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from( this->shim().RemoveByGroupAsync( *reinterpret_cast(&group))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveAllAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from( this->shim().RemoveAllAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetAllAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>( this->shim().GetAllAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager2> : produce_base { int32_t __stdcall Register(void* displayName, void* iconUri) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Register( *reinterpret_cast(&displayName), *reinterpret_cast(&iconUri)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AppNotifications::IAppNotificationManagerStatics> : produce_base { int32_t __stdcall get_Default(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AppNotifications::AppNotificationManager>( this->shim().Default()); 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(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AppNotifications::IAppNotificationProgressData> : produce_base { int32_t __stdcall get_SequenceNumber(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SequenceNumber()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SequenceNumber(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SequenceNumber(value); 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 put_Title(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Value(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Value(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ValueStringOverride(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ValueStringOverride()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ValueStringOverride(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ValueStringOverride(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Status(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Status(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Status(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(uint32_t sequenceNumber, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().CreateInstance(sequenceNumber)); return 0; } catch (...) { return to_hresult(); } }; #endif } // namespace winrt::impl WINRT_EXPORT namespace winrt::Microsoft::Windows::AppNotifications { inline AppNotification::AppNotification(param::hstring const& payload) : AppNotification( impl::call_factory( [&](IAppNotificationFactory const& f) { return f.CreateInstance(payload); })) {} inline auto AppNotificationManager::Default() { return impl::call_factory_cast< winrt::Microsoft::Windows::AppNotifications::AppNotificationManager (*)( IAppNotificationManagerStatics const&), AppNotificationManager, IAppNotificationManagerStatics>( [](IAppNotificationManagerStatics const& f) { return f.Default(); }); } inline auto AppNotificationManager::IsSupported() { return impl::call_factory_cast< bool (*)(IAppNotificationManagerStatics2 const&), AppNotificationManager, IAppNotificationManagerStatics2>( [](IAppNotificationManagerStatics2 const& f) { return f.IsSupported(); }); } inline AppNotificationProgressData::AppNotificationProgressData( uint32_t sequenceNumber) : AppNotificationProgressData( impl::call_factory( [&](IAppNotificationProgressDataFactory const& f) { return f.CreateInstance(sequenceNumber); })) {} } 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::Microsoft::Windows::AppNotifications::IAppNotificationFactory> : winrt::impl::hash_base {}; template <> struct hash< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager> : winrt::impl::hash_base {}; template <> struct hash< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager2> : winrt::impl::hash_base {}; template <> struct hash< winrt::Microsoft::Windows::AppNotifications::IAppNotificationManagerStatics> : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash< winrt::Microsoft::Windows::AppNotifications::IAppNotificationProgressData> : 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::Microsoft::Windows::AppNotifications::AppNotificationProgressData> : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } // namespace std #endif