# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.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.devices.i2c.provider as windows_devices_i2c_provider
import winrt.windows.foundation as windows_foundation
import winrt.windows.foundation.collections as windows_foundation_collections

from winrt.windows.devices.i2c import I2cBusSpeed, I2cSharingMode, I2cTransferStatus

Self = typing.TypeVar('Self')

@typing.final
class I2cTransferResult:
    status: I2cTransferStatus
    bytes_transferred: winrt.system.UInt32
    def __init__(self, status: I2cTransferStatus, bytes_transferred: winrt.system.UInt32) -> None: ...

@typing.final
class I2cConnectionSettings(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> I2cConnectionSettings: ...
    def __new__(cls: typing.Type[I2cConnectionSettings], slave_address: winrt.system.Int32) -> I2cConnectionSettings: ...
    @_property
    def slave_address(self) -> winrt.system.Int32: ...
    @slave_address.setter
    def slave_address(self, value: winrt.system.Int32) -> None: ...
    @_property
    def sharing_mode(self) -> I2cSharingMode: ...
    @sharing_mode.setter
    def sharing_mode(self, value: I2cSharingMode) -> None: ...
    @_property
    def bus_speed(self) -> I2cBusSpeed: ...
    @bus_speed.setter
    def bus_speed(self, value: I2cBusSpeed) -> None: ...

@typing.final
class I2cController_Static(type):
    def get_controllers_async(cls, provider: typing.Optional[windows_devices_i2c_provider.II2cProvider], /) -> windows_foundation.IAsyncOperation[windows_foundation_collections.IVectorView[I2cController]]: ...
    def get_default_async(cls) -> windows_foundation.IAsyncOperation[I2cController]: ...

@typing.final
class I2cController(winrt.system.Object, metaclass=I2cController_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> I2cController: ...
    def get_device(self, settings: typing.Optional[I2cConnectionSettings], /) -> typing.Optional[I2cDevice]: ...

@typing.final
class I2cDevice_Static(type):
    def from_id_async(cls, device_id: str, settings: typing.Optional[I2cConnectionSettings], /) -> windows_foundation.IAsyncOperation[I2cDevice]: ...
    @typing.overload
    def get_device_selector(cls) -> str: ...
    @typing.overload
    def get_device_selector(cls, friendly_name: str, /) -> str: ...

@typing.final
class I2cDevice(winrt.system.Object, metaclass=I2cDevice_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> I2cDevice: ...
    def close(self) -> None: ...
    def read(self, buffer: winrt.system.Array[winrt.system.UInt8], /) -> None: ...
    def read_partial(self, buffer: winrt.system.Array[winrt.system.UInt8], /) -> I2cTransferResult: ...
    def write(self, buffer: winrt.system.Array[winrt.system.UInt8], /) -> None: ...
    def write_partial(self, buffer: winrt.system.Array[winrt.system.UInt8], /) -> I2cTransferResult: ...
    def write_read(self, write_buffer: winrt.system.Array[winrt.system.UInt8], read_buffer: winrt.system.Array[winrt.system.UInt8], /) -> None: ...
    def write_read_partial(self, write_buffer: winrt.system.Array[winrt.system.UInt8], read_buffer: winrt.system.Array[winrt.system.UInt8], /) -> I2cTransferResult: ...
    @_property
    def connection_settings(self) -> typing.Optional[I2cConnectionSettings]: ...
    @_property
    def device_id(self) -> str: ...

@typing.final
class II2cDeviceStatics(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> II2cDeviceStatics: ...
    def from_id_async(self, device_id: str, settings: typing.Optional[I2cConnectionSettings], /) -> windows_foundation.IAsyncOperation[I2cDevice]: ...
    @typing.overload
    def get_device_selector(self) -> str: ...
    @typing.overload
    def get_device_selector(self, friendly_name: str, /) -> str: ...

