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

import enum
import datetime
import sys
import types
import typing

import winsdk.system
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(winsdk.system.Object):
    reason: ExtendedExecutionForegroundRevokedReason
    @staticmethod
    def _from(obj: winsdk.system.Object) -> ExtendedExecutionForegroundRevokedEventArgs: ...

class ExtendedExecutionForegroundSession(winsdk.system.Object):
    reason: ExtendedExecutionForegroundReason
    description: str
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winsdk.system.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[winsdk.system.Object, ExtendedExecutionForegroundRevokedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_revoked(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

