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

import enum
import datetime
import sys
import types
import typing

import winsdk.system
import winsdk.windows.devices.enumeration
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.globalization
import winsdk.windows.networking.sockets
import winsdk.windows.security.credentials
import winsdk.windows.security.cryptography.certificates

class AllJoynAuthenticationMechanism(enum.IntEnum):
    NONE = 0
    SRP_ANONYMOUS = 1
    SRP_LOGON = 2
    ECDHE_NULL = 3
    ECDHE_PSK = 4
    ECDHE_ECDSA = 5
    ECDHE_SPEKE = 6

class AllJoynBusAttachmentState(enum.IntEnum):
    DISCONNECTED = 0
    CONNECTING = 1
    CONNECTED = 2
    DISCONNECTING = 3

class AllJoynSessionLostReason(enum.IntEnum):
    NONE = 0
    PRODUCER_LEFT_SESSION = 1
    PRODUCER_CLOSED_ABRUPTLY = 2
    REMOVED_BY_PRODUCER = 3
    LINK_TIMEOUT = 4
    OTHER = 5

class AllJoynTrafficType(enum.IntEnum):
    UNKNOWN = 0
    MESSAGES = 1
    RAW_UNRELIABLE = 2
    RAW_RELIABLE = 4

Self = typing.TypeVar('Self')

class AllJoynAboutData(winsdk.system.Object):
    default_description: str
    default_app_name: str
    date_of_manufacture: typing.Optional[typing.Optional[datetime.datetime]]
    default_manufacturer: str
    app_id: winsdk.system.Guid
    support_url: typing.Optional[winsdk.windows.foundation.Uri]
    software_version: str
    model_number: str
    is_enabled: winsdk.system.Boolean
    app_names: typing.Optional[winsdk.windows.foundation.collections.IMap[str, str]]
    manufacturers: typing.Optional[winsdk.windows.foundation.collections.IMap[str, str]]
    descriptions: typing.Optional[winsdk.windows.foundation.collections.IMap[str, str]]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynAboutData: ...

class AllJoynAboutDataView(winsdk.system.Object):
    a_j_software_version: str
    app_id: winsdk.system.Guid
    app_name: str
    date_of_manufacture: typing.Optional[typing.Optional[datetime.datetime]]
    default_language: typing.Optional[winsdk.windows.globalization.Language]
    description: str
    device_id: str
    device_name: str
    hardware_version: str
    manufacturer: str
    model_number: str
    properties: typing.Optional[winsdk.windows.foundation.collections.IMapView[str, winsdk.system.Object]]
    software_version: str
    status: winsdk.system.Int32
    support_url: typing.Optional[winsdk.windows.foundation.Uri]
    supported_languages: typing.Optional[winsdk.windows.foundation.collections.IVectorView[winsdk.windows.globalization.Language]]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynAboutDataView: ...
    @typing.overload
    @staticmethod
    def get_data_by_session_port_async(unique_name: str, bus_attachment: typing.Optional[AllJoynBusAttachment], session_port: winsdk.system.UInt16, /) -> winsdk.windows.foundation.IAsyncOperation[AllJoynAboutDataView]: ...
    @typing.overload
    @staticmethod
    def get_data_by_session_port_async(unique_name: str, bus_attachment: typing.Optional[AllJoynBusAttachment], session_port: winsdk.system.UInt16, language: typing.Optional[winsdk.windows.globalization.Language], /) -> winsdk.windows.foundation.IAsyncOperation[AllJoynAboutDataView]: ...

class AllJoynAcceptSessionJoinerEventArgs(winsdk.system.Object):
    same_network: winsdk.system.Boolean
    same_physical_node: winsdk.system.Boolean
    session_port: winsdk.system.UInt16
    traffic_type: AllJoynTrafficType
    unique_name: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynAcceptSessionJoinerEventArgs: ...
    def __new__(cls: typing.Type[AllJoynAcceptSessionJoinerEventArgs], unique_name: str, session_port: winsdk.system.UInt16, traffic_type: AllJoynTrafficType, proximity: winsdk.system.UInt8, accept_session_joiner: typing.Optional[IAllJoynAcceptSessionJoiner]) -> AllJoynAcceptSessionJoinerEventArgs:...
    def accept(self) -> None: ...

