# 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 ExtendedExecutionReason(enum.IntEnum):
    UNSPECIFIED = 0
    LOCATION_TRACKING = 1
    SAVING_DATA = 2

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

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

Self = typing.TypeVar('Self')

class ExtendedExecutionRevokedEventArgs(_winrt.Object):
    reason: ExtendedExecutionRevokedReason
    @staticmethod
    def _from(obj: _winrt.Object) -> ExtendedExecutionRevokedEventArgs: ...

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

