# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2

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.enumeration
import winrt.windows.foundation
import winrt.windows.foundation.collections
import winrt.windows.networking
import winrt.windows.networking.sockets
import winrt.windows.storage.streams

from winrt.windows.devices.wifidirect.services import WiFiDirectServiceAdvertisementStatus, WiFiDirectServiceConfigurationMethod, WiFiDirectServiceError, WiFiDirectServiceIPProtocol, WiFiDirectServiceSessionErrorStatus, WiFiDirectServiceSessionStatus, WiFiDirectServiceStatus

Self = typing.TypeVar('Self')

@typing.final
class WiFiDirectService_Static(type):
    def from_id_async(cls, device_id: str, /) -> winrt.windows.foundation.IAsyncOperation[WiFiDirectService]: ...
    @typing.overload
    def get_selector(cls, service_name: str, /) -> str: ...
    @typing.overload
    def get_selector(cls, service_name: str, service_info_filter: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> str: ...

@typing.final
class WiFiDirectService(winrt.system.Object, metaclass=WiFiDirectService_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WiFiDirectService: ...
    @typing.overload
    def connect_async(self) -> winrt.windows.foundation.IAsyncOperation[WiFiDirectServiceSession]: ...
    @typing.overload
    def connect_async(self, pin: str, /) -> winrt.windows.foundation.IAsyncOperation[WiFiDirectServiceSession]: ...
    def get_provisioning_info_async(self, selected_configuration_method: WiFiDirectServiceConfigurationMethod, /) -> winrt.windows.foundation.IAsyncOperation[WiFiDirectServiceProvisioningInfo]: ...
    def add_session_deferred(self, handler: winrt.windows.foundation.TypedEventHandler[WiFiDirectService, WiFiDirectServiceSessionDeferredEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_session_deferred(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def session_info(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @session_info.setter
    def session_info(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer]) -> None: ...
    @_property
    def prefer_group_owner_mode(self) -> bool: ...
    @prefer_group_owner_mode.setter
    def prefer_group_owner_mode(self, value: bool) -> None: ...
    @_property
    def remote_service_info(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def service_error(self) -> WiFiDirectServiceError: ...
    @_property
    def supported_configuration_methods(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[WiFiDirectServiceConfigurationMethod]]: ...

@typing.final
class WiFiDirectServiceAdvertiser(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WiFiDirectServiceAdvertiser: ...
    def __new__(cls: typing.Type[WiFiDirectServiceAdvertiser], service_name: str) -> WiFiDirectServiceAdvertiser:...
    @typing.overload
    def connect_async(self, device_info: typing.Optional[winrt.windows.devices.enumeration.DeviceInformation], /) -> winrt.windows.foundation.IAsyncOperation[WiFiDirectServiceSession]: ...
    @typing.overload
    def connect_async(self, device_info: typing.Optional[winrt.windows.devices.enumeration.DeviceInformation], pin: str, /) -> winrt.windows.foundation.IAsyncOperation[WiFiDirectServiceSession]: ...
    def start(self) -> None: ...
    def stop(self) -> None: ...
    def add_advertisement_status_changed(self, handler: winrt.windows.foundation.TypedEventHandler[WiFiDirectServiceAdvertiser, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_advertisement_status_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_auto_accept_session_connected(self, handler: winrt.windows.foundation.TypedEventHandler[WiFiDirectServiceAdvertiser, WiFiDirectServiceAutoAcceptSessionConnectedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_auto_accept_session_connected(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_session_requested(self, handler: winrt.windows.foundation.TypedEventHandler[WiFiDirectServiceAdvertiser, WiFiDirectServiceSessionRequestedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_session_requested(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def service_status(self) -> WiFiDirectServiceStatus: ...
    @service_status.setter
    def service_status(self, value: WiFiDirectServiceStatus) -> None: ...
    @_property
    def service_info(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @service_info.setter
    def service_info(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer]) -> None: ...
    @_property
    def prefer_group_owner_mode(self) -> bool: ...
    @prefer_group_owner_mode.setter
    def prefer_group_owner_mode(self, value: bool) -> None: ...
    @_property
    def deferred_session_info(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @deferred_session_info.setter
    def deferred_session_info(self, value: typing.Optional[winrt.windows.storage.streams.IBuffer]) -> None: ...
    @_property
    def custom_service_status_code(self) -> winrt.system.UInt32: ...
    @custom_service_status_code.setter
    def custom_service_status_code(self, value: winrt.system.UInt32) -> None: ...
    @_property
    def auto_accept_session(self) -> bool: ...
    @auto_accept_session.setter
    def auto_accept_session(self, value: bool) -> None: ...
    @_property
    def service_error(self) -> WiFiDirectServiceError: ...
    @_property
    def preferred_configuration_methods(self) -> typing.Optional[winrt.windows.foundation.collections.IVector[WiFiDirectServiceConfigurationMethod]]: ...
    @_property
    def service_name(self) -> str: ...
    @_property
    def service_name_prefixes(self) -> typing.Optional[winrt.windows.foundation.collections.IVector[str]]: ...
    @_property
    def advertisement_status(self) -> WiFiDirectServiceAdvertisementStatus: ...

@typing.final
class WiFiDirectServiceAutoAcceptSessionConnectedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WiFiDirectServiceAutoAcceptSessionConnectedEventArgs: ...
    @_property
    def session(self) -> typing.Optional[WiFiDirectServiceSession]: ...
    @_property
    def session_info(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...

@typing.final
class WiFiDirectServiceProvisioningInfo(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WiFiDirectServiceProvisioningInfo: ...
    @_property
    def is_group_formation_needed(self) -> bool: ...
    @_property
    def selected_configuration_method(self) -> WiFiDirectServiceConfigurationMethod: ...

@typing.final
class WiFiDirectServiceRemotePortAddedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WiFiDirectServiceRemotePortAddedEventArgs: ...
    @_property
    def endpoint_pairs(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[winrt.windows.networking.EndpointPair]]: ...
    @_property
    def protocol(self) -> WiFiDirectServiceIPProtocol: ...

@typing.final
class WiFiDirectServiceSession(winrt.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WiFiDirectServiceSession: ...
    def add_datagram_socket_async(self, value: typing.Optional[winrt.windows.networking.sockets.DatagramSocket], /) -> winrt.windows.foundation.IAsyncAction: ...
    def add_stream_socket_listener_async(self, value: typing.Optional[winrt.windows.networking.sockets.StreamSocketListener], /) -> winrt.windows.foundation.IAsyncAction: ...
    def close(self) -> None: ...
    def get_connection_endpoint_pairs(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[winrt.windows.networking.EndpointPair]]: ...
    def add_remote_port_added(self, handler: winrt.windows.foundation.TypedEventHandler[WiFiDirectServiceSession, WiFiDirectServiceRemotePortAddedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_remote_port_added(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_session_status_changed(self, handler: winrt.windows.foundation.TypedEventHandler[WiFiDirectServiceSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_session_status_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def advertisement_id(self) -> winrt.system.UInt32: ...
    @_property
    def error_status(self) -> WiFiDirectServiceSessionErrorStatus: ...
    @_property
    def service_address(self) -> str: ...
    @_property
    def service_name(self) -> str: ...
    @_property
    def session_address(self) -> str: ...
    @_property
    def session_id(self) -> winrt.system.UInt32: ...
    @_property
    def status(self) -> WiFiDirectServiceSessionStatus: ...

@typing.final
class WiFiDirectServiceSessionDeferredEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WiFiDirectServiceSessionDeferredEventArgs: ...
    @_property
    def deferred_session_info(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...

@typing.final
class WiFiDirectServiceSessionRequest(winrt.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WiFiDirectServiceSessionRequest: ...
    def close(self) -> None: ...
    @_property
    def device_information(self) -> typing.Optional[winrt.windows.devices.enumeration.DeviceInformation]: ...
    @_property
    def provisioning_info(self) -> typing.Optional[WiFiDirectServiceProvisioningInfo]: ...
    @_property
    def session_info(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...

@typing.final
class WiFiDirectServiceSessionRequestedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WiFiDirectServiceSessionRequestedEventArgs: ...
    def get_session_request(self) -> typing.Optional[WiFiDirectServiceSessionRequest]: ...

