# WARNING: Please don't edit this file. It was generated by Python/WinRT v3.1.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, windows_foundation.IStringable):
    def __str__(self) -> str: ...
    def __new__(cls: typing.Type[Self]) -> Self: ...
    # System.String Windows.Networking.ServiceDiscovery.Dnssd.DnssdRegistrationResult::ToString()
    def to_string(self) -> str: ...
    # System.Boolean Windows.Networking.ServiceDiscovery.Dnssd.DnssdRegistrationResult::get_HasInstanceNameChanged()
    @_property
    def has_instance_name_changed(self) -> bool: ...
    # Windows.Networking.HostName Windows.Networking.ServiceDiscovery.Dnssd.DnssdRegistrationResult::get_IPAddress()
    @_property
    def ip_address(self) -> windows_networking.HostName: ...
    # Windows.Networking.ServiceDiscovery.Dnssd.DnssdRegistrationStatus Windows.Networking.ServiceDiscovery.Dnssd.DnssdRegistrationResult::get_Status()
    @_property
    def status(self) -> DnssdRegistrationStatus: ...

@typing.final
class DnssdServiceInstance(winrt.system.Object, windows_foundation.IStringable):
    def __str__(self) -> str: ...
    def __new__(cls: typing.Type[Self], dnssd_service_instance_name: str, host_name: windows_networking.HostName, port: winrt.system.UInt16) -> Self: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Networking.ServiceDiscovery.Dnssd.DnssdRegistrationResult> Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::RegisterDatagramSocketAsync(Windows.Networking.Sockets.DatagramSocket)
    def register_datagram_socket_async1(self, socket: windows_networking_sockets.DatagramSocket, /) -> windows_foundation.IAsyncOperation[DnssdRegistrationResult]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Networking.ServiceDiscovery.Dnssd.DnssdRegistrationResult> Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::RegisterDatagramSocketAsync(Windows.Networking.Sockets.DatagramSocket,Windows.Networking.Connectivity.NetworkAdapter)
    def register_datagram_socket_async2(self, socket: windows_networking_sockets.DatagramSocket, adapter: windows_networking_connectivity.NetworkAdapter, /) -> windows_foundation.IAsyncOperation[DnssdRegistrationResult]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Networking.ServiceDiscovery.Dnssd.DnssdRegistrationResult> Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::RegisterStreamSocketListenerAsync(Windows.Networking.Sockets.StreamSocketListener)
    def register_stream_socket_listener_async1(self, socket: windows_networking_sockets.StreamSocketListener, /) -> windows_foundation.IAsyncOperation[DnssdRegistrationResult]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Networking.ServiceDiscovery.Dnssd.DnssdRegistrationResult> Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::RegisterStreamSocketListenerAsync(Windows.Networking.Sockets.StreamSocketListener,Windows.Networking.Connectivity.NetworkAdapter)
    def register_stream_socket_listener_async2(self, socket: windows_networking_sockets.StreamSocketListener, adapter: windows_networking_connectivity.NetworkAdapter, /) -> windows_foundation.IAsyncOperation[DnssdRegistrationResult]: ...
    # System.String Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::ToString()
    def to_string(self) -> str: ...
    # System.UInt16 Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::get_Weight()
    @_property
    def weight(self) -> winrt.system.UInt16: ...
    # System.Void Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::put_Weight(System.UInt16)
    @weight.setter
    def weight(self, value: winrt.system.UInt16) -> None: ...
    # System.UInt16 Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::get_Priority()
    @_property
    def priority(self) -> winrt.system.UInt16: ...
    # System.Void Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::put_Priority(System.UInt16)
    @priority.setter
    def priority(self, value: winrt.system.UInt16) -> None: ...
    # System.UInt16 Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::get_Port()
    @_property
    def port(self) -> winrt.system.UInt16: ...
    # System.Void Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::put_Port(System.UInt16)
    @port.setter
    def port(self, value: winrt.system.UInt16) -> None: ...
    # Windows.Networking.HostName Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::get_HostName()
    @_property
    def host_name(self) -> windows_networking.HostName: ...
    # System.Void Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::put_HostName(Windows.Networking.HostName)
    @host_name.setter
    def host_name(self, value: windows_networking.HostName) -> None: ...
    # System.String Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::get_DnssdServiceInstanceName()
    @_property
    def dnssd_service_instance_name(self) -> str: ...
    # System.Void Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::put_DnssdServiceInstanceName(System.String)
    @dnssd_service_instance_name.setter
    def dnssd_service_instance_name(self, value: str) -> None: ...
    # Windows.Foundation.Collections.IMap`2<System.String,System.String> Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance::get_TextAttributes()
    @_property
    def text_attributes(self) -> typing.MutableMapping[str, str]: ...

@typing.final
class DnssdServiceInstanceCollection(winrt.system.Object, winrt._winrt.Sequence[DnssdServiceInstance]):
    def __len__(self) -> int: ...
    def __iter__(self) -> typing.Iterator[DnssdServiceInstance]: ...
    @typing.overload
    def __getitem__(self, index: typing.SupportsIndex) -> DnssdServiceInstance: ...
    @typing.overload
    def __getitem__(self, index: slice) -> winrt.system.Array[DnssdServiceInstance]: ...
    # Windows.Foundation.Collections.IIterator`1<Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance> Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstanceCollection::First()
    def first(self) -> windows_foundation_collections.IIterator[DnssdServiceInstance]: ...
    # Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstanceCollection::GetAt(System.UInt32)
    def get_at(self, index: winrt.system.UInt32, /) -> DnssdServiceInstance: ...
    # System.UInt32 Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstanceCollection::GetMany(System.UInt32,Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance[])
    def get_many(self, start_index: winrt.system.UInt32, items: typing.Union[winrt.system.Array[DnssdServiceInstance], winrt.system.WriteableBuffer], /) -> winrt.system.UInt32: ...
    # System.Boolean Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstanceCollection::IndexOf(Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance,System.UInt32&)
    def index_of(self, value: DnssdServiceInstance, /) -> typing.Tuple[bool, winrt.system.UInt32]: ...
    # System.UInt32 Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstanceCollection::get_Size()
    @_property
    def size(self) -> winrt.system.UInt32: ...

@typing.final
class DnssdServiceWatcher(winrt.system.Object):
    # System.Void Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher::Start()
    def start(self) -> None: ...
    # System.Void Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher::Stop()
    def stop(self) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher::add_Added(Windows.Foundation.TypedEventHandler`2<Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher,Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance>)
    def add_added(self, handler: windows_foundation.TypedEventHandler[DnssdServiceWatcher, DnssdServiceInstance], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher::remove_Added(Windows.Foundation.EventRegistrationToken)
    def remove_added(self, token: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher::add_EnumerationCompleted(Windows.Foundation.TypedEventHandler`2<Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher,System.Object>)
    def add_enumeration_completed(self, handler: windows_foundation.TypedEventHandler[DnssdServiceWatcher, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher::remove_EnumerationCompleted(Windows.Foundation.EventRegistrationToken)
    def remove_enumeration_completed(self, token: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher::add_Stopped(Windows.Foundation.TypedEventHandler`2<Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher,System.Object>)
    def add_stopped(self, handler: windows_foundation.TypedEventHandler[DnssdServiceWatcher, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher::remove_Stopped(Windows.Foundation.EventRegistrationToken)
    def remove_stopped(self, token: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcherStatus Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher::get_Status()
    @_property
    def status(self) -> DnssdServiceWatcherStatus: ...

