// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_ApplicationModel_ExtendedExecution_Foreground_0_H #define WINRT_Windows_ApplicationModel_ExtendedExecution_Foreground_0_H WINRT_EXPORT namespace winrt::Windows::Foundation { struct EventRegistrationToken; template struct WINRT_IMPL_EMPTY_BASES TypedEventHandler; } WINRT_EXPORT namespace winrt::Windows::ApplicationModel::ExtendedExecution::Foreground { enum class ExtendedExecutionForegroundReason : int32_t { Unspecified = 0, SavingData = 1, BackgroundAudio = 2, Unconstrained = 3, }; enum class ExtendedExecutionForegroundResult : int32_t { Allowed = 0, Denied = 1, }; enum class ExtendedExecutionForegroundRevokedReason : int32_t { Resumed = 0, SystemPolicy = 1, }; struct IExtendedExecutionForegroundRevokedEventArgs; struct IExtendedExecutionForegroundSession; struct ExtendedExecutionForegroundRevokedEventArgs; struct ExtendedExecutionForegroundSession; } namespace winrt::impl { template <> struct category{ using type = interface_category; }; template <> struct category{ using type = interface_category; }; template <> struct category{ using type = class_category; }; template <> struct category{ using type = class_category; }; template <> struct category{ using type = enum_category; }; template <> struct category{ using type = enum_category; }; template <> struct category{ using type = enum_category; }; template <> inline constexpr auto& name_v = L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedEventArgs"; template <> inline constexpr auto& name_v = L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession"; template <> inline constexpr auto& name_v = L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundReason"; template <> inline constexpr auto& name_v = L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundResult"; template <> inline constexpr auto& name_v = L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedReason"; template <> inline constexpr auto& name_v = L"Windows.ApplicationModel.ExtendedExecution.Foreground.IExtendedExecutionForegroundRevokedEventArgs"; template <> inline constexpr auto& name_v = L"Windows.ApplicationModel.ExtendedExecution.Foreground.IExtendedExecutionForegroundSession"; template <> inline constexpr guid guid_v{ 0xB07CD940,0x9557,0xAEA4,{ 0x2C,0x99,0xBD,0xD5,0x6D,0x9B,0xE4,0x61 } }; // B07CD940-9557-AEA4-2C99-BDD56D9BE461 template <> inline constexpr guid guid_v{ 0xFBF440E1,0x9D10,0x4201,{ 0xB0,0x1E,0xC8,0x32,0x75,0x29,0x6F,0x2E } }; // FBF440E1-9D10-4201-B01E-C83275296F2E template <> struct default_interface{ using type = winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::IExtendedExecutionForegroundRevokedEventArgs; }; template <> struct default_interface{ using type = winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::IExtendedExecutionForegroundSession; }; template <> struct abi { struct WINRT_IMPL_NOVTABLE type : inspectable_abi { virtual int32_t __stdcall get_Reason(int32_t*) noexcept = 0; }; }; template <> struct abi { struct WINRT_IMPL_NOVTABLE type : inspectable_abi { virtual int32_t __stdcall get_Description(void**) noexcept = 0; virtual int32_t __stdcall put_Description(void*) noexcept = 0; virtual int32_t __stdcall add_Revoked(void*, winrt::event_token*) noexcept = 0; virtual int32_t __stdcall remove_Revoked(winrt::event_token) noexcept = 0; virtual int32_t __stdcall RequestExtensionAsync(void**) noexcept = 0; virtual int32_t __stdcall get_Reason(int32_t*) noexcept = 0; virtual int32_t __stdcall put_Reason(int32_t) noexcept = 0; }; }; template struct consume_Windows_ApplicationModel_ExtendedExecution_Foreground_IExtendedExecutionForegroundRevokedEventArgs { [[nodiscard]] auto Reason() const; }; template <> struct consume { template using type = consume_Windows_ApplicationModel_ExtendedExecution_Foreground_IExtendedExecutionForegroundRevokedEventArgs; }; template struct consume_Windows_ApplicationModel_ExtendedExecution_Foreground_IExtendedExecutionForegroundSession { [[nodiscard]] auto Description() const; auto Description(param::hstring const& value) const; auto Revoked(winrt::Windows::Foundation::TypedEventHandler const& handler) const; using Revoked_revoker = impl::event_revoker::remove_Revoked>; [[nodiscard]] auto Revoked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const; auto Revoked(winrt::event_token const& token) const noexcept; auto RequestExtensionAsync() const; [[nodiscard]] auto Reason() const; auto Reason(winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundReason const& value) const; }; template <> struct consume { template using type = consume_Windows_ApplicationModel_ExtendedExecution_Foreground_IExtendedExecutionForegroundSession; }; } #endif