// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_ApplicationModel_Calls_Provider_H #define WINRT_Windows_ApplicationModel_Calls_Provider_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/Windows.ApplicationModel.Calls.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Storage.2.h" #include "winrt/impl/Windows.ApplicationModel.Calls.Provider.2.h" namespace winrt::impl { template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOrigin::Category() 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_Category(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Category(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOrigin::Category(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_Category(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Category(*(void**)(&value))); } } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOrigin::CategoryDescription() 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_CategoryDescription(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CategoryDescription(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOrigin::CategoryDescription(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_CategoryDescription(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CategoryDescription(*(void**)(&value))); } } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOrigin::Location() 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_Location(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Location(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOrigin::Location(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_Location(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Location(*(void**)(&value))); } } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOrigin2::DisplayName() 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_DisplayName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisplayName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOrigin2::DisplayName(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_DisplayName(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DisplayName(*(void**)(&value))); } } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOrigin3::DisplayPicture() 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_DisplayPicture(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisplayPicture(&value)); } return winrt::Windows::Storage::StorageFile{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOrigin3::DisplayPicture(winrt::Windows::Storage::StorageFile 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_DisplayPicture(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DisplayPicture(*(void**)(&value))); } } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOriginManagerStatics::IsCurrentAppActiveCallOriginApp() 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(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_IsCurrentAppActiveCallOriginApp(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsCurrentAppActiveCallOriginApp(&value)); } return value; } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOriginManagerStatics::ShowPhoneCallOriginSettingsUI() 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->ShowPhoneCallOriginSettingsUI()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShowPhoneCallOriginSettingsUI()); } } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOriginManagerStatics::SetCallOrigin(winrt::guid const& requestId, winrt::Windows::ApplicationModel::Calls::Provider::PhoneCallOrigin const& callOrigin) 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->SetCallOrigin(impl::bind_in(requestId), *(void**)(&callOrigin))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetCallOrigin(impl::bind_in(requestId), *(void**)(&callOrigin))); } } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOriginManagerStatics2::RequestSetAsActiveCallOriginAppAsync() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestSetAsActiveCallOriginAppAsync(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestSetAsActiveCallOriginAppAsync(&result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Calls_Provider_IPhoneCallOriginManagerStatics3::IsSupported() 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(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_IsSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsSupported(&value)); } return value; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Category(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Category()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Category(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Category(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CategoryDescription(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CategoryDescription()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CategoryDescription(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CategoryDescription(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Location(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Location()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Location(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Location(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DisplayName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DisplayName(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DisplayPicture(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayPicture()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DisplayPicture(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DisplayPicture(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsCurrentAppActiveCallOriginApp(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsCurrentAppActiveCallOriginApp()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowPhoneCallOriginSettingsUI() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowPhoneCallOriginSettingsUI(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetCallOrigin(winrt::guid requestId, void* callOrigin) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetCallOrigin(*reinterpret_cast(&requestId), *reinterpret_cast(&callOrigin)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RequestSetAsActiveCallOriginAppAsync(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestSetAsActiveCallOriginAppAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSupported()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::ApplicationModel::Calls::Provider { inline PhoneCallOrigin::PhoneCallOrigin() : PhoneCallOrigin(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto PhoneCallOriginManager::IsCurrentAppActiveCallOriginApp() { return impl::call_factory_cast([](IPhoneCallOriginManagerStatics const& f) { return f.IsCurrentAppActiveCallOriginApp(); }); } inline auto PhoneCallOriginManager::ShowPhoneCallOriginSettingsUI() { impl::call_factory_cast([](IPhoneCallOriginManagerStatics const& f) { return f.ShowPhoneCallOriginSettingsUI(); }); } inline auto PhoneCallOriginManager::SetCallOrigin(winrt::guid const& requestId, winrt::Windows::ApplicationModel::Calls::Provider::PhoneCallOrigin const& callOrigin) { impl::call_factory([&](IPhoneCallOriginManagerStatics const& f) { return f.SetCallOrigin(requestId, callOrigin); }); } inline auto PhoneCallOriginManager::RequestSetAsActiveCallOriginAppAsync() { return impl::call_factory_cast(*)(IPhoneCallOriginManagerStatics2 const&), PhoneCallOriginManager, IPhoneCallOriginManagerStatics2>([](IPhoneCallOriginManagerStatics2 const& f) { return f.RequestSetAsActiveCallOriginAppAsync(); }); } inline auto PhoneCallOriginManager::IsSupported() { return impl::call_factory_cast([](IPhoneCallOriginManagerStatics3 const& f) { return f.IsSupported(); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif