# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0

import datetime
import sys
import types
import typing
import uuid as _uuid
from builtins import property as _property

import winrt._winrt
import winrt.system
import winrt.windows.foundation as windows_foundation
import winrt.windows.storage.streams as windows_storage_streams

from winrt.windows.devices.custom import DeviceAccessMode, DeviceSharingMode, IOControlAccessMode, IOControlBufferingMethod

Self = typing.TypeVar('Self')

@typing.final
class CustomDevice_Static(type):
    def from_id_async(cls, device_id: str, desired_access: DeviceAccessMode, sharing_mode: DeviceSharingMode, /) -> windows_foundation.IAsyncOperation[CustomDevice]: ...
    def get_device_selector(cls, class_guid: _uuid.UUID, /) -> str: ...

@typing.final
class CustomDevice(winrt.system.Object, metaclass=CustomDevice_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CustomDevice: ...
    def send_i_o_control_async(self, io_control_code: typing.Optional[IIOControlCode], input_buffer: typing.Optional[windows_storage_streams.IBuffer], output_buffer: typing.Optional[windows_storage_streams.IBuffer], /) -> windows_foundation.IAsyncOperation[winrt.system.UInt32]: ...
    def try_send_i_o_control_async(self, io_control_code: typing.Optional[IIOControlCode], input_buffer: typing.Optional[windows_storage_streams.IBuffer], output_buffer: typing.Optional[windows_storage_streams.IBuffer], /) -> windows_foundation.IAsyncOperation[bool]: ...
    @_property
    def input_stream(self) -> typing.Optional[windows_storage_streams.IInputStream]: ...
    @_property
    def output_stream(self) -> typing.Optional[windows_storage_streams.IOutputStream]: ...

@typing.final
class IOControlCode(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> IOControlCode: ...
    def __new__(cls: typing.Type[IOControlCode], device_type: winrt.system.UInt16, function: winrt.system.UInt16, access_mode: IOControlAccessMode, buffering_method: IOControlBufferingMethod) -> IOControlCode: ...
    @_property
    def access_mode(self) -> IOControlAccessMode: ...
    @_property
    def buffering_method(self) -> IOControlBufferingMethod: ...
    @_property
    def control_code(self) -> winrt.system.UInt32: ...
    @_property
    def device_type(self) -> winrt.system.UInt16: ...
    @_property
    def function(self) -> winrt.system.UInt16: ...

@typing.final
class KnownDeviceTypes_Static(type):
    @_property
    def unknown(cls) -> winrt.system.UInt16: ...

@typing.final
class KnownDeviceTypes(winrt.system.Object, metaclass=KnownDeviceTypes_Static):
    pass

@typing.final
class IIOControlCode(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> IIOControlCode: ...
    @_property
    def access_mode(self) -> IOControlAccessMode: ...
    @_property
    def buffering_method(self) -> IOControlBufferingMethod: ...
    @_property
    def control_code(self) -> winrt.system.UInt32: ...
    @_property
    def device_type(self) -> winrt.system.UInt16: ...
    @_property
    def function(self) -> winrt.system.UInt16: ...

