# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-alpha.6

import enum
import typing
import uuid

import bleak_winrt._winrt as _winrt
try:
    import bleak_winrt.windows.foundation
except Exception:
    pass

try:
    import bleak_winrt.windows.foundation.collections
except Exception:
    pass

try:
    import bleak_winrt.windows.storage
except Exception:
    pass

try:
    import bleak_winrt.windows.system
except Exception:
    pass

class ByteOrder(enum.IntEnum):
    LITTLE_ENDIAN = 0
    BIG_ENDIAN = 1

class FileOpenDisposition(enum.IntEnum):
    OPEN_EXISTING = 0
    OPEN_ALWAYS = 1
    CREATE_NEW = 2
    CREATE_ALWAYS = 3
    TRUNCATE_EXISTING = 4

class InputStreamOptions(enum.IntFlag):
    NONE = 0
    PARTIAL = 0x1
    READ_AHEAD = 0x2

class UnicodeEncoding(enum.IntEnum):
    UTF8 = 0
    UTF16_L_E = 1
    UTF16_B_E = 2

class Buffer(IBuffer, _winrt.winrt_base):
    ...
    length: int
    capacity: int
    def create_copy_from_memory_buffer(input: bleak_winrt.windows.foundation.IMemoryBuffer) -> Buffer:
        ...
    def create_memory_buffer_over_i_buffer(input: IBuffer) -> bleak_winrt.windows.foundation.MemoryBuffer:
        ...

class DataReader(IDataReader, bleak_winrt.windows.foundation.IClosable, typing.ContextManager[DataReader], _winrt.winrt_base):
    ...
    unicode_encoding: UnicodeEncoding
    input_stream_options: InputStreamOptions
    byte_order: ByteOrder
    unconsumed_buffer_length: int
    def read_byte() -> int:
        ...
    def read_bytes(value_size: int) -> typing.List[int]:
        ...
    def read_buffer(length: int) -> IBuffer:
        ...
    def read_boolean() -> bool:
        ...
    def read_guid() -> uuid.UUID:
        ...
    def read_int16() -> int:
        ...
    def read_int32() -> int:
        ...
    def read_int64() -> int:
        ...
    def read_uint16() -> int:
        ...
    def read_uint32() -> int:
        ...
    def read_uint64() -> int:
        ...
    def read_single() -> float:
        ...
    def read_double() -> float:
        ...
    def read_string(code_unit_count: int) -> str:
        ...
    def read_date_time() -> bleak_winrt.windows.foundation.DateTime:
        ...
    def read_time_span() -> bleak_winrt.windows.foundation.TimeSpan:
        ...
    def load_async(count: int) -> DataReaderLoadOperation:
        ...
    def detach_buffer() -> IBuffer:
        ...
    def detach_stream() -> IInputStream:
        ...
    def close() -> None:
        ...
    def from_buffer(buffer: IBuffer) -> DataReader:
        ...

class DataReaderLoadOperation(bleak_winrt.windows.foundation.IAsyncOperation[int], bleak_winrt.windows.foundation.IAsyncInfo, _winrt.winrt_base):
    ...
    error_code: bleak_winrt.windows.foundation.HResult
    id: int
    status: bleak_winrt.windows.foundation.AsyncStatus
    completed: bleak_winrt.windows.foundation.AsyncOperationCompletedHandler[int]
    def get_results() -> int:
        ...
    def cancel() -> None:
        ...
    def close() -> None:
        ...

class DataWriter(IDataWriter, bleak_winrt.windows.foundation.IClosable, typing.ContextManager[DataWriter], _winrt.winrt_base):
    ...
    unicode_encoding: UnicodeEncoding
    byte_order: ByteOrder
    unstored_buffer_length: int
    def write_byte(value: int) -> None:
        ...
    def write_bytes(value: typing.Sequence[int]) -> None:
        ...
    def write_buffer(buffer: IBuffer) -> None:
        ...
    def write_buffer(buffer: IBuffer, start: int, count: int) -> None:
        ...
    def write_boolean(value: bool) -> None:
        ...
    def write_guid(value: uuid.UUID) -> None:
        ...
    def write_int16(value: int) -> None:
        ...
    def write_int32(value: int) -> None:
        ...
    def write_int64(value: int) -> None:
        ...
    def write_uint16(value: int) -> None:
        ...
    def write_uint32(value: int) -> None:
        ...
    def write_uint64(value: int) -> None:
        ...
    def write_single(value: float) -> None:
        ...
    def write_double(value: float) -> None:
        ...
    def write_date_time(value: bleak_winrt.windows.foundation.DateTime) -> None:
        ...
    def write_time_span(value: bleak_winrt.windows.foundation.TimeSpan) -> None:
        ...
    def write_string(value: str) -> int:
        ...
    def measure_string(value: str) -> int:
        ...
    def store_async() -> DataWriterStoreOperation:
        ...
    def flush_async() -> bleak_winrt.windows.foundation.IAsyncOperation[bool]:
        ...
    def detach_buffer() -> IBuffer:
        ...
    def detach_stream() -> IOutputStream:
        ...
    def close() -> None:
        ...

class DataWriterStoreOperation(bleak_winrt.windows.foundation.IAsyncOperation[int], bleak_winrt.windows.foundation.IAsyncInfo, _winrt.winrt_base):
    ...
    error_code: bleak_winrt.windows.foundation.HResult
    id: int
    status: bleak_winrt.windows.foundation.AsyncStatus
    completed: bleak_winrt.windows.foundation.AsyncOperationCompletedHandler[int]
    def get_results() -> int:
        ...
    def cancel() -> None:
        ...
    def close() -> None:
        ...

class FileInputStream(IInputStream, bleak_winrt.windows.foundation.IClosable, typing.ContextManager[FileInputStream], _winrt.winrt_base):
    ...
    def read_async(buffer: IBuffer, count: int, options: InputStreamOptions) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[IBuffer, int]:
        ...
    def close() -> None:
        ...

class FileOutputStream(IOutputStream, bleak_winrt.windows.foundation.IClosable, typing.ContextManager[FileOutputStream], _winrt.winrt_base):
    ...
    def write_async(buffer: IBuffer) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[int, int]:
        ...
    def flush_async() -> bleak_winrt.windows.foundation.IAsyncOperation[bool]:
        ...
    def close() -> None:
        ...

class FileRandomAccessStream(IRandomAccessStream, IOutputStream, bleak_winrt.windows.foundation.IClosable, IInputStream, typing.ContextManager[FileRandomAccessStream], _winrt.winrt_base):
    ...
    size: int
    can_read: bool
    can_write: bool
    position: int
    def get_input_stream_at(position: int) -> IInputStream:
        ...
    def get_output_stream_at(position: int) -> IOutputStream:
        ...
    def seek(position: int) -> None:
        ...
    def clone_stream() -> IRandomAccessStream:
        ...
    def close() -> None:
        ...
    def read_async(buffer: IBuffer, count: int, options: InputStreamOptions) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[IBuffer, int]:
        ...
    def write_async(buffer: IBuffer) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[int, int]:
        ...
    def flush_async() -> bleak_winrt.windows.foundation.IAsyncOperation[bool]:
        ...
    def open_async(file_path: str, access_mode: bleak_winrt.windows.storage.FileAccessMode) -> bleak_winrt.windows.foundation.IAsyncOperation[IRandomAccessStream]:
        ...
    def open_async(file_path: str, access_mode: bleak_winrt.windows.storage.FileAccessMode, sharing_options: bleak_winrt.windows.storage.StorageOpenOptions, open_disposition: FileOpenDisposition) -> bleak_winrt.windows.foundation.IAsyncOperation[IRandomAccessStream]:
        ...
    def open_transacted_write_async(file_path: str) -> bleak_winrt.windows.foundation.IAsyncOperation[bleak_winrt.windows.storage.StorageStreamTransaction]:
        ...
    def open_transacted_write_async(file_path: str, open_options: bleak_winrt.windows.storage.StorageOpenOptions, open_disposition: FileOpenDisposition) -> bleak_winrt.windows.foundation.IAsyncOperation[bleak_winrt.windows.storage.StorageStreamTransaction]:
        ...
    def open_for_user_async(user: bleak_winrt.windows.system.User, file_path: str, access_mode: bleak_winrt.windows.storage.FileAccessMode) -> bleak_winrt.windows.foundation.IAsyncOperation[IRandomAccessStream]:
        ...
    def open_for_user_async(user: bleak_winrt.windows.system.User, file_path: str, access_mode: bleak_winrt.windows.storage.FileAccessMode, sharing_options: bleak_winrt.windows.storage.StorageOpenOptions, open_disposition: FileOpenDisposition) -> bleak_winrt.windows.foundation.IAsyncOperation[IRandomAccessStream]:
        ...
    def open_transacted_write_for_user_async(user: bleak_winrt.windows.system.User, file_path: str) -> bleak_winrt.windows.foundation.IAsyncOperation[bleak_winrt.windows.storage.StorageStreamTransaction]:
        ...
    def open_transacted_write_for_user_async(user: bleak_winrt.windows.system.User, file_path: str, open_options: bleak_winrt.windows.storage.StorageOpenOptions, open_disposition: FileOpenDisposition) -> bleak_winrt.windows.foundation.IAsyncOperation[bleak_winrt.windows.storage.StorageStreamTransaction]:
        ...

