# 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.foundation.collections as windows_foundation_collections
import winrt.windows.networking as windows_networking
import winrt.windows.networking.connectivity as windows_networking_connectivity
import winrt.windows.networking.sockets as windows_networking_sockets

from winrt.windows.networking.servicediscovery.dnssd import DnssdRegistrationStatus, DnssdServiceWatcherStatus

Self = typing.TypeVar('Self')

@typing.final
class DnssdRegistrationResult(winrt.system.Object):
    def __str__(self) -> str: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> DnssdRegistrationResult: ...
    def __new__(cls: typing.Type[DnssdRegistrationResult]) -> DnssdRegistrationResult: ...
    def to_string(self) -> str: ...
    @_property
    def has_instance_name_changed(self) -> bool: ...
    @_property
    def ip_address(self) -> typing.Optional[windows_networking.HostName]: ...
    @_property
    def status(self) -> DnssdRegistrationStatus: ...

@typing.final
class DnssdServiceInstance(winrt.system.Object):
    def __str__(self) -> str: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> DnssdServiceInstance: ...
    def __new__(cls: typing.Type[DnssdServiceInstance], dnssd_service_instance_name: str, host_name: typing.Optional[windows_networking.HostName], port: winrt.system.UInt16) -> DnssdServiceInstance: ...
    @typing.overload
    def register_datagram_socket_async(self, socket: typing.Optional[windows_networking_sockets.DatagramSocket], /) -> windows_foundation.IAsyncOperation[DnssdRegistrationResult]: ...
    @typing.overload
    def register_datagram_socket_async(self, socket: typing.Optional[windows_networking_sockets.DatagramSocket], adapter: typing.Optional[windows_networking_connectivity.NetworkAdapter], /) -> windows_foundation.IAsyncOperation[DnssdRegistrationResult]: ...
    @typing.overload
    def register_stream_socket_listener_async(self, socket: typing.Optional[windows_networking_sockets.StreamSocketListener], /) -> windows_foundation.IAsyncOperation[DnssdRegistrationResult]: ...
    @typing.overload
    def register_stream_socket_listener_async(self, socket: typing.Optional[windows_networking_sockets.StreamSocketListener], adapter: typing.Optional[windows_networking_connectivity.NetworkAdapter], /) -> windows_foundation.IAsyncOperation[DnssdRegistrationResult]: ...
    def to_string(self) -> str: ...
    @_property
    def weight(self) -> winrt.system.UInt16: ...
    @weight.setter
    def weight(self, value: winrt.system.UInt16) -> None: ...
    @_property
    def priority(self) -> winrt.system.UInt16: ...
    @priority.setter
    def priority(self, value: winrt.system.UInt16) -> None: ...
    @_property
    def port(self) -> winrt.system.UInt16: ...
    @port.setter
    def port(self, value: winrt.system.UInt16) -> None: ...
    @_property
    def host_name(self) -> typing.Optional[windows_networking.HostName]: ...
    @host_name.setter
    def host_name(self, value: typing.Optional[windows_networking.HostName]) -> None: ...
    @_property
    def dnssd_service_instance_name(self) -> str: ...
    @dnssd_service_instance_name.setter
    def dnssd_service_instance_name(self, value: str) -> None: ...
    @_property
    def text_attributes(self) -> typing.Optional[windows_foundation_collections.IMap[str, str]]: ...

@typing.final
class DnssdServiceInstanceCollection(winrt.system.Object, winrt._winrt.Sequence[DnssdServiceInstance]):
    def __len__(self) -> int: ...
    def __iter__(self) -> windows_foundation_collections.IIterator[DnssdServiceInstance]: ...
    @typing.overload
    def __getitem__(self, index: typing.SupportsIndex) -> DnssdServiceInstance: ...
    @typing.overload
    def __getitem__(self, index: slice) -> winrt.system.Array[DnssdServiceInstance]: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> DnssdServiceInstanceCollection: ...
    def first(self) -> typing.Optional[windows_foundation_collections.IIterator[DnssdServiceInstance]]: ...
    def get_at(self, index: winrt.system.UInt32, /) -> typing.Optional[DnssdServiceInstance]: ...
    def get_many(self, start_index: winrt.system.UInt32, items: typing.Union[winrt.system.Array[DnssdServiceInstance], winrt.system.WriteableBuffer], /) -> winrt.system.UInt32: ...
    def index_of(self, value: typing.Optional[DnssdServiceInstance], /) -> typing.Tuple[bool, winrt.system.UInt32]: ...
    @_property
    def size(self) -> winrt.system.UInt32: ...

@typing.final
class DnssdServiceWatcher(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> DnssdServiceWatcher: ...
    def start(self) -> None: ...
    def stop(self) -> None: ...
    def add_added(self, handler: windows_foundation.TypedEventHandler[DnssdServiceWatcher, DnssdServiceInstance], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_added(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_enumeration_completed(self, handler: windows_foundation.TypedEventHandler[DnssdServiceWatcher, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_enumeration_completed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_stopped(self, handler: windows_foundation.TypedEventHandler[DnssdServiceWatcher, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_stopped(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def status(self) -> DnssdServiceWatcherStatus: ...

