# 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.devices.pointofservice
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.graphics.imaging
import winsdk.windows.storage.streams

class BarcodeScannerTriggerState(enum.IntEnum):
    RELEASED = 0
    PRESSED = 1

Self = typing.TypeVar('Self')

class BarcodeScannerDisableScannerRequest(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerDisableScannerRequest: ...
    def report_completed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32, failed_reason_description: str) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class BarcodeScannerDisableScannerRequestEventArgs(_winrt.Object):
    request: typing.Optional[BarcodeScannerDisableScannerRequest]
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerDisableScannerRequestEventArgs: ...
    def get_deferral(self) -> typing.Optional[winsdk.windows.foundation.Deferral]: ...

class BarcodeScannerEnableScannerRequest(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerEnableScannerRequest: ...
    def report_completed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32, failed_reason_description: str) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class BarcodeScannerEnableScannerRequestEventArgs(_winrt.Object):
    request: typing.Optional[BarcodeScannerEnableScannerRequest]
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerEnableScannerRequestEventArgs: ...
    def get_deferral(self) -> typing.Optional[winsdk.windows.foundation.Deferral]: ...

class BarcodeScannerFrameReader(_winrt.Object):
    connection: typing.Optional[BarcodeScannerProviderConnection]
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerFrameReader: ...
    def close(self) -> None: ...
    def start_async(self) -> winsdk.windows.foundation.IAsyncOperation[_winrt.Boolean]: ...
    def stop_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    def try_acquire_latest_frame_async(self) -> winsdk.windows.foundation.IAsyncOperation[BarcodeScannerVideoFrame]: ...
    def add_frame_arrived(self, handler: winsdk.windows.foundation.TypedEventHandler[BarcodeScannerFrameReader, BarcodeScannerFrameReaderFrameArrivedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_frame_arrived(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class BarcodeScannerFrameReaderFrameArrivedEventArgs(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerFrameReaderFrameArrivedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winsdk.windows.foundation.Deferral]: ...

class BarcodeScannerGetSymbologyAttributesRequest(_winrt.Object):
    symbology: _winrt.UInt32
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerGetSymbologyAttributesRequest: ...
    def report_completed_async(self, attributes: typing.Optional[winsdk.windows.devices.pointofservice.BarcodeSymbologyAttributes]) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32, failed_reason_description: str) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class BarcodeScannerGetSymbologyAttributesRequestEventArgs(_winrt.Object):
    request: typing.Optional[BarcodeScannerGetSymbologyAttributesRequest]
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerGetSymbologyAttributesRequestEventArgs: ...
    def get_deferral(self) -> typing.Optional[winsdk.windows.foundation.Deferral]: ...

class BarcodeScannerHideVideoPreviewRequest(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerHideVideoPreviewRequest: ...
    def report_completed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32, failed_reason_description: str) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class BarcodeScannerHideVideoPreviewRequestEventArgs(_winrt.Object):
    request: typing.Optional[BarcodeScannerHideVideoPreviewRequest]
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerHideVideoPreviewRequestEventArgs: ...
    def get_deferral(self) -> typing.Optional[winsdk.windows.foundation.Deferral]: ...

class BarcodeScannerProviderConnection(_winrt.Object):
    version: str
    name: str
    company_name: str
    id: str
    supported_symbologies: typing.Optional[winsdk.windows.foundation.collections.IVector[_winrt.UInt32]]
    video_device_id: str
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerProviderConnection: ...
    def close(self) -> None: ...
    @typing.overload
    def create_frame_reader_async(self) -> winsdk.windows.foundation.IAsyncOperation[BarcodeScannerFrameReader]: ...
    @typing.overload
    def create_frame_reader_async(self, preferred_format: winsdk.windows.graphics.imaging.BitmapPixelFormat) -> winsdk.windows.foundation.IAsyncOperation[BarcodeScannerFrameReader]: ...
    @typing.overload
    def create_frame_reader_async(self, preferred_format: winsdk.windows.graphics.imaging.BitmapPixelFormat, preferred_size: winsdk.windows.graphics.imaging.BitmapSize) -> winsdk.windows.foundation.IAsyncOperation[BarcodeScannerFrameReader]: ...
    @typing.overload
    def report_error_async(self, error_data: typing.Optional[winsdk.windows.devices.pointofservice.UnifiedPosErrorData]) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_error_async(self, error_data: typing.Optional[winsdk.windows.devices.pointofservice.UnifiedPosErrorData], is_retriable: _winrt.Boolean, scan_report: typing.Optional[winsdk.windows.devices.pointofservice.BarcodeScannerReport]) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    def report_scanned_data_async(self, report: typing.Optional[winsdk.windows.devices.pointofservice.BarcodeScannerReport]) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    def report_trigger_state_async(self, state: BarcodeScannerTriggerState) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    def start(self) -> None: ...
    def add_disable_scanner_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[BarcodeScannerProviderConnection, BarcodeScannerDisableScannerRequestEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_disable_scanner_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_enable_scanner_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[BarcodeScannerProviderConnection, BarcodeScannerEnableScannerRequestEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_enable_scanner_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_get_barcode_symbology_attributes_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[BarcodeScannerProviderConnection, BarcodeScannerGetSymbologyAttributesRequestEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_get_barcode_symbology_attributes_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_hide_video_preview_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[BarcodeScannerProviderConnection, BarcodeScannerHideVideoPreviewRequestEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_hide_video_preview_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_set_active_symbologies_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[BarcodeScannerProviderConnection, BarcodeScannerSetActiveSymbologiesRequestEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_set_active_symbologies_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_set_barcode_symbology_attributes_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[BarcodeScannerProviderConnection, BarcodeScannerSetSymbologyAttributesRequestEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_set_barcode_symbology_attributes_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_start_software_trigger_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[BarcodeScannerProviderConnection, BarcodeScannerStartSoftwareTriggerRequestEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_start_software_trigger_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_stop_software_trigger_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[BarcodeScannerProviderConnection, BarcodeScannerStopSoftwareTriggerRequestEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_stop_software_trigger_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class BarcodeScannerProviderTriggerDetails(_winrt.Object):
    connection: typing.Optional[BarcodeScannerProviderConnection]
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerProviderTriggerDetails: ...

class BarcodeScannerSetActiveSymbologiesRequest(_winrt.Object):
    symbologies: typing.Optional[winsdk.windows.foundation.collections.IVectorView[_winrt.UInt32]]
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerSetActiveSymbologiesRequest: ...
    def report_completed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32, failed_reason_description: str) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class BarcodeScannerSetActiveSymbologiesRequestEventArgs(_winrt.Object):
    request: typing.Optional[BarcodeScannerSetActiveSymbologiesRequest]
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerSetActiveSymbologiesRequestEventArgs: ...
    def get_deferral(self) -> typing.Optional[winsdk.windows.foundation.Deferral]: ...

class BarcodeScannerSetSymbologyAttributesRequest(_winrt.Object):
    attributes: typing.Optional[winsdk.windows.devices.pointofservice.BarcodeSymbologyAttributes]
    symbology: _winrt.UInt32
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerSetSymbologyAttributesRequest: ...
    def report_completed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32, failed_reason_description: str) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class BarcodeScannerSetSymbologyAttributesRequestEventArgs(_winrt.Object):
    request: typing.Optional[BarcodeScannerSetSymbologyAttributesRequest]
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerSetSymbologyAttributesRequestEventArgs: ...
    def get_deferral(self) -> typing.Optional[winsdk.windows.foundation.Deferral]: ...

class BarcodeScannerStartSoftwareTriggerRequest(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerStartSoftwareTriggerRequest: ...
    def report_completed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32, failed_reason_description: str) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class BarcodeScannerStartSoftwareTriggerRequestEventArgs(_winrt.Object):
    request: typing.Optional[BarcodeScannerStartSoftwareTriggerRequest]
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerStartSoftwareTriggerRequestEventArgs: ...
    def get_deferral(self) -> typing.Optional[winsdk.windows.foundation.Deferral]: ...

class BarcodeScannerStopSoftwareTriggerRequest(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerStopSoftwareTriggerRequest: ...
    def report_completed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def report_failed_async(self, reason: _winrt.Int32, failed_reason_description: str) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class BarcodeScannerStopSoftwareTriggerRequestEventArgs(_winrt.Object):
    request: typing.Optional[BarcodeScannerStopSoftwareTriggerRequest]
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerStopSoftwareTriggerRequestEventArgs: ...
    def get_deferral(self) -> typing.Optional[winsdk.windows.foundation.Deferral]: ...

class BarcodeScannerVideoFrame(_winrt.Object):
    format: winsdk.windows.graphics.imaging.BitmapPixelFormat
    height: _winrt.UInt32
    pixel_data: typing.Optional[winsdk.windows.storage.streams.IBuffer]
    width: _winrt.UInt32
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeScannerVideoFrame: ...
    def close(self) -> None: ...

class BarcodeSymbologyAttributesBuilder(_winrt.Object):
    is_decode_length_supported: _winrt.Boolean
    is_check_digit_validation_supported: _winrt.Boolean
    is_check_digit_transmission_supported: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> BarcodeSymbologyAttributesBuilder: ...
    def __new__(cls: typing.Type[BarcodeSymbologyAttributesBuilder]) -> BarcodeSymbologyAttributesBuilder:...
    def create_attributes(self) -> typing.Optional[winsdk.windows.devices.pointofservice.BarcodeSymbologyAttributes]: ...

