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

import enum
import sys
import types
import typing
import uuid

import winsdk._winrt as _winrt

try:
    import winsdk.windows.foundation
except Exception:
    pass

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

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

class ExtendedExecutionSession(winsdk.windows.foundation.IClosable, _winrt.Object):
    reason: ExtendedExecutionReason
    percent_progress: _winrt.UInt32
    description: str
    @staticmethod
    def _from(obj: _winrt.Object) -> ExtendedExecutionSession: ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def close(self) -> None: ...
    @typing.overload
    def request_extension_async(self) -> winsdk.windows.foundation.IAsyncOperation[ExtendedExecutionResult]: ...
    @typing.overload
    def add_revoked(self, handler: winsdk.windows.foundation.TypedEventHandler[_winrt.Object, ExtendedExecutionRevokedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_revoked(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

