Update WinRT to new version 2.0.250303.1

PiperOrigin-RevId: 781075193
This commit is contained in:
Guogang Li
2025-07-09 08:58:00 -07:00
committed by Copybara-Service
parent 5e558cffc4
commit 8f14bd10fc
1395 changed files with 498490 additions and 61973 deletions
@@ -1,11 +1,11 @@
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.220531.1
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1
#pragma once
#ifndef WINRT_Windows_Networking_PushNotifications_H
#define WINRT_Windows_Networking_PushNotifications_H
#include "winrt/base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.220531.1"), "Mismatched C++/WinRT headers.");
#define CPPWINRT_VERSION "2.0.220531.1"
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.Networking.h"
#include "winrt/impl/Windows.Foundation.2.h"
#include "winrt/impl/Windows.Foundation.Collections.2.h"
@@ -18,23 +18,71 @@ namespace winrt::impl
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannel<D>::Uri() const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannel)->get_Uri(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Uri(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>**)this;
check_hresult(_winrt_abi_type->get_Uri(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannel<D>::ExpirationTime() const
{
winrt::Windows::Foundation::DateTime value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannel)->get_ExpirationTime(put_abi(value)));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_ExpirationTime(put_abi(value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>**)this;
check_hresult(_winrt_abi_type->get_ExpirationTime(put_abi(value)));
}
return value;
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannel<D>::Close() const
{
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannel)->Close());
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->Close());
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>**)this;
check_hresult(_winrt_abi_type->Close());
}
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannel<D>::PushNotificationReceived(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Networking::PushNotifications::PushNotificationChannel, winrt::Windows::Networking::PushNotifications::PushNotificationReceivedEventArgs> const& handler) const
{
winrt::event_token token{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannel)->add_PushNotificationReceived(*(void**)(&handler), put_abi(token)));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->add_PushNotificationReceived(*(void**)(&handler), put_abi(token)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>**)this;
check_hresult(_winrt_abi_type->add_PushNotificationReceived(*(void**)(&handler), put_abi(token)));
}
return token;
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannel<D>::PushNotificationReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Networking::PushNotifications::PushNotificationChannel, winrt::Windows::Networking::PushNotifications::PushNotificationReceivedEventArgs> const& handler) const
@@ -43,78 +91,234 @@ namespace winrt::impl
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannel<D>::PushNotificationReceived(winrt::event_token const& token) const noexcept
{
WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannel)->remove_PushNotificationReceived(impl::bind_in(token));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>**)&_winrt_casted_result;
_winrt_abi_type->remove_PushNotificationReceived(impl::bind_in(token));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannel>**)this;
_winrt_abi_type->remove_PushNotificationReceived(impl::bind_in(token));
}
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerForUser<D>::CreatePushNotificationChannelForApplicationAsync() const
{
void* operation{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser)->CreatePushNotificationChannelForApplicationAsync(&operation));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreatePushNotificationChannelForApplicationAsync(&operation));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser>**)this;
check_hresult(_winrt_abi_type->CreatePushNotificationChannelForApplicationAsync(&operation));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Networking::PushNotifications::PushNotificationChannel>{ operation, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerForUser<D>::CreatePushNotificationChannelForApplicationAsync(param::hstring const& applicationId) const
{
void* operation{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser)->CreatePushNotificationChannelForApplicationAsyncWithId(*(void**)(&applicationId), &operation));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreatePushNotificationChannelForApplicationAsyncWithId(*(void**)(&applicationId), &operation));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser>**)this;
check_hresult(_winrt_abi_type->CreatePushNotificationChannelForApplicationAsyncWithId(*(void**)(&applicationId), &operation));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Networking::PushNotifications::PushNotificationChannel>{ operation, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerForUser<D>::CreatePushNotificationChannelForSecondaryTileAsync(param::hstring const& tileId) const
{
void* operation{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser)->CreatePushNotificationChannelForSecondaryTileAsync(*(void**)(&tileId), &operation));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreatePushNotificationChannelForSecondaryTileAsync(*(void**)(&tileId), &operation));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser>**)this;
check_hresult(_winrt_abi_type->CreatePushNotificationChannelForSecondaryTileAsync(*(void**)(&tileId), &operation));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Networking::PushNotifications::PushNotificationChannel>{ operation, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerForUser<D>::User() const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser)->get_User(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_User(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser>**)this;
check_hresult(_winrt_abi_type->get_User(&value));
}
return winrt::Windows::System::User{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerForUser2<D>::CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(winrt::Windows::Storage::Streams::IBuffer const& appServerKey, param::hstring const& channelId) const
{
void* operation{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser2)->CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(*(void**)(&appServerKey), *(void**)(&channelId), &operation));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser2>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(*(void**)(&appServerKey), *(void**)(&channelId), &operation));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser2>**)this;
check_hresult(_winrt_abi_type->CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(*(void**)(&appServerKey), *(void**)(&channelId), &operation));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Networking::PushNotifications::PushNotificationChannel>{ operation, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerForUser2<D>::CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(winrt::Windows::Storage::Streams::IBuffer const& appServerKey, param::hstring const& channelId, param::hstring const& appId) const
{
void* operation{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser2)->CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsyncWithId(*(void**)(&appServerKey), *(void**)(&channelId), *(void**)(&appId), &operation));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser2>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsyncWithId(*(void**)(&appServerKey), *(void**)(&channelId), *(void**)(&appId), &operation));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerForUser2>**)this;
check_hresult(_winrt_abi_type->CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsyncWithId(*(void**)(&appServerKey), *(void**)(&channelId), *(void**)(&appId), &operation));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Networking::PushNotifications::PushNotificationChannel>{ operation, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerStatics<D>::CreatePushNotificationChannelForApplicationAsync() const
{
void* operation{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics)->CreatePushNotificationChannelForApplicationAsync(&operation));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreatePushNotificationChannelForApplicationAsync(&operation));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics>**)this;
check_hresult(_winrt_abi_type->CreatePushNotificationChannelForApplicationAsync(&operation));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Networking::PushNotifications::PushNotificationChannel>{ operation, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerStatics<D>::CreatePushNotificationChannelForApplicationAsync(param::hstring const& applicationId) const
{
void* operation{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics)->CreatePushNotificationChannelForApplicationAsyncWithId(*(void**)(&applicationId), &operation));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreatePushNotificationChannelForApplicationAsyncWithId(*(void**)(&applicationId), &operation));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics>**)this;
check_hresult(_winrt_abi_type->CreatePushNotificationChannelForApplicationAsyncWithId(*(void**)(&applicationId), &operation));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Networking::PushNotifications::PushNotificationChannel>{ operation, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerStatics<D>::CreatePushNotificationChannelForSecondaryTileAsync(param::hstring const& tileId) const
{
void* operation{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics)->CreatePushNotificationChannelForSecondaryTileAsync(*(void**)(&tileId), &operation));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreatePushNotificationChannelForSecondaryTileAsync(*(void**)(&tileId), &operation));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics>**)this;
check_hresult(_winrt_abi_type->CreatePushNotificationChannelForSecondaryTileAsync(*(void**)(&tileId), &operation));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Networking::PushNotifications::PushNotificationChannel>{ operation, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerStatics2<D>::GetForUser(winrt::Windows::System::User const& user) const
{
void* result{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics2)->GetForUser(*(void**)(&user), &result));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics2>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetForUser(*(void**)(&user), &result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics2>**)this;
check_hresult(_winrt_abi_type->GetForUser(*(void**)(&user), &result));
}
return winrt::Windows::Networking::PushNotifications::PushNotificationChannelManagerForUser{ result, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerStatics3<D>::GetDefault() const
{
void* result{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics3)->GetDefault(&result));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics3>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics3, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics3>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetDefault(&result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics3>**)this;
check_hresult(_winrt_abi_type->GetDefault(&result));
}
return winrt::Windows::Networking::PushNotifications::PushNotificationChannelManagerForUser{ result, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerStatics4<D>::ChannelsRevoked(winrt::Windows::Foundation::EventHandler<winrt::Windows::Networking::PushNotifications::PushNotificationChannelsRevokedEventArgs> const& handler) const
{
winrt::event_token token{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics4)->add_ChannelsRevoked(*(void**)(&handler), put_abi(token)));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics4>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics4, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics4>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->add_ChannelsRevoked(*(void**)(&handler), put_abi(token)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics4>**)this;
check_hresult(_winrt_abi_type->add_ChannelsRevoked(*(void**)(&handler), put_abi(token)));
}
return token;
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerStatics4<D>::ChannelsRevoked(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Networking::PushNotifications::PushNotificationChannelsRevokedEventArgs> const& handler) const
@@ -123,70 +327,214 @@ namespace winrt::impl
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationChannelManagerStatics4<D>::ChannelsRevoked(winrt::event_token const& token) const noexcept
{
WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics4)->remove_ChannelsRevoked(impl::bind_in(token));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics4>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics4, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics4>**)&_winrt_casted_result;
_winrt_abi_type->remove_ChannelsRevoked(impl::bind_in(token));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationChannelManagerStatics4>**)this;
_winrt_abi_type->remove_ChannelsRevoked(impl::bind_in(token));
}
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationReceivedEventArgs<D>::Cancel(bool value) const
{
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs)->put_Cancel(value));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->put_Cancel(value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)this;
check_hresult(_winrt_abi_type->put_Cancel(value));
}
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationReceivedEventArgs<D>::Cancel() const
{
bool value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs)->get_Cancel(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Cancel(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)this;
check_hresult(_winrt_abi_type->get_Cancel(&value));
}
return value;
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationReceivedEventArgs<D>::NotificationType() const
{
winrt::Windows::Networking::PushNotifications::PushNotificationType value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs)->get_NotificationType(reinterpret_cast<int32_t*>(&value)));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_NotificationType(reinterpret_cast<int32_t*>(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)this;
check_hresult(_winrt_abi_type->get_NotificationType(reinterpret_cast<int32_t*>(&value)));
}
return value;
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationReceivedEventArgs<D>::ToastNotification() const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs)->get_ToastNotification(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_ToastNotification(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)this;
check_hresult(_winrt_abi_type->get_ToastNotification(&value));
}
return winrt::Windows::UI::Notifications::ToastNotification{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationReceivedEventArgs<D>::TileNotification() const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs)->get_TileNotification(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_TileNotification(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)this;
check_hresult(_winrt_abi_type->get_TileNotification(&value));
}
return winrt::Windows::UI::Notifications::TileNotification{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationReceivedEventArgs<D>::BadgeNotification() const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs)->get_BadgeNotification(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_BadgeNotification(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)this;
check_hresult(_winrt_abi_type->get_BadgeNotification(&value));
}
return winrt::Windows::UI::Notifications::BadgeNotification{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IPushNotificationReceivedEventArgs<D>::RawNotification() const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs)->get_RawNotification(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_RawNotification(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IPushNotificationReceivedEventArgs>**)this;
check_hresult(_winrt_abi_type->get_RawNotification(&value));
}
return winrt::Windows::Networking::PushNotifications::RawNotification{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IRawNotification<D>::Content() const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IRawNotification)->get_Content(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IRawNotification>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IRawNotification, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IRawNotification>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Content(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IRawNotification>**)this;
check_hresult(_winrt_abi_type->get_Content(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IRawNotification2<D>::Headers() const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IRawNotification2)->get_Headers(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IRawNotification2>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IRawNotification2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IRawNotification2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Headers(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IRawNotification2>**)this;
check_hresult(_winrt_abi_type->get_Headers(&value));
}
return winrt::Windows::Foundation::Collections::IMapView<hstring, hstring>{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IRawNotification2<D>::ChannelId() const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IRawNotification2)->get_ChannelId(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IRawNotification2>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IRawNotification2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IRawNotification2>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_ChannelId(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IRawNotification2>**)this;
check_hresult(_winrt_abi_type->get_ChannelId(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Networking_PushNotifications_IRawNotification3<D>::ContentBytes() const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Networking::PushNotifications::IRawNotification3)->get_ContentBytes(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::Networking::PushNotifications::IRawNotification3>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Networking::PushNotifications::IRawNotification3, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IRawNotification3>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_ContentBytes(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Networking::PushNotifications::IRawNotification3>**)this;
check_hresult(_winrt_abi_type->get_ContentBytes(&value));
}
return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi };
}
#ifndef WINRT_LEAN_AND_MEAN