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

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

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:
    @_property
    def status(self) -> I2cTransferStatus: ...
    @_property
    def bytes_transferred(self) -> winrt.system.UInt32: ...
    def __new__(cls, status: I2cTransferStatus = I2cTransferStatus(0), bytes_transferred: winrt.system.UInt32 = 0) -> I2cTransferResult: ...
    def __replace__(self, /, **changes: typing.Any) -> I2cTransferResult: ...
    def unpack(self) -> typing.Tuple[I2cTransferStatus, winrt.system.UInt32]: ...

@typing.final
class I2cConnectionSettings(winrt.system.Object):
    def __new__(cls: typing.Type[Self], slave_address: winrt.system.Int32) -> Self: ...
    # System.Int32 Windows.Devices.I2c.I2cConnectionSettings::get_SlaveAddress()
    @_property
    def slave_address(self) -> winrt.system.Int32: ...
    # System.Void Windows.Devices.I2c.I2cConnectionSettings::put_SlaveAddress(System.Int32)
    @slave_address.setter
    def slave_address(self, value: winrt.system.Int32) -> None: ...
    # Windows.Devices.I2c.I2cSharingMode Windows.Devices.I2c.I2cConnectionSettings::get_SharingMode()
    @_property
    def sharing_mode(self) -> I2cSharingMode: ...
    # System.Void Windows.Devices.I2c.I2cConnectionSettings::put_SharingMode(Windows.Devices.I2c.I2cSharingMode)
    @sharing_mode.setter
    def sharing_mode(self, value: I2cSharingMode) -> None: ...
    # Windows.Devices.I2c.I2cBusSpeed Windows.Devices.I2c.I2cConnectionSettings::get_BusSpeed()
    @_property
    def bus_speed(self) -> I2cBusSpeed: ...
    # System.Void Windows.Devices.I2c.I2cConnectionSettings::put_BusSpeed(Windows.Devices.I2c.I2cBusSpeed)
    @bus_speed.setter
    def bus_speed(self, value: I2cBusSpeed) -> None: ...

@typing.final
class I2cController_Static(winrt._winrt.IInspectable_Static):
    # Windows.Foundation.IAsyncOperation`1<Windows.Foundation.Collections.IVectorView`1<Windows.Devices.I2c.I2cController>> Windows.Devices.I2c.I2cController::GetControllersAsync(Windows.Devices.I2c.Provider.II2cProvider)
    def get_controllers_async(cls, provider: windows_devices_i2c_provider.II2cProvider, /) -> windows_foundation.IAsyncOperation[typing.Sequence[I2cController]]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Devices.I2c.I2cController> Windows.Devices.I2c.I2cController::GetDefaultAsync()
    def get_default_async(cls) -> windows_foundation.IAsyncOperation[I2cController]: ...

@typing.final
class I2cController(winrt.system.Object, metaclass=I2cController_Static):
    # Windows.Devices.I2c.I2cDevice Windows.Devices.I2c.I2cController::GetDevice(Windows.Devices.I2c.I2cConnectionSettings)
    def get_device(self, settings: I2cConnectionSettings, /) -> I2cDevice: ...

@typing.final
class I2cDevice_Static(winrt._winrt.IInspectable_Static):
    # Windows.Foundation.IAsyncOperation`1<Windows.Devices.I2c.I2cDevice> Windows.Devices.I2c.I2cDevice::FromIdAsync(System.String,Windows.Devices.I2c.I2cConnectionSettings)
    def from_id_async(cls, device_id: str, settings: I2cConnectionSettings, /) -> windows_foundation.IAsyncOperation[I2cDevice]: ...
    # System.String Windows.Devices.I2c.I2cDevice::GetDeviceSelector()
    def get_device_selector(cls) -> str: ...
    # System.String Windows.Devices.I2c.I2cDevice::GetDeviceSelector(System.String)
    def get_device_selector_from_friendly_name(cls, friendly_name: str, /) -> str: ...

@typing.final
class I2cDevice(winrt.system.Object, windows_foundation.IClosable, metaclass=I2cDevice_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, exc_type: typing.Optional[typing.Type[BaseException]], exc_value: typing.Optional[BaseException], traceback: typing.Optional[types.TracebackType]) -> None: ...
    # System.Void Windows.Devices.I2c.I2cDevice::Close()
    def close(self) -> None: ...
    # System.Void Windows.Devices.I2c.I2cDevice::Read(System.Byte[])
    def read(self, buffer: typing.Union[winrt.system.Array[winrt.system.UInt8], winrt.system.WriteableBuffer], /) -> None: ...
    # Windows.Devices.I2c.I2cTransferResult Windows.Devices.I2c.I2cDevice::ReadPartial(System.Byte[])
    def read_partial(self, buffer: typing.Union[winrt.system.Array[winrt.system.UInt8], winrt.system.WriteableBuffer], /) -> I2cTransferResult: ...
    # System.Void Windows.Devices.I2c.I2cDevice::Write(System.Byte[])
    def write(self, buffer: typing.Union[winrt.system.Array[winrt.system.UInt8], winrt.system.ReadableBuffer], /) -> None: ...
    # Windows.Devices.I2c.I2cTransferResult Windows.Devices.I2c.I2cDevice::WritePartial(System.Byte[])
    def write_partial(self, buffer: typing.Union[winrt.system.Array[winrt.system.UInt8], winrt.system.ReadableBuffer], /) -> I2cTransferResult: ...
    # System.Void Windows.Devices.I2c.I2cDevice::WriteRead(System.Byte[],System.Byte[])
    def write_read(self, write_buffer: typing.Union[winrt.system.Array[winrt.system.UInt8], winrt.system.ReadableBuffer], read_buffer: typing.Union[winrt.system.Array[winrt.system.UInt8], winrt.system.WriteableBuffer], /) -> None: ...
    # Windows.Devices.I2c.I2cTransferResult Windows.Devices.I2c.I2cDevice::WriteReadPartial(System.Byte[],System.Byte[])
    def write_read_partial(self, write_buffer: typing.Union[winrt.system.Array[winrt.system.UInt8], winrt.system.ReadableBuffer], read_buffer: typing.Union[winrt.system.Array[winrt.system.UInt8], winrt.system.WriteableBuffer], /) -> I2cTransferResult: ...
    # Windows.Devices.I2c.I2cConnectionSettings Windows.Devices.I2c.I2cDevice::get_ConnectionSettings()
    @_property
    def connection_settings(self) -> I2cConnectionSettings: ...
    # System.String Windows.Devices.I2c.I2cDevice::get_DeviceId()
    @_property
    def device_id(self) -> str: ...

@typing.final
class _II2cDeviceStatics: ...

class II2cDeviceStatics(winrt._winrt.IInspectable):
    # Windows.Foundation.IAsyncOperation`1<Windows.Devices.I2c.I2cDevice> Windows.Devices.I2c.II2cDeviceStatics::FromIdAsync(System.String,Windows.Devices.I2c.I2cConnectionSettings)
    @abstractmethod
    def from_id_async(self, device_id: str, settings: I2cConnectionSettings, /) -> windows_foundation.IAsyncOperation[I2cDevice]: ...
    # System.String Windows.Devices.I2c.II2cDeviceStatics::GetDeviceSelector()
    @abstractmethod
    def get_device_selector(self) -> str: ...
    # System.String Windows.Devices.I2c.II2cDeviceStatics::GetDeviceSelector(System.String)
    @abstractmethod
    def get_device_selector_from_friendly_name(self, friendly_name: str, /) -> str: ...