class AllJoynAuthenticationCompleteEventArgs(winsdk.system.Object):
    authentication_mechanism: AllJoynAuthenticationMechanism
    peer_unique_name: str
    succeeded: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynAuthenticationCompleteEventArgs: ...

class AllJoynBusAttachment(winsdk.system.Object):
    about_data: typing.Optional[AllJoynAboutData]
    authentication_mechanisms: typing.Optional[winsdk.windows.foundation.collections.IVector[AllJoynAuthenticationMechanism]]
    connection_specification: str
    state: AllJoynBusAttachmentState
    unique_name: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynBusAttachment: ...
    @typing.overload
    def __new__(cls: typing.Type[AllJoynBusAttachment], connection_specification: str) -> AllJoynBusAttachment:...
    @typing.overload
    def __new__(cls: typing.Type[AllJoynBusAttachment]) -> AllJoynBusAttachment:...
    def connect(self) -> None: ...
    def disconnect(self) -> None: ...
    @typing.overload
    def get_about_data_async(self, service_info: typing.Optional[AllJoynServiceInfo], /) -> winsdk.windows.foundation.IAsyncOperation[AllJoynAboutDataView]: ...
    @typing.overload
    def get_about_data_async(self, service_info: typing.Optional[AllJoynServiceInfo], language: typing.Optional[winsdk.windows.globalization.Language], /) -> winsdk.windows.foundation.IAsyncOperation[AllJoynAboutDataView]: ...
    @staticmethod
    def get_default() -> typing.Optional[AllJoynBusAttachment]: ...
    @staticmethod
    def get_watcher(required_interfaces: typing.Iterable[str], /) -> typing.Optional[winsdk.windows.devices.enumeration.DeviceWatcher]: ...
    def ping_async(self, unique_name: str, /) -> winsdk.windows.foundation.IAsyncOperation[winsdk.system.Int32]: ...
    def add_authentication_complete(self, handler: winsdk.windows.foundation.TypedEventHandler[AllJoynBusAttachment, AllJoynAuthenticationCompleteEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_authentication_complete(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_credentials_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[AllJoynBusAttachment, AllJoynCredentialsRequestedEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_credentials_requested(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_credentials_verification_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[AllJoynBusAttachment, AllJoynCredentialsVerificationRequestedEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_credentials_verification_requested(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_state_changed(self, handler: winsdk.windows.foundation.TypedEventHandler[AllJoynBusAttachment, AllJoynBusAttachmentStateChangedEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_state_changed(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_accept_session_joiner_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[AllJoynBusAttachment, AllJoynAcceptSessionJoinerEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_accept_session_joiner_requested(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_session_joined(self, handler: winsdk.windows.foundation.TypedEventHandler[AllJoynBusAttachment, AllJoynSessionJoinedEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_session_joined(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...

class AllJoynBusAttachmentStateChangedEventArgs(winsdk.system.Object):
    state: AllJoynBusAttachmentState
    status: winsdk.system.Int32
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynBusAttachmentStateChangedEventArgs: ...

class AllJoynBusObject(winsdk.system.Object):
    bus_attachment: typing.Optional[AllJoynBusAttachment]
    session: typing.Optional[AllJoynSession]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynBusObject: ...
    @typing.overload
    def __new__(cls: typing.Type[AllJoynBusObject], object_path: str) -> AllJoynBusObject:...
    @typing.overload
    def __new__(cls: typing.Type[AllJoynBusObject], object_path: str, bus_attachment: typing.Optional[AllJoynBusAttachment]) -> AllJoynBusObject:...
    @typing.overload
    def __new__(cls: typing.Type[AllJoynBusObject]) -> AllJoynBusObject:...
    def add_producer(self, producer: typing.Optional[IAllJoynProducer], /) -> None: ...
    def start(self) -> None: ...
    def stop(self) -> None: ...
    def add_stopped(self, handler: winsdk.windows.foundation.TypedEventHandler[AllJoynBusObject, AllJoynBusObjectStoppedEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_stopped(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...

class AllJoynBusObjectStoppedEventArgs(winsdk.system.Object):
    status: winsdk.system.Int32
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynBusObjectStoppedEventArgs: ...
    def __new__(cls: typing.Type[AllJoynBusObjectStoppedEventArgs], status: winsdk.system.Int32) -> AllJoynBusObjectStoppedEventArgs:...

class AllJoynCredentials(winsdk.system.Object):
    timeout: datetime.timedelta
    password_credential: typing.Optional[winsdk.windows.security.credentials.PasswordCredential]
    certificate: typing.Optional[winsdk.windows.security.cryptography.certificates.Certificate]
    authentication_mechanism: AllJoynAuthenticationMechanism
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynCredentials: ...

class AllJoynCredentialsRequestedEventArgs(winsdk.system.Object):
    attempt_count: winsdk.system.UInt16
    credentials: typing.Optional[AllJoynCredentials]
    peer_unique_name: str
    requested_user_name: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynCredentialsRequestedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winsdk.windows.foundation.Deferral]: ...

class AllJoynCredentialsVerificationRequestedEventArgs(winsdk.system.Object):
    authentication_mechanism: AllJoynAuthenticationMechanism
    peer_certificate: typing.Optional[winsdk.windows.security.cryptography.certificates.Certificate]
    peer_certificate_error_severity: winsdk.windows.networking.sockets.SocketSslErrorSeverity
    peer_certificate_errors: typing.Optional[winsdk.windows.foundation.collections.IVectorView[winsdk.windows.security.cryptography.certificates.ChainValidationResult]]
    peer_intermediate_certificates: typing.Optional[winsdk.windows.foundation.collections.IVectorView[winsdk.windows.security.cryptography.certificates.Certificate]]
    peer_unique_name: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynCredentialsVerificationRequestedEventArgs: ...
    def accept(self) -> None: ...
    def get_deferral(self) -> typing.Optional[winsdk.windows.foundation.Deferral]: ...

class AllJoynMessageInfo(winsdk.system.Object):
    sender_unique_name: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynMessageInfo: ...
    def __new__(cls: typing.Type[AllJoynMessageInfo], sender_unique_name: str) -> AllJoynMessageInfo:...

class AllJoynProducerStoppedEventArgs(winsdk.system.Object):
    status: winsdk.system.Int32
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynProducerStoppedEventArgs: ...
    def __new__(cls: typing.Type[AllJoynProducerStoppedEventArgs], status: winsdk.system.Int32) -> AllJoynProducerStoppedEventArgs:...

class AllJoynServiceInfo(winsdk.system.Object):
    object_path: str
    session_port: winsdk.system.UInt16
    unique_name: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynServiceInfo: ...
    def __new__(cls: typing.Type[AllJoynServiceInfo], unique_name: str, object_path: str, session_port: winsdk.system.UInt16) -> AllJoynServiceInfo:...
    @staticmethod
    def from_id_async(device_id: str, /) -> winsdk.windows.foundation.IAsyncOperation[AllJoynServiceInfo]: ...

class AllJoynServiceInfoRemovedEventArgs(winsdk.system.Object):
    unique_name: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynServiceInfoRemovedEventArgs: ...
    def __new__(cls: typing.Type[AllJoynServiceInfoRemovedEventArgs], unique_name: str) -> AllJoynServiceInfoRemovedEventArgs:...

class AllJoynSession(winsdk.system.Object):
    id: winsdk.system.Int32
    status: winsdk.system.Int32
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynSession: ...
    @typing.overload
    @staticmethod
    def get_from_service_info_async(service_info: typing.Optional[AllJoynServiceInfo], /) -> winsdk.windows.foundation.IAsyncOperation[AllJoynSession]: ...
    @typing.overload
    @staticmethod
    def get_from_service_info_async(service_info: typing.Optional[AllJoynServiceInfo], bus_attachment: typing.Optional[AllJoynBusAttachment], /) -> winsdk.windows.foundation.IAsyncOperation[AllJoynSession]: ...
    def remove_member_async(self, unique_name: str, /) -> winsdk.windows.foundation.IAsyncOperation[winsdk.system.Int32]: ...
    def add_lost(self, handler: winsdk.windows.foundation.TypedEventHandler[AllJoynSession, AllJoynSessionLostEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_lost(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_member_added(self, handler: winsdk.windows.foundation.TypedEventHandler[AllJoynSession, AllJoynSessionMemberAddedEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_member_added(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_member_removed(self, handler: winsdk.windows.foundation.TypedEventHandler[AllJoynSession, AllJoynSessionMemberRemovedEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_member_removed(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...

class AllJoynSessionJoinedEventArgs(winsdk.system.Object):
    session: typing.Optional[AllJoynSession]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynSessionJoinedEventArgs: ...
    def __new__(cls: typing.Type[AllJoynSessionJoinedEventArgs], session: typing.Optional[AllJoynSession]) -> AllJoynSessionJoinedEventArgs:...

class AllJoynSessionLostEventArgs(winsdk.system.Object):
    reason: AllJoynSessionLostReason
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynSessionLostEventArgs: ...
    def __new__(cls: typing.Type[AllJoynSessionLostEventArgs], reason: AllJoynSessionLostReason) -> AllJoynSessionLostEventArgs:...

class AllJoynSessionMemberAddedEventArgs(winsdk.system.Object):
    unique_name: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynSessionMemberAddedEventArgs: ...
    def __new__(cls: typing.Type[AllJoynSessionMemberAddedEventArgs], unique_name: str) -> AllJoynSessionMemberAddedEventArgs:...

class AllJoynSessionMemberRemovedEventArgs(winsdk.system.Object):
    unique_name: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynSessionMemberRemovedEventArgs: ...
    def __new__(cls: typing.Type[AllJoynSessionMemberRemovedEventArgs], unique_name: str) -> AllJoynSessionMemberRemovedEventArgs:...

class AllJoynStatus(winsdk.system.Object):
    authentication_failed: typing.ClassVar[winsdk.system.Int32]
    authentication_rejected_by_user: typing.ClassVar[winsdk.system.Int32]
    connection_refused: typing.ClassVar[winsdk.system.Int32]
    fail: typing.ClassVar[winsdk.system.Int32]
    insufficient_security: typing.ClassVar[winsdk.system.Int32]
    invalid_argument1: typing.ClassVar[winsdk.system.Int32]
    invalid_argument2: typing.ClassVar[winsdk.system.Int32]
    invalid_argument3: typing.ClassVar[winsdk.system.Int32]
    invalid_argument4: typing.ClassVar[winsdk.system.Int32]
    invalid_argument5: typing.ClassVar[winsdk.system.Int32]
    invalid_argument6: typing.ClassVar[winsdk.system.Int32]
    invalid_argument7: typing.ClassVar[winsdk.system.Int32]
    invalid_argument8: typing.ClassVar[winsdk.system.Int32]
    ok: typing.ClassVar[winsdk.system.Int32]
    operation_timed_out: typing.ClassVar[winsdk.system.Int32]
    other_end_closed: typing.ClassVar[winsdk.system.Int32]
    ssl_connect_failed: typing.ClassVar[winsdk.system.Int32]
    ssl_identity_verification_failed: typing.ClassVar[winsdk.system.Int32]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynStatus: ...

class AllJoynWatcherStoppedEventArgs(winsdk.system.Object):
    status: winsdk.system.Int32
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AllJoynWatcherStoppedEventArgs: ...
    def __new__(cls: typing.Type[AllJoynWatcherStoppedEventArgs], status: winsdk.system.Int32) -> AllJoynWatcherStoppedEventArgs:...

class IAllJoynAcceptSessionJoiner(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> IAllJoynAcceptSessionJoiner: ...
    def accept(self) -> None: ...

class IAllJoynProducer(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> IAllJoynProducer: ...
    def set_bus_object(self, bus_object: typing.Optional[AllJoynBusObject], /) -> None: ...

