// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #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.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Microsoft.Windows.AppNotifications.2.h" namespace winrt::impl { template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Tag() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->get_Tag(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Tag(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->put_Tag(*(void**)(&value))); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Group() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->get_Group(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Group(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->put_Group(*(void**)(&value))); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Id() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->get_Id(&value)); return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Payload() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->get_Payload(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Progress() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->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 { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->put_Progress(*(void**)(&value))); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Expiration() const { winrt::Windows::Foundation::DateTime value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->get_Expiration(put_abi(value))); return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Expiration(winrt::Windows::Foundation::DateTime const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->put_Expiration(impl::bind_in(value))); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::ExpiresOnReboot() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->get_ExpiresOnReboot(&value)); return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::ExpiresOnReboot(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->put_ExpiresOnReboot(value)); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Priority() const { winrt::Microsoft::Windows::AppNotifications::AppNotificationPriority value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->get_Priority(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::Priority(winrt::Microsoft::Windows::AppNotifications::AppNotificationPriority const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->put_Priority(static_cast(value))); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::SuppressDisplay() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->get_SuppressDisplay(&value)); return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotification::SuppressDisplay(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotification)->put_SuppressDisplay(value)); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationActivatedEventArgs::Argument() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationActivatedEventArgs)->get_Argument(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationActivatedEventArgs::UserInput() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationActivatedEventArgs)->get_UserInput(&value)); return winrt::Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationActivatedEventArgs2::Arguments() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationActivatedEventArgs2)->get_Arguments(&value)); return winrt::Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationFactory::CreateInstance(param::hstring const& payload) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationFactory)->CreateInstance(*(void**)(&payload), &value)); return winrt::Microsoft::Windows::AppNotifications::AppNotification{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::Register() const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->Register()); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::Unregister() const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->Unregister()); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::UnregisterAll() const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->UnregisterAll()); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::NotificationInvoked(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->add_NotificationInvoked(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::NotificationInvoked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, NotificationInvoked(handler)); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::NotificationInvoked(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->remove_NotificationInvoked(impl::bind_in(token)); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::Show(winrt::Microsoft::Windows::AppNotifications::AppNotification const& notification) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->Show(*(void**)(¬ification))); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::UpdateAsync(winrt::Microsoft::Windows::AppNotifications::AppNotificationProgressData const& data, param::hstring const& tag, param::hstring const& group) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->UpdateAsync(*(void**)(&data), *(void**)(&tag), *(void**)(&group), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::UpdateAsync(winrt::Microsoft::Windows::AppNotifications::AppNotificationProgressData const& data, param::hstring const& tag) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->UpdateAsync2(*(void**)(&data), *(void**)(&tag), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::Setting() const { winrt::Microsoft::Windows::AppNotifications::AppNotificationSetting value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->get_Setting(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::RemoveByIdAsync(uint32_t notificationId) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->RemoveByIdAsync(notificationId, &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::RemoveByTagAsync(param::hstring const& tag) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->RemoveByTagAsync(*(void**)(&tag), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::RemoveByTagAndGroupAsync(param::hstring const& tag, param::hstring const& group) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->RemoveByTagAndGroupAsync(*(void**)(&tag), *(void**)(&group), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::RemoveByGroupAsync(param::hstring const& group) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->RemoveByGroupAsync(*(void**)(&group), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::RemoveAllAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->RemoveAllAsync(&operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager::GetAllAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager)->GetAllAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManager2::Register(param::hstring const& displayName, winrt::Windows::Foundation::Uri const& iconUri) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManager2)->Register(*(void**)(&displayName), *(void**)(&iconUri))); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManagerStatics::Default() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManagerStatics)->get_Default(&value)); return winrt::Microsoft::Windows::AppNotifications::AppNotificationManager{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationManagerStatics2::IsSupported() const { bool result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationManagerStatics2)->IsSupported(&result)); return result; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData::SequenceNumber() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationProgressData)->get_SequenceNumber(&value)); return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData::SequenceNumber(uint32_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationProgressData)->put_SequenceNumber(value)); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData::Title() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationProgressData)->get_Title(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData::Title(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationProgressData)->put_Title(*(void**)(&value))); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData::Value() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationProgressData)->get_Value(&value)); return value; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData::Value(double value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationProgressData)->put_Value(value)); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData::ValueStringOverride() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationProgressData)->get_ValueStringOverride(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData::ValueStringOverride(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationProgressData)->put_ValueStringOverride(*(void**)(&value))); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData::Status() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationProgressData)->get_Status(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressData::Status(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationProgressData)->put_Status(*(void**)(&value))); } template auto consume_Microsoft_Windows_AppNotifications_IAppNotificationProgressDataFactory::CreateInstance(uint32_t sequenceNumber) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::AppNotifications::IAppNotificationProgressDataFactory)->CreateInstance(sequenceNumber, &value)); return winrt::Microsoft::Windows::AppNotifications::AppNotificationProgressData{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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(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>(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>(this->shim().Arguments()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : 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(this->shim().CreateInstance(*reinterpret_cast(&payload))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : 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(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 : 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 : 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(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 : 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 } 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([](IAppNotificationManagerStatics const& f) { return f.Default(); }); } inline auto AppNotificationManager::IsSupported() { return impl::call_factory_cast([](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::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif