# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.7

import enum
import datetime
import sys
import types
import typing

import winsdk._winrt as _winrt
import winsdk.windows.foundation

class ExtendedExecutionForegroundReason(enum.IntEnum):
    UNSPECIFIED = 0
    SAVING_DATA = 1
    BACKGROUND_AUDIO = 2
    UNCONSTRAINED = 3

class ExtendedExecutionForegroundResult(enum.IntEnum):
    ALLOWED = 0
    DENIED = 1

class ExtendedExecutionForegroundRevokedReason(enum.IntEnum):
    RESUMED = 0
    SYSTEM_POLICY = 1

Self = typing.TypeVar('Self')

class ExtendedExecutionForegroundRevokedEventArgs(_winrt.Object):
    reason: ExtendedExecutionForegroundRevokedReason
    @staticmethod
    def _from(obj: _winrt.Object) -> ExtendedExecutionForegroundRevokedEventArgs: ...

class ExtendedExecutionForegroundSession(_winrt.Object):
    reason: ExtendedExecutionForegroundReason
    description: str
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: _winrt.Object) -> ExtendedExecutionForegroundSession: ...
    def __new__(cls: typing.Type[ExtendedExecutionForegroundSession]) -> ExtendedExecutionForegroundSession:...
    def close(self) -> None: ...
    def request_extension_async(self) -> winsdk.windows.foundation.IAsyncOperation[ExtendedExecutionForegroundResult]: ...
    def add_revoked(self, handler: winsdk.windows.foundation.TypedEventHandler[_winrt.Object, ExtendedExecutionForegroundRevokedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_revoked(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