class InMemoryRandomAccessStream(IRandomAccessStream, IOutputStream, bleak_winrt.windows.foundation.IClosable, IInputStream, typing.ContextManager[InMemoryRandomAccessStream], _winrt.winrt_base):
    ...
    size: int
    can_read: bool
    can_write: bool
    position: int
    def get_input_stream_at(position: int) -> IInputStream:
        ...
    def get_output_stream_at(position: int) -> IOutputStream:
        ...
    def seek(position: int) -> None:
        ...
    def clone_stream() -> IRandomAccessStream:
        ...
    def close() -> None:
        ...
    def read_async(buffer: IBuffer, count: int, options: InputStreamOptions) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[IBuffer, int]:
        ...
    def write_async(buffer: IBuffer) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[int, int]:
        ...
    def flush_async() -> bleak_winrt.windows.foundation.IAsyncOperation[bool]:
        ...

class InputStreamOverStream(IInputStream, bleak_winrt.windows.foundation.IClosable, typing.ContextManager[InputStreamOverStream], _winrt.winrt_base):
    ...
    def read_async(buffer: IBuffer, count: int, options: InputStreamOptions) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[IBuffer, int]:
        ...
    def close() -> None:
        ...

class OutputStreamOverStream(IOutputStream, bleak_winrt.windows.foundation.IClosable, typing.ContextManager[OutputStreamOverStream], _winrt.winrt_base):
    ...
    def write_async(buffer: IBuffer) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[int, int]:
        ...
    def flush_async() -> bleak_winrt.windows.foundation.IAsyncOperation[bool]:
        ...
    def close() -> None:
        ...

class RandomAccessStream(_winrt.winrt_base):
    ...
    def copy_async(source: IInputStream, destination: IOutputStream) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[int, int]:
        ...
    def copy_async(source: IInputStream, destination: IOutputStream, bytes_to_copy: int) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[int, int]:
        ...
    def copy_and_close_async(source: IInputStream, destination: IOutputStream) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[int, int]:
        ...

class RandomAccessStreamOverStream(IRandomAccessStream, IOutputStream, bleak_winrt.windows.foundation.IClosable, IInputStream, typing.ContextManager[RandomAccessStreamOverStream], _winrt.winrt_base):
    ...
    size: int
    can_read: bool
    can_write: bool
    position: int
    def get_input_stream_at(position: int) -> IInputStream:
        ...
    def get_output_stream_at(position: int) -> IOutputStream:
        ...
    def seek(position: int) -> None:
        ...
    def clone_stream() -> IRandomAccessStream:
        ...
    def close() -> None:
        ...
    def read_async(buffer: IBuffer, count: int, options: InputStreamOptions) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[IBuffer, int]:
        ...
    def write_async(buffer: IBuffer) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[int, int]:
        ...
    def flush_async() -> bleak_winrt.windows.foundation.IAsyncOperation[bool]:
        ...

class RandomAccessStreamReference(IRandomAccessStreamReference, _winrt.winrt_base):
    ...
    def open_read_async() -> bleak_winrt.windows.foundation.IAsyncOperation[IRandomAccessStreamWithContentType]:
        ...
    def create_from_file(file: bleak_winrt.windows.storage.IStorageFile) -> RandomAccessStreamReference:
        ...
    def create_from_uri(uri: bleak_winrt.windows.foundation.Uri) -> RandomAccessStreamReference:
        ...
    def create_from_stream(stream: IRandomAccessStream) -> RandomAccessStreamReference:
        ...

class IBuffer(_winrt.winrt_base):
    ...
    capacity: int
    length: int

class IContentTypeProvider(_winrt.winrt_base):
    ...
    content_type: str

class IDataReader(_winrt.winrt_base):
    ...
    byte_order: ByteOrder
    input_stream_options: InputStreamOptions
    unconsumed_buffer_length: int
    unicode_encoding: UnicodeEncoding
    def read_byte() -> int:
        ...
    def read_bytes(value_size: int) -> typing.List[int]:
        ...
    def read_buffer(length: int) -> IBuffer:
        ...
    def read_boolean() -> bool:
        ...
    def read_guid() -> uuid.UUID:
        ...
    def read_int16() -> int:
        ...
    def read_int32() -> int:
        ...
    def read_int64() -> int:
        ...
    def read_uint16() -> int:
        ...
    def read_uint32() -> int:
        ...
    def read_uint64() -> int:
        ...
    def read_single() -> float:
        ...
    def read_double() -> float:
        ...
    def read_string(code_unit_count: int) -> str:
        ...
    def read_date_time() -> bleak_winrt.windows.foundation.DateTime:
        ...
    def read_time_span() -> bleak_winrt.windows.foundation.TimeSpan:
        ...
    def load_async(count: int) -> DataReaderLoadOperation:
        ...
    def detach_buffer() -> IBuffer:
        ...
    def detach_stream() -> IInputStream:
        ...

