// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_ApplicationModel_CommunicationBlocking_H #define WINRT_Windows_ApplicationModel_CommunicationBlocking_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/Windows.ApplicationModel.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.ApplicationModel.CommunicationBlocking.2.h" namespace winrt::impl { template auto consume_Windows_ApplicationModel_CommunicationBlocking_ICommunicationBlockingAccessManagerStatics::IsBlockingActive() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::CommunicationBlocking::ICommunicationBlockingAccessManagerStatics)->get_IsBlockingActive(&value)); return value; } template auto consume_Windows_ApplicationModel_CommunicationBlocking_ICommunicationBlockingAccessManagerStatics::IsBlockedNumberAsync(param::hstring const& number) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::CommunicationBlocking::ICommunicationBlockingAccessManagerStatics)->IsBlockedNumberAsync(*(void**)(&number), &result)); return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_CommunicationBlocking_ICommunicationBlockingAccessManagerStatics::ShowBlockNumbersUI(param::iterable const& phoneNumbers) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::CommunicationBlocking::ICommunicationBlockingAccessManagerStatics)->ShowBlockNumbersUI(*(void**)(&phoneNumbers), &value)); return value; } template auto consume_Windows_ApplicationModel_CommunicationBlocking_ICommunicationBlockingAccessManagerStatics::ShowUnblockNumbersUI(param::iterable const& phoneNumbers) const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::CommunicationBlocking::ICommunicationBlockingAccessManagerStatics)->ShowUnblockNumbersUI(*(void**)(&phoneNumbers), &value)); return value; } template auto consume_Windows_ApplicationModel_CommunicationBlocking_ICommunicationBlockingAccessManagerStatics::ShowBlockedCallsUI() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::CommunicationBlocking::ICommunicationBlockingAccessManagerStatics)->ShowBlockedCallsUI()); } template auto consume_Windows_ApplicationModel_CommunicationBlocking_ICommunicationBlockingAccessManagerStatics::ShowBlockedMessagesUI() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::CommunicationBlocking::ICommunicationBlockingAccessManagerStatics)->ShowBlockedMessagesUI()); } template auto consume_Windows_ApplicationModel_CommunicationBlocking_ICommunicationBlockingAppManagerStatics::IsCurrentAppActiveBlockingApp() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::CommunicationBlocking::ICommunicationBlockingAppManagerStatics)->get_IsCurrentAppActiveBlockingApp(&value)); return value; } template auto consume_Windows_ApplicationModel_CommunicationBlocking_ICommunicationBlockingAppManagerStatics::ShowCommunicationBlockingSettingsUI() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::CommunicationBlocking::ICommunicationBlockingAppManagerStatics)->ShowCommunicationBlockingSettingsUI()); } template auto consume_Windows_ApplicationModel_CommunicationBlocking_ICommunicationBlockingAppManagerStatics2::RequestSetAsActiveBlockingAppAsync() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::CommunicationBlocking::ICommunicationBlockingAppManagerStatics2)->RequestSetAsActiveBlockingAppAsync(&result)); return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsBlockingActive(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsBlockingActive()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsBlockedNumberAsync(void* number, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().IsBlockedNumberAsync(*reinterpret_cast(&number))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowBlockNumbersUI(void* phoneNumbers, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ShowBlockNumbersUI(*reinterpret_cast const*>(&phoneNumbers))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowUnblockNumbersUI(void* phoneNumbers, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ShowUnblockNumbersUI(*reinterpret_cast const*>(&phoneNumbers))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowBlockedCallsUI() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowBlockedCallsUI(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowBlockedMessagesUI() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowBlockedMessagesUI(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsCurrentAppActiveBlockingApp(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsCurrentAppActiveBlockingApp()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowCommunicationBlockingSettingsUI() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowCommunicationBlockingSettingsUI(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RequestSetAsActiveBlockingAppAsync(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestSetAsActiveBlockingAppAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::ApplicationModel::CommunicationBlocking { inline auto CommunicationBlockingAccessManager::IsBlockingActive() { return impl::call_factory_cast([](ICommunicationBlockingAccessManagerStatics const& f) { return f.IsBlockingActive(); }); } inline auto CommunicationBlockingAccessManager::IsBlockedNumberAsync(param::hstring const& number) { return impl::call_factory([&](ICommunicationBlockingAccessManagerStatics const& f) { return f.IsBlockedNumberAsync(number); }); } inline auto CommunicationBlockingAccessManager::ShowBlockNumbersUI(param::iterable const& phoneNumbers) { return impl::call_factory([&](ICommunicationBlockingAccessManagerStatics const& f) { return f.ShowBlockNumbersUI(phoneNumbers); }); } inline auto CommunicationBlockingAccessManager::ShowUnblockNumbersUI(param::iterable const& phoneNumbers) { return impl::call_factory([&](ICommunicationBlockingAccessManagerStatics const& f) { return f.ShowUnblockNumbersUI(phoneNumbers); }); } inline auto CommunicationBlockingAccessManager::ShowBlockedCallsUI() { impl::call_factory_cast([](ICommunicationBlockingAccessManagerStatics const& f) { return f.ShowBlockedCallsUI(); }); } inline auto CommunicationBlockingAccessManager::ShowBlockedMessagesUI() { impl::call_factory_cast([](ICommunicationBlockingAccessManagerStatics const& f) { return f.ShowBlockedMessagesUI(); }); } inline auto CommunicationBlockingAppManager::IsCurrentAppActiveBlockingApp() { return impl::call_factory_cast([](ICommunicationBlockingAppManagerStatics const& f) { return f.IsCurrentAppActiveBlockingApp(); }); } inline auto CommunicationBlockingAppManager::ShowCommunicationBlockingSettingsUI() { impl::call_factory_cast([](ICommunicationBlockingAppManagerStatics const& f) { return f.ShowCommunicationBlockingSettingsUI(); }); } inline auto CommunicationBlockingAppManager::RequestSetAsActiveBlockingAppAsync() { return impl::call_factory_cast(*)(ICommunicationBlockingAppManagerStatics2 const&), CommunicationBlockingAppManager, ICommunicationBlockingAppManagerStatics2>([](ICommunicationBlockingAppManagerStatics2 const& f) { return f.RequestSetAsActiveBlockingAppAsync(); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif