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

import enum
import datetime
import sys
import types
import typing

import winsdk.system
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.networking
import winsdk.windows.storage.streams

class XboxLiveEndpointPairCreationBehaviors(enum.IntFlag):
    NONE = 0
    REEVALUATE_PATH = 0x1

class XboxLiveEndpointPairCreationStatus(enum.IntEnum):
    SUCCEEDED = 0
    NO_LOCAL_NETWORKS = 1
    NO_COMPATIBLE_NETWORK_PATHS = 2
    LOCAL_SYSTEM_NOT_AUTHORIZED = 3
    CANCELED = 4
    TIMED_OUT = 5
    REMOTE_SYSTEM_NOT_AUTHORIZED = 6
    REFUSED_DUE_TO_CONFIGURATION = 7
    UNEXPECTED_INTERNAL_ERROR = 8

class XboxLiveEndpointPairState(enum.IntEnum):
    INVALID = 0
    CREATING_OUTBOUND = 1
    CREATING_INBOUND = 2
    READY = 3
    DELETING_LOCALLY = 4
    REMOTE_ENDPOINT_TERMINATING = 5
    DELETED = 6

class XboxLiveNetworkAccessKind(enum.IntEnum):
    OPEN = 0
    MODERATE = 1
    STRICT = 2

class XboxLiveQualityOfServiceMeasurementStatus(enum.IntEnum):
    NOT_STARTED = 0
    IN_PROGRESS = 1
    IN_PROGRESS_WITH_PROVISIONAL_RESULTS = 2
    SUCCEEDED = 3
    NO_LOCAL_NETWORKS = 4
    NO_COMPATIBLE_NETWORK_PATHS = 5
    LOCAL_SYSTEM_NOT_AUTHORIZED = 6
    CANCELED = 7
    TIMED_OUT = 8
    REMOTE_SYSTEM_NOT_AUTHORIZED = 9
    REFUSED_DUE_TO_CONFIGURATION = 10
    UNEXPECTED_INTERNAL_ERROR = 11

class XboxLiveQualityOfServiceMetric(enum.IntEnum):
    AVERAGE_LATENCY_IN_MILLISECONDS = 0
    MIN_LATENCY_IN_MILLISECONDS = 1
    MAX_LATENCY_IN_MILLISECONDS = 2
    AVERAGE_OUTBOUND_BITS_PER_SECOND = 3
    MIN_OUTBOUND_BITS_PER_SECOND = 4
    MAX_OUTBOUND_BITS_PER_SECOND = 5
    AVERAGE_INBOUND_BITS_PER_SECOND = 6
    MIN_INBOUND_BITS_PER_SECOND = 7
    MAX_INBOUND_BITS_PER_SECOND = 8

class XboxLiveSocketKind(enum.IntEnum):
    NONE = 0
    DATAGRAM = 1
    STREAM = 2

Self = typing.TypeVar('Self')

class XboxLiveDeviceAddress(winsdk.system.Object):
    is_local: winsdk.system.Boolean
    is_valid: winsdk.system.Boolean
    network_access_kind: XboxLiveNetworkAccessKind
    max_snapshot_bytes_size: typing.ClassVar[winsdk.system.UInt32]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> XboxLiveDeviceAddress: ...
    def compare(self, other_device_address: typing.Optional[XboxLiveDeviceAddress]) -> winsdk.system.Int32: ...
    @staticmethod
    def create_from_snapshot_base64(base64: str) -> typing.Optional[XboxLiveDeviceAddress]: ...
    @staticmethod
    def create_from_snapshot_buffer(buffer: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[XboxLiveDeviceAddress]: ...
    @staticmethod
    def create_from_snapshot_bytes(buffer: winsdk.system.Array[winsdk.system.UInt8]) -> typing.Optional[XboxLiveDeviceAddress]: ...
    @staticmethod
    def get_local() -> typing.Optional[XboxLiveDeviceAddress]: ...
    def get_snapshot_as_base64(self) -> str: ...
    def get_snapshot_as_buffer(self) -> typing.Optional[winsdk.windows.storage.streams.IBuffer]: ...
    def get_snapshot_as_bytes(self, buffer: winsdk.system.Array[winsdk.system.UInt8]) -> winsdk.system.UInt32: ...
    def add_snapshot_changed(self, handler: winsdk.windows.foundation.TypedEventHandler[XboxLiveDeviceAddress, winsdk.system.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_snapshot_changed(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class XboxLiveEndpointPair(winsdk.system.Object):
    local_host_name: typing.Optional[winsdk.windows.networking.HostName]
    local_port: str
    remote_device_address: typing.Optional[XboxLiveDeviceAddress]
    remote_host_name: typing.Optional[winsdk.windows.networking.HostName]
    remote_port: str
    state: XboxLiveEndpointPairState
    template: typing.Optional[XboxLiveEndpointPairTemplate]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> XboxLiveEndpointPair: ...
    def delete_async(self) -> winsdk.windows.foundation.IAsyncAction: ...
    @staticmethod
    def find_endpoint_pair_by_host_names_and_ports(local_host_name: typing.Optional[winsdk.windows.networking.HostName], local_port: str, remote_host_name: typing.Optional[winsdk.windows.networking.HostName], remote_port: str) -> typing.Optional[XboxLiveEndpointPair]: ...
    @staticmethod
    def find_endpoint_pair_by_socket_address_bytes(local_socket_address: winsdk.system.Array[winsdk.system.UInt8], remote_socket_address: winsdk.system.Array[winsdk.system.UInt8]) -> typing.Optional[XboxLiveEndpointPair]: ...
    def get_local_socket_address_bytes(self, socket_address: winsdk.system.Array[winsdk.system.UInt8]) -> None: ...
    def get_remote_socket_address_bytes(self, socket_address: winsdk.system.Array[winsdk.system.UInt8]) -> None: ...
    def add_state_changed(self, handler: winsdk.windows.foundation.TypedEventHandler[XboxLiveEndpointPair, XboxLiveEndpointPairStateChangedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_state_changed(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class XboxLiveEndpointPairCreationResult(winsdk.system.Object):
    device_address: typing.Optional[XboxLiveDeviceAddress]
    endpoint_pair: typing.Optional[XboxLiveEndpointPair]
    is_existing_path_evaluation: winsdk.system.Boolean
    status: XboxLiveEndpointPairCreationStatus
    @staticmethod
    def _from(obj: winsdk.system.Object) -> XboxLiveEndpointPairCreationResult: ...

class XboxLiveEndpointPairStateChangedEventArgs(winsdk.system.Object):
    new_state: XboxLiveEndpointPairState
    old_state: XboxLiveEndpointPairState
    @staticmethod
    def _from(obj: winsdk.system.Object) -> XboxLiveEndpointPairStateChangedEventArgs: ...

class XboxLiveEndpointPairTemplate(winsdk.system.Object):
    acceptor_bound_port_range_lower: winsdk.system.UInt16
    acceptor_bound_port_range_upper: winsdk.system.UInt16
    endpoint_pairs: typing.Optional[winsdk.windows.foundation.collections.IVectorView[XboxLiveEndpointPair]]
    initiator_bound_port_range_lower: winsdk.system.UInt16
    initiator_bound_port_range_upper: winsdk.system.UInt16
    name: str
    socket_kind: XboxLiveSocketKind
    templates: typing.ClassVar[typing.Optional[winsdk.windows.foundation.collections.IVectorView[XboxLiveEndpointPairTemplate]]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> XboxLiveEndpointPairTemplate: ...
    @typing.overload
    def create_endpoint_pair_async(self, device_address: typing.Optional[XboxLiveDeviceAddress]) -> winsdk.windows.foundation.IAsyncOperation[XboxLiveEndpointPairCreationResult]: ...
    @typing.overload
    def create_endpoint_pair_async(self, device_address: typing.Optional[XboxLiveDeviceAddress], behaviors: XboxLiveEndpointPairCreationBehaviors) -> winsdk.windows.foundation.IAsyncOperation[XboxLiveEndpointPairCreationResult]: ...
    @typing.overload
    def create_endpoint_pair_for_ports_async(self, device_address: typing.Optional[XboxLiveDeviceAddress], initiator_port: str, acceptor_port: str) -> winsdk.windows.foundation.IAsyncOperation[XboxLiveEndpointPairCreationResult]: ...
    @typing.overload
    def create_endpoint_pair_for_ports_async(self, device_address: typing.Optional[XboxLiveDeviceAddress], initiator_port: str, acceptor_port: str, behaviors: XboxLiveEndpointPairCreationBehaviors) -> winsdk.windows.foundation.IAsyncOperation[XboxLiveEndpointPairCreationResult]: ...
    @staticmethod
    def get_template_by_name(name: str) -> typing.Optional[XboxLiveEndpointPairTemplate]: ...
    def add_inbound_endpoint_pair_created(self, handler: winsdk.windows.foundation.TypedEventHandler[XboxLiveEndpointPairTemplate, XboxLiveInboundEndpointPairCreatedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_inbound_endpoint_pair_created(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class XboxLiveInboundEndpointPairCreatedEventArgs(winsdk.system.Object):
    endpoint_pair: typing.Optional[XboxLiveEndpointPair]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> XboxLiveInboundEndpointPairCreatedEventArgs: ...

class XboxLiveQualityOfServiceMeasurement(winsdk.system.Object):
    timeout_in_milliseconds: winsdk.system.UInt32
    should_request_private_payloads: winsdk.system.Boolean
    number_of_probes_to_attempt: winsdk.system.UInt32
    device_addresses: typing.Optional[winsdk.windows.foundation.collections.IVector[XboxLiveDeviceAddress]]
    metric_results: typing.Optional[winsdk.windows.foundation.collections.IVectorView[XboxLiveQualityOfServiceMetricResult]]
    metrics: typing.Optional[winsdk.windows.foundation.collections.IVector[XboxLiveQualityOfServiceMetric]]
    number_of_results_pending: winsdk.system.UInt32
    private_payload_results: typing.Optional[winsdk.windows.foundation.collections.IVectorView[XboxLiveQualityOfServicePrivatePayloadResult]]
    published_private_payload: typing.ClassVar[typing.Optional[winsdk.windows.storage.streams.IBuffer]]
    max_simultaneous_probe_connections: typing.ClassVar[winsdk.system.UInt32]
    is_system_outbound_bandwidth_constrained: typing.ClassVar[winsdk.system.Boolean]
    is_system_inbound_bandwidth_constrained: typing.ClassVar[winsdk.system.Boolean]
    max_private_payload_size: typing.ClassVar[winsdk.system.UInt32]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> XboxLiveQualityOfServiceMeasurement: ...
    def __new__(cls: typing.Type[XboxLiveQualityOfServiceMeasurement]) -> XboxLiveQualityOfServiceMeasurement:...
    @staticmethod
    def clear_private_payload() -> None: ...
    def get_metric_result(self, device_address: typing.Optional[XboxLiveDeviceAddress], metric: XboxLiveQualityOfServiceMetric) -> typing.Optional[XboxLiveQualityOfServiceMetricResult]: ...
    def get_metric_results_for_device(self, device_address: typing.Optional[XboxLiveDeviceAddress]) -> typing.Optional[winsdk.windows.foundation.collections.IVectorView[XboxLiveQualityOfServiceMetricResult]]: ...
    def get_metric_results_for_metric(self, metric: XboxLiveQualityOfServiceMetric) -> typing.Optional[winsdk.windows.foundation.collections.IVectorView[XboxLiveQualityOfServiceMetricResult]]: ...
    def get_private_payload_result(self, device_address: typing.Optional[XboxLiveDeviceAddress]) -> typing.Optional[XboxLiveQualityOfServicePrivatePayloadResult]: ...
    def measure_async(self) -> winsdk.windows.foundation.IAsyncAction: ...
    @staticmethod
    def publish_private_payload_bytes(payload: winsdk.system.Array[winsdk.system.UInt8]) -> None: ...

class XboxLiveQualityOfServiceMetricResult(winsdk.system.Object):
    device_address: typing.Optional[XboxLiveDeviceAddress]
    metric: XboxLiveQualityOfServiceMetric
    status: XboxLiveQualityOfServiceMeasurementStatus
    value: winsdk.system.UInt64
    @staticmethod
    def _from(obj: winsdk.system.Object) -> XboxLiveQualityOfServiceMetricResult: ...

class XboxLiveQualityOfServicePrivatePayloadResult(winsdk.system.Object):
    device_address: typing.Optional[XboxLiveDeviceAddress]
    status: XboxLiveQualityOfServiceMeasurementStatus
    value: typing.Optional[winsdk.windows.storage.streams.IBuffer]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> XboxLiveQualityOfServicePrivatePayloadResult: ...