class IDataWriter(_winrt.winrt_base):
    ...
    byte_order: ByteOrder
    unicode_encoding: UnicodeEncoding
    unstored_buffer_length: int
    def write_byte(value: int) -> None:
        ...
    def write_bytes(value: typing.Sequence[int]) -> None:
        ...
    def write_buffer(buffer: IBuffer) -> None:
        ...
    def write_buffer(buffer: IBuffer, start: int, count: int) -> None:
        ...
    def write_boolean(value: bool) -> None:
        ...
    def write_guid(value: uuid.UUID) -> None:
        ...
    def write_int16(value: int) -> None:
        ...
    def write_int32(value: int) -> None:
        ...
    def write_int64(value: int) -> None:
        ...
    def write_uint16(value: int) -> None:
        ...
    def write_uint32(value: int) -> None:
        ...
    def write_uint64(value: int) -> None:
        ...
    def write_single(value: float) -> None:
        ...
    def write_double(value: float) -> None:
        ...
    def write_date_time(value: bleak_winrt.windows.foundation.DateTime) -> None:
        ...
    def write_time_span(value: bleak_winrt.windows.foundation.TimeSpan) -> None:
        ...
    def write_string(value: str) -> int:
        ...
    def measure_string(value: str) -> int:
        ...
    def store_async() -> DataWriterStoreOperation:
        ...
    def flush_async() -> bleak_winrt.windows.foundation.IAsyncOperation[bool]:
        ...
    def detach_buffer() -> IBuffer:
        ...
    def detach_stream() -> IOutputStream:
        ...

class IInputStream(bleak_winrt.windows.foundation.IClosable, typing.ContextManager[IInputStream], _winrt.winrt_base):
    ...
    def read_async(buffer: IBuffer, count: int, options: InputStreamOptions) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[IBuffer, int]:
        ...
    def close() -> None:
        ...

class IInputStreamReference(_winrt.winrt_base):
    ...
    def open_sequential_read_async() -> bleak_winrt.windows.foundation.IAsyncOperation[IInputStream]:
        ...

class IOutputStream(bleak_winrt.windows.foundation.IClosable, typing.ContextManager[IOutputStream], _winrt.winrt_base):
    ...
    def write_async(buffer: IBuffer) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[int, int]:
        ...
    def flush_async() -> bleak_winrt.windows.foundation.IAsyncOperation[bool]:
        ...
    def close() -> None:
        ...

class IPropertySetSerializer(_winrt.winrt_base):
    ...
    def serialize(property_set: bleak_winrt.windows.foundation.collections.IPropertySet) -> IBuffer:
        ...
    def deserialize(property_set: bleak_winrt.windows.foundation.collections.IPropertySet, buffer: IBuffer) -> None:
        ...

class IRandomAccessStream(bleak_winrt.windows.foundation.IClosable, IInputStream, IOutputStream, typing.ContextManager[IRandomAccessStream], _winrt.winrt_base):
    ...
    can_read: bool
    can_write: bool
    position: int
    size: int
    def get_input_stream_at(position: int) -> IInputStream:
        ...
    def get_output_stream_at(position: int) -> IOutputStream:
        ...
    def seek(position: int) -> None:
        ...
    def clone_stream() -> IRandomAccessStream:
        ...
    def close() -> None:
        ...
    def read_async(buffer: IBuffer, count: int, options: InputStreamOptions) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[IBuffer, int]:
        ...
    def write_async(buffer: IBuffer) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[int, int]:
        ...
    def flush_async() -> bleak_winrt.windows.foundation.IAsyncOperation[bool]:
        ...

class IRandomAccessStreamReference(_winrt.winrt_base):
    ...
    def open_read_async() -> bleak_winrt.windows.foundation.IAsyncOperation[IRandomAccessStreamWithContentType]:
        ...

class IRandomAccessStreamWithContentType(IRandomAccessStream, bleak_winrt.windows.foundation.IClosable, IInputStream, IOutputStream, IContentTypeProvider, typing.ContextManager[IRandomAccessStreamWithContentType], _winrt.winrt_base):
    ...
    can_read: bool
    can_write: bool
    position: int
    size: int
    content_type: str
    def get_input_stream_at(position: int) -> IInputStream:
        ...
    def get_output_stream_at(position: int) -> IOutputStream:
        ...
    def seek(position: int) -> None:
        ...
    def clone_stream() -> IRandomAccessStream:
        ...
    def close() -> None:
        ...
    def read_async(buffer: IBuffer, count: int, options: InputStreamOptions) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[IBuffer, int]:
        ...
    def write_async(buffer: IBuffer) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[int, int]:
        ...
    def flush_async() -> bleak_winrt.windows.foundation.IAsyncOperation[bool]:
        ...

