// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.210505.3 #ifndef WINRT_Windows_Management_Update_H #define WINRT_Windows_Management_Update_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.210505.3"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.210505.3" #include "winrt/Windows.Management.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Management.Update.2.h" namespace winrt::impl { template WINRT_IMPL_AUTO(bool) consume_Windows_Management_Update_IPreviewBuildsManager::ArePreviewBuildsAllowed() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::Update::IPreviewBuildsManager)->get_ArePreviewBuildsAllowed(&value)); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_Management_Update_IPreviewBuildsManager::ArePreviewBuildsAllowed(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::Update::IPreviewBuildsManager)->put_ArePreviewBuildsAllowed(value)); } template WINRT_IMPL_AUTO(winrt::Windows::Management::Update::PreviewBuildsState) consume_Windows_Management_Update_IPreviewBuildsManager::GetCurrentState() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::Update::IPreviewBuildsManager)->GetCurrentState(&result)); return winrt::Windows::Management::Update::PreviewBuildsState{ result, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::IAsyncOperation) consume_Windows_Management_Update_IPreviewBuildsManager::SyncAsync() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::Update::IPreviewBuildsManager)->SyncAsync(&result)); return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(winrt::Windows::Management::Update::PreviewBuildsManager) consume_Windows_Management_Update_IPreviewBuildsManagerStatics::GetDefault() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::Update::IPreviewBuildsManagerStatics)->GetDefault(&value)); return winrt::Windows::Management::Update::PreviewBuildsManager{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(bool) consume_Windows_Management_Update_IPreviewBuildsManagerStatics::IsSupported() const { bool result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::Update::IPreviewBuildsManagerStatics)->IsSupported(&result)); return result; } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::Collections::ValueSet) consume_Windows_Management_Update_IPreviewBuildsState::Properties() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Management::Update::IPreviewBuildsState)->get_Properties(&value)); return winrt::Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ArePreviewBuildsAllowed(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ArePreviewBuildsAllowed()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ArePreviewBuildsAllowed(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ArePreviewBuildsAllowed(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCurrentState(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetCurrentState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SyncAsync(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().SyncAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDefault(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDefault()); return 0; } catch (...) { return to_hresult(); } 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_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Management::Update { inline auto PreviewBuildsManager::GetDefault() { return impl::call_factory_cast([](IPreviewBuildsManagerStatics const& f) { return f.GetDefault(); }); } inline auto PreviewBuildsManager::IsSupported() { return impl::call_factory_cast([](IPreviewBuildsManagerStatics 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 {}; #endif } #endif