| Server IP : 121.121.20.254 / Your IP : 216.73.217.89 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/cppwinrt/winrt/ |
Upload File : |
// C++/WinRT v2.0.250303.1
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#ifndef WINRT_Windows_System_Update_H
#define WINRT_Windows_System_Update_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.System.h"
#include "winrt/impl/Windows.Foundation.2.h"
#include "winrt/impl/Windows.Foundation.Collections.2.h"
#include "winrt/impl/Windows.System.Update.2.h"
namespace winrt::impl
{
template <typename D> auto consume_Windows_System_Update_ISystemUpdateItem<D>::State() const
{
winrt::Windows::System::Update::SystemUpdateItemState value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateItem>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateItem, 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::System::Update::ISystemUpdateItem>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_State(reinterpret_cast<int32_t*>(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateItem>**)this;
check_hresult(_winrt_abi_type->get_State(reinterpret_cast<int32_t*>(&value)));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateItem<D>::Title() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateItem>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateItem, 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::System::Update::ISystemUpdateItem>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Title(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateItem>**)this;
check_hresult(_winrt_abi_type->get_Title(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateItem<D>::Description() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateItem>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateItem, 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::System::Update::ISystemUpdateItem>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Description(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateItem>**)this;
check_hresult(_winrt_abi_type->get_Description(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateItem<D>::Id() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateItem>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateItem, 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::System::Update::ISystemUpdateItem>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Id(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateItem>**)this;
check_hresult(_winrt_abi_type->get_Id(&value));
}
return hstring{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateItem<D>::Revision() const
{
uint32_t value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateItem>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateItem, 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::System::Update::ISystemUpdateItem>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Revision(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateItem>**)this;
check_hresult(_winrt_abi_type->get_Revision(&value));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateItem<D>::DownloadProgress() const
{
double value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateItem>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateItem, 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::System::Update::ISystemUpdateItem>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_DownloadProgress(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateItem>**)this;
check_hresult(_winrt_abi_type->get_DownloadProgress(&value));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateItem<D>::InstallProgress() const
{
double value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateItem>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateItem, 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::System::Update::ISystemUpdateItem>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_InstallProgress(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateItem>**)this;
check_hresult(_winrt_abi_type->get_InstallProgress(&value));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateItem<D>::ExtendedError() const
{
winrt::hresult value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateItem>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateItem, 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::System::Update::ISystemUpdateItem>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateItem>**)this;
check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value)));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateLastErrorInfo<D>::State() const
{
winrt::Windows::System::Update::SystemUpdateManagerState value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateLastErrorInfo>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateLastErrorInfo, 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::System::Update::ISystemUpdateLastErrorInfo>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_State(reinterpret_cast<int32_t*>(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateLastErrorInfo>**)this;
check_hresult(_winrt_abi_type->get_State(reinterpret_cast<int32_t*>(&value)));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateLastErrorInfo<D>::ExtendedError() const
{
winrt::hresult value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateLastErrorInfo>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateLastErrorInfo, 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::System::Update::ISystemUpdateLastErrorInfo>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateLastErrorInfo>**)this;
check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value)));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateLastErrorInfo<D>::IsInteractive() const
{
bool value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateLastErrorInfo>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateLastErrorInfo, 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::System::Update::ISystemUpdateLastErrorInfo>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_IsInteractive(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateLastErrorInfo>**)this;
check_hresult(_winrt_abi_type->get_IsInteractive(&value));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::IsSupported() const
{
bool result{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->IsSupported(&result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->IsSupported(&result));
}
return result;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::State() const
{
winrt::Windows::System::Update::SystemUpdateManagerState value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_State(reinterpret_cast<int32_t*>(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->get_State(reinterpret_cast<int32_t*>(&value)));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::StateChanged(winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
{
winrt::event_token token{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->add_StateChanged(*(void**)(&handler), put_abi(token)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->add_StateChanged(*(void**)(&handler), put_abi(token)));
}
return token;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::StateChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
{
return impl::make_event_revoker<D, StateChanged_revoker>(this, StateChanged(handler));
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::StateChanged(winrt::event_token const& token) const noexcept
{
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
_winrt_abi_type->remove_StateChanged(impl::bind_in(token));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
_winrt_abi_type->remove_StateChanged(impl::bind_in(token));
}
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::DownloadProgress() const
{
double value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_DownloadProgress(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->get_DownloadProgress(&value));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::InstallProgress() const
{
double value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_InstallProgress(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->get_InstallProgress(&value));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::UserActiveHoursStart() const
{
winrt::Windows::Foundation::TimeSpan value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_UserActiveHoursStart(put_abi(value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->get_UserActiveHoursStart(put_abi(value)));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::UserActiveHoursEnd() const
{
winrt::Windows::Foundation::TimeSpan value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_UserActiveHoursEnd(put_abi(value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->get_UserActiveHoursEnd(put_abi(value)));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::UserActiveHoursMax() const
{
int32_t value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_UserActiveHoursMax(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->get_UserActiveHoursMax(&value));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::TrySetUserActiveHours(winrt::Windows::Foundation::TimeSpan const& start, winrt::Windows::Foundation::TimeSpan const& end) const
{
bool result{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->TrySetUserActiveHours(impl::bind_in(start), impl::bind_in(end), &result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->TrySetUserActiveHours(impl::bind_in(start), impl::bind_in(end), &result));
}
return result;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::LastUpdateCheckTime() const
{
winrt::Windows::Foundation::DateTime value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_LastUpdateCheckTime(put_abi(value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->get_LastUpdateCheckTime(put_abi(value)));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::LastUpdateInstallTime() const
{
winrt::Windows::Foundation::DateTime value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_LastUpdateInstallTime(put_abi(value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->get_LastUpdateInstallTime(put_abi(value)));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::LastErrorInfo() const
{
void* value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_LastErrorInfo(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->get_LastErrorInfo(&value));
}
return winrt::Windows::System::Update::SystemUpdateLastErrorInfo{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::GetAutomaticRebootBlockIds() const
{
void* result{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetAutomaticRebootBlockIds(&result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->GetAutomaticRebootBlockIds(&result));
}
return winrt::Windows::Foundation::Collections::IVectorView<hstring>{ result, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::BlockAutomaticRebootAsync(param::hstring const& lockId) const
{
void* operation{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->BlockAutomaticRebootAsync(*(void**)(&lockId), &operation));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->BlockAutomaticRebootAsync(*(void**)(&lockId), &operation));
}
return winrt::Windows::Foundation::IAsyncOperation<bool>{ operation, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::UnblockAutomaticRebootAsync(param::hstring const& lockId) const
{
void* operation{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->UnblockAutomaticRebootAsync(*(void**)(&lockId), &operation));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->UnblockAutomaticRebootAsync(*(void**)(&lockId), &operation));
}
return winrt::Windows::Foundation::IAsyncOperation<bool>{ operation, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::ExtendedError() const
{
winrt::hresult value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value)));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::GetUpdateItems() const
{
void* result{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetUpdateItems(&result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->GetUpdateItems(&result));
}
return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::System::Update::SystemUpdateItem>{ result, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::AttentionRequiredReason() const
{
winrt::Windows::System::Update::SystemUpdateAttentionRequiredReason value{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_AttentionRequiredReason(reinterpret_cast<int32_t*>(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->get_AttentionRequiredReason(reinterpret_cast<int32_t*>(&value)));
}
return value;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::SetFlightRing(param::hstring const& flightRing) const
{
bool result{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->SetFlightRing(*(void**)(&flightRing), &result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->SetFlightRing(*(void**)(&flightRing), &result));
}
return result;
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::GetFlightRing() const
{
void* result{};
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetFlightRing(&result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->GetFlightRing(&result));
}
return hstring{ result, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::StartInstall(winrt::Windows::System::Update::SystemUpdateStartInstallAction const& action) const
{
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->StartInstall(static_cast<int32_t>(action)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->StartInstall(static_cast<int32_t>(action)));
}
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::RebootToCompleteInstall() const
{
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->RebootToCompleteInstall());
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->RebootToCompleteInstall());
}
}
template <typename D> auto consume_Windows_System_Update_ISystemUpdateManagerStatics<D>::StartCancelUpdates() const
{
if constexpr (!std::is_same_v<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::System::Update::ISystemUpdateManagerStatics, 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::System::Update::ISystemUpdateManagerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->StartCancelUpdates());
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::System::Update::ISystemUpdateManagerStatics>**)this;
check_hresult(_winrt_abi_type->StartCancelUpdates());
}
}
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::System::Update::ISystemUpdateItem> : produce_base<D, winrt::Windows::System::Update::ISystemUpdateItem>
{
int32_t __stdcall get_State(int32_t* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::System::Update::SystemUpdateItemState>(this->shim().State());
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<hstring>(this->shim().Title());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_Description(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<hstring>(this->shim().Description());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_Id(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<hstring>(this->shim().Id());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_Revision(uint32_t* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<uint32_t>(this->shim().Revision());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_DownloadProgress(double* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<double>(this->shim().DownloadProgress());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_InstallProgress(double* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<double>(this->shim().InstallProgress());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try
{
zero_abi<winrt::hresult>(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::hresult>(this->shim().ExtendedError());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::System::Update::ISystemUpdateLastErrorInfo> : produce_base<D, winrt::Windows::System::Update::ISystemUpdateLastErrorInfo>
{
int32_t __stdcall get_State(int32_t* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::System::Update::SystemUpdateManagerState>(this->shim().State());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try
{
zero_abi<winrt::hresult>(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::hresult>(this->shim().ExtendedError());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_IsInteractive(bool* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<bool>(this->shim().IsInteractive());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics> : produce_base<D, winrt::Windows::System::Update::ISystemUpdateManagerStatics>
{
int32_t __stdcall IsSupported(bool* result) noexcept final try
{
typename D::abi_guard guard(this->shim());
*result = detach_from<bool>(this->shim().IsSupported());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_State(int32_t* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::System::Update::SystemUpdateManagerState>(this->shim().State());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall add_StateChanged(void* handler, winrt::event_token* token) noexcept final try
{
zero_abi<winrt::event_token>(token);
typename D::abi_guard guard(this->shim());
*token = detach_from<winrt::event_token>(this->shim().StateChanged(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall remove_StateChanged(winrt::event_token token) noexcept final
{
typename D::abi_guard guard(this->shim());
this->shim().StateChanged(*reinterpret_cast<winrt::event_token const*>(&token));
return 0;
}
int32_t __stdcall get_DownloadProgress(double* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<double>(this->shim().DownloadProgress());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_InstallProgress(double* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<double>(this->shim().InstallProgress());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_UserActiveHoursStart(int64_t* value) noexcept final try
{
zero_abi<winrt::Windows::Foundation::TimeSpan>(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::TimeSpan>(this->shim().UserActiveHoursStart());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_UserActiveHoursEnd(int64_t* value) noexcept final try
{
zero_abi<winrt::Windows::Foundation::TimeSpan>(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::TimeSpan>(this->shim().UserActiveHoursEnd());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_UserActiveHoursMax(int32_t* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<int32_t>(this->shim().UserActiveHoursMax());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall TrySetUserActiveHours(int64_t start, int64_t end, bool* result) noexcept final try
{
typename D::abi_guard guard(this->shim());
*result = detach_from<bool>(this->shim().TrySetUserActiveHours(*reinterpret_cast<winrt::Windows::Foundation::TimeSpan const*>(&start), *reinterpret_cast<winrt::Windows::Foundation::TimeSpan const*>(&end)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_LastUpdateCheckTime(int64_t* value) noexcept final try
{
zero_abi<winrt::Windows::Foundation::DateTime>(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().LastUpdateCheckTime());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_LastUpdateInstallTime(int64_t* value) noexcept final try
{
zero_abi<winrt::Windows::Foundation::DateTime>(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::DateTime>(this->shim().LastUpdateInstallTime());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_LastErrorInfo(void** value) noexcept final try
{
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::System::Update::SystemUpdateLastErrorInfo>(this->shim().LastErrorInfo());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall GetAutomaticRebootBlockIds(void** result) noexcept final try
{
clear_abi(result);
typename D::abi_guard guard(this->shim());
*result = detach_from<winrt::Windows::Foundation::Collections::IVectorView<hstring>>(this->shim().GetAutomaticRebootBlockIds());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall BlockAutomaticRebootAsync(void* lockId, void** operation) noexcept final try
{
clear_abi(operation);
typename D::abi_guard guard(this->shim());
*operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<bool>>(this->shim().BlockAutomaticRebootAsync(*reinterpret_cast<hstring const*>(&lockId)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall UnblockAutomaticRebootAsync(void* lockId, void** operation) noexcept final try
{
clear_abi(operation);
typename D::abi_guard guard(this->shim());
*operation = detach_from<winrt::Windows::Foundation::IAsyncOperation<bool>>(this->shim().UnblockAutomaticRebootAsync(*reinterpret_cast<hstring const*>(&lockId)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try
{
zero_abi<winrt::hresult>(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::hresult>(this->shim().ExtendedError());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall GetUpdateItems(void** result) noexcept final try
{
clear_abi(result);
typename D::abi_guard guard(this->shim());
*result = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::System::Update::SystemUpdateItem>>(this->shim().GetUpdateItems());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_AttentionRequiredReason(int32_t* value) noexcept final try
{
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::System::Update::SystemUpdateAttentionRequiredReason>(this->shim().AttentionRequiredReason());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall SetFlightRing(void* flightRing, bool* result) noexcept final try
{
typename D::abi_guard guard(this->shim());
*result = detach_from<bool>(this->shim().SetFlightRing(*reinterpret_cast<hstring const*>(&flightRing)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall GetFlightRing(void** result) noexcept final try
{
clear_abi(result);
typename D::abi_guard guard(this->shim());
*result = detach_from<hstring>(this->shim().GetFlightRing());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall StartInstall(int32_t action) noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().StartInstall(*reinterpret_cast<winrt::Windows::System::Update::SystemUpdateStartInstallAction const*>(&action));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall RebootToCompleteInstall() noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().RebootToCompleteInstall();
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall StartCancelUpdates() noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().StartCancelUpdates();
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
}
WINRT_EXPORT namespace winrt::Windows::System::Update
{
inline auto SystemUpdateManager::IsSupported()
{
return impl::call_factory_cast<bool(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.IsSupported(); });
}
inline auto SystemUpdateManager::State()
{
return impl::call_factory_cast<winrt::Windows::System::Update::SystemUpdateManagerState(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.State(); });
}
inline auto SystemUpdateManager::StateChanged(winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler)
{
return impl::call_factory<SystemUpdateManager, ISystemUpdateManagerStatics>([&](ISystemUpdateManagerStatics const& f) { return f.StateChanged(handler); });
}
inline auto SystemUpdateManager::StateChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler)
{
auto f = get_activation_factory<SystemUpdateManager, winrt::Windows::System::Update::ISystemUpdateManagerStatics>();
return SystemUpdateManager::StateChanged_revoker{ f, f.StateChanged(handler) };
}
inline auto SystemUpdateManager::StateChanged(winrt::event_token const& token)
{
impl::call_factory<SystemUpdateManager, ISystemUpdateManagerStatics>([&](ISystemUpdateManagerStatics const& f) { return f.StateChanged(token); });
}
inline auto SystemUpdateManager::DownloadProgress()
{
return impl::call_factory_cast<double(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.DownloadProgress(); });
}
inline auto SystemUpdateManager::InstallProgress()
{
return impl::call_factory_cast<double(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.InstallProgress(); });
}
inline auto SystemUpdateManager::UserActiveHoursStart()
{
return impl::call_factory_cast<winrt::Windows::Foundation::TimeSpan(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.UserActiveHoursStart(); });
}
inline auto SystemUpdateManager::UserActiveHoursEnd()
{
return impl::call_factory_cast<winrt::Windows::Foundation::TimeSpan(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.UserActiveHoursEnd(); });
}
inline auto SystemUpdateManager::UserActiveHoursMax()
{
return impl::call_factory_cast<int32_t(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.UserActiveHoursMax(); });
}
inline auto SystemUpdateManager::TrySetUserActiveHours(winrt::Windows::Foundation::TimeSpan const& start, winrt::Windows::Foundation::TimeSpan const& end)
{
return impl::call_factory<SystemUpdateManager, ISystemUpdateManagerStatics>([&](ISystemUpdateManagerStatics const& f) { return f.TrySetUserActiveHours(start, end); });
}
inline auto SystemUpdateManager::LastUpdateCheckTime()
{
return impl::call_factory_cast<winrt::Windows::Foundation::DateTime(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.LastUpdateCheckTime(); });
}
inline auto SystemUpdateManager::LastUpdateInstallTime()
{
return impl::call_factory_cast<winrt::Windows::Foundation::DateTime(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.LastUpdateInstallTime(); });
}
inline auto SystemUpdateManager::LastErrorInfo()
{
return impl::call_factory_cast<winrt::Windows::System::Update::SystemUpdateLastErrorInfo(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.LastErrorInfo(); });
}
inline auto SystemUpdateManager::GetAutomaticRebootBlockIds()
{
return impl::call_factory_cast<winrt::Windows::Foundation::Collections::IVectorView<hstring>(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.GetAutomaticRebootBlockIds(); });
}
inline auto SystemUpdateManager::BlockAutomaticRebootAsync(param::hstring const& lockId)
{
return impl::call_factory<SystemUpdateManager, ISystemUpdateManagerStatics>([&](ISystemUpdateManagerStatics const& f) { return f.BlockAutomaticRebootAsync(lockId); });
}
inline auto SystemUpdateManager::UnblockAutomaticRebootAsync(param::hstring const& lockId)
{
return impl::call_factory<SystemUpdateManager, ISystemUpdateManagerStatics>([&](ISystemUpdateManagerStatics const& f) { return f.UnblockAutomaticRebootAsync(lockId); });
}
inline auto SystemUpdateManager::ExtendedError()
{
return impl::call_factory_cast<winrt::hresult(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.ExtendedError(); });
}
inline auto SystemUpdateManager::GetUpdateItems()
{
return impl::call_factory_cast<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::System::Update::SystemUpdateItem>(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.GetUpdateItems(); });
}
inline auto SystemUpdateManager::AttentionRequiredReason()
{
return impl::call_factory_cast<winrt::Windows::System::Update::SystemUpdateAttentionRequiredReason(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.AttentionRequiredReason(); });
}
inline auto SystemUpdateManager::SetFlightRing(param::hstring const& flightRing)
{
return impl::call_factory<SystemUpdateManager, ISystemUpdateManagerStatics>([&](ISystemUpdateManagerStatics const& f) { return f.SetFlightRing(flightRing); });
}
inline auto SystemUpdateManager::GetFlightRing()
{
return impl::call_factory_cast<hstring(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.GetFlightRing(); });
}
inline auto SystemUpdateManager::StartInstall(winrt::Windows::System::Update::SystemUpdateStartInstallAction const& action)
{
impl::call_factory<SystemUpdateManager, ISystemUpdateManagerStatics>([&](ISystemUpdateManagerStatics const& f) { return f.StartInstall(action); });
}
inline auto SystemUpdateManager::RebootToCompleteInstall()
{
impl::call_factory_cast<void(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.RebootToCompleteInstall(); });
}
inline auto SystemUpdateManager::StartCancelUpdates()
{
impl::call_factory_cast<void(*)(ISystemUpdateManagerStatics const&), SystemUpdateManager, ISystemUpdateManagerStatics>([](ISystemUpdateManagerStatics const& f) { return f.StartCancelUpdates(); });
}
}
namespace std
{
#ifndef WINRT_LEAN_AND_MEAN
template<> struct hash<winrt::Windows::System::Update::ISystemUpdateItem> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::System::Update::ISystemUpdateLastErrorInfo> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::System::Update::ISystemUpdateManagerStatics> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::System::Update::SystemUpdateItem> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::System::Update::SystemUpdateLastErrorInfo> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::System::Update::SystemUpdateManager> : winrt::impl::hash_base {};
#endif
#ifdef __cpp_lib_format
#endif
}
#endif