# 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 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(winsdk.system.Object):
    reason: ExtendedExecutionRevokedReason
    @staticmethod
    def _from(obj: winsdk.system.Object) -> ExtendedExecutionRevokedEventArgs: ...

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

