import typing

import android.net
import android.os
import java
import java.chaquopy
import java.lang
import java.net
import java.util
import java.util.concurrent
import java.util.function

class AttachCallback(java.lang.Object):
    def __init__(self) -> None: ...
    def onAttachFailed(self) -> None: ...
    def onAttached(self, session: WifiAwareSession, /) -> None: ...
    def onAwareSessionTerminated(self) -> None: ...

class AwarePairingConfig(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[AwarePairingConfig]] = ...
    PAIRING_BOOTSTRAPPING_NFC_READER: typing.ClassVar[int] = ...
    PAIRING_BOOTSTRAPPING_NFC_TAG: typing.ClassVar[int] = ...
    PAIRING_BOOTSTRAPPING_OPPORTUNISTIC: typing.ClassVar[int] = ...
    PAIRING_BOOTSTRAPPING_PASSPHRASE_DISPLAY: typing.ClassVar[int] = ...
    PAIRING_BOOTSTRAPPING_PASSPHRASE_KEYPAD: typing.ClassVar[int] = ...
    PAIRING_BOOTSTRAPPING_PIN_CODE_DISPLAY: typing.ClassVar[int] = ...
    PAIRING_BOOTSTRAPPING_PIN_CODE_KEYPAD: typing.ClassVar[int] = ...
    PAIRING_BOOTSTRAPPING_QR_DISPLAY: typing.ClassVar[int] = ...
    PAIRING_BOOTSTRAPPING_QR_SCAN: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getBootstrappingMethods(self) -> int: ...
    def getSupportedCipherSuites(self) -> int: ...
    def hashCode(self) -> int: ...
    def isPairingCacheEnabled(self) -> bool: ...
    def isPairingSetupEnabled(self) -> bool: ...
    def isPairingVerificationEnabled(self) -> bool: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> AwarePairingConfig: ...
        def setBootstrappingMethods(self, methods: int | java.jint | java.lang.Integer, /) -> AwarePairingConfig.Builder: ...
        def setPairingCacheEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> AwarePairingConfig.Builder: ...
        def setPairingSetupEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> AwarePairingConfig.Builder: ...
        def setPairingVerificationEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> AwarePairingConfig.Builder: ...
        def setSupportedCipherSuites(self, cipherSuites: int | java.jint | java.lang.Integer, /) -> AwarePairingConfig.Builder: ...

class AwareResources(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[AwareResources]] = ...
    def __init__(self, availableDataPathsCount: int | java.jint | java.lang.Integer, availablePublishSessionsCount: int | java.jint | java.lang.Integer, availableSubscribeSessionsCount: int | java.jint | java.lang.Integer, /) -> None: ...
    def describeContents(self) -> int: ...
    def getAvailableDataPathsCount(self) -> int: ...
    def getAvailablePublishSessionsCount(self) -> int: ...
    def getAvailableSubscribeSessionsCount(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class Characteristics(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[Characteristics]] = ...
    WIFI_AWARE_CIPHER_SUITE_NCS_PK_128: typing.ClassVar[int] = ...
    WIFI_AWARE_CIPHER_SUITE_NCS_PK_256: typing.ClassVar[int] = ...
    WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_128: typing.ClassVar[int] = ...
    WIFI_AWARE_CIPHER_SUITE_NCS_PK_PASN_256: typing.ClassVar[int] = ...
    WIFI_AWARE_CIPHER_SUITE_NCS_SK_128: typing.ClassVar[int] = ...
    WIFI_AWARE_CIPHER_SUITE_NCS_SK_256: typing.ClassVar[int] = ...
    WIFI_AWARE_CIPHER_SUITE_NONE: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def getMaxMatchFilterLength(self) -> int: ...
    def getMaxServiceNameLength(self) -> int: ...
    def getMaxServiceSpecificInfoLength(self) -> int: ...
    def getNumberOfSupportedDataInterfaces(self) -> int: ...
    def getNumberOfSupportedDataPaths(self) -> int: ...
    def getNumberOfSupportedPublishSessions(self) -> int: ...
    def getNumberOfSupportedSubscribeSessions(self) -> int: ...
    def getSupportedCipherSuites(self) -> int: ...
    def getSupportedPairingCipherSuites(self) -> int: ...
    def isAwarePairingSupported(self) -> bool: ...
    def isInstantCommunicationModeSupported(self) -> bool: ...
    def isSuspensionSupported(self) -> bool: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class DiscoverySession(java.lang.AutoCloseable):
    def acceptPairingRequest(self, requestId: int | java.jint | java.lang.Integer, peerHandle: PeerHandle, peerDeviceAlias: str | java.lang.String, cipherSuite: int | java.jint | java.lang.Integer, password: str | java.lang.String, /) -> None: ...
    def close(self) -> None: ...
    def createNetworkSpecifierOpen(self, peerHandle: PeerHandle, /) -> android.net.NetworkSpecifier: ...
    def createNetworkSpecifierPassphrase(self, peerHandle: PeerHandle, passphrase: str | java.lang.String, /) -> android.net.NetworkSpecifier: ...
    def finalize(self) -> None: ...
    def initiateBootstrappingRequest(self, peerHandle: PeerHandle, method: int | java.jint | java.lang.Integer, /) -> None: ...
    def initiatePairingRequest(self, peerHandle: PeerHandle, peerDeviceAlias: str | java.lang.String, cipherSuite: int | java.jint | java.lang.Integer, password: str | java.lang.String, /) -> None: ...
    def rejectPairingRequest(self, requestId: int | java.jint | java.lang.Integer, peerHandle: PeerHandle, /) -> None: ...
    def sendMessage(self, peerHandle: PeerHandle, messageId: int | java.jint | java.lang.Integer, message: java.chaquopy.JavaArrayJByte, /) -> None: ...

class DiscoverySessionCallback(java.lang.Object):
    def __init__(self) -> None: ...
    def onBootstrappingFailed(self, peerHandle: PeerHandle, /) -> None: ...
    def onBootstrappingSucceeded(self, peerHandle: PeerHandle, method: int | java.jint | java.lang.Integer, /) -> None: ...
    def onMessageReceived(self, peerHandle: PeerHandle, message: java.chaquopy.JavaArrayJByte, /) -> None: ...
    def onMessageSendFailed(self, messageId: int | java.jint | java.lang.Integer, /) -> None: ...
    def onMessageSendSucceeded(self, messageId: int | java.jint | java.lang.Integer, /) -> None: ...
    def onPairingSetupFailed(self, peerHandle: PeerHandle, /) -> None: ...
    def onPairingSetupRequestReceived(self, peerHandle: PeerHandle, requestId: int | java.jint | java.lang.Integer, /) -> None: ...
    def onPairingSetupSucceeded(self, peerHandle: PeerHandle, alias: str | java.lang.String, /) -> None: ...
    def onPairingVerificationFailed(self, peerHandle: PeerHandle, /) -> None: ...
    def onPairingVerificationSucceed(self, peerHandle: PeerHandle, alias: str | java.lang.String, /) -> None: ...
    def onPublishStarted(self, session: PublishDiscoverySession, /) -> None: ...
    @typing.overload
    def onServiceDiscovered(self, info: ServiceDiscoveryInfo, /) -> None: ...
    @typing.overload
    def onServiceDiscovered(self, peerHandle: PeerHandle, serviceSpecificInfo: java.chaquopy.JavaArrayJByte, matchFilter: java.util.List[java.chaquopy.JavaArrayJByte], /) -> None: ...
    @typing.overload
    def onServiceDiscoveredWithinRange(self, info: ServiceDiscoveryInfo, distanceMm: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def onServiceDiscoveredWithinRange(self, peerHandle: PeerHandle, serviceSpecificInfo: java.chaquopy.JavaArrayJByte, matchFilter: java.util.List[java.chaquopy.JavaArrayJByte], distanceMm: int | java.jint | java.lang.Integer, /) -> None: ...
    def onServiceLost(self, peerHandle: PeerHandle, reason: int | java.jint | java.lang.Integer, /) -> None: ...
    def onSessionConfigFailed(self) -> None: ...
    def onSessionConfigUpdated(self) -> None: ...
    def onSessionTerminated(self) -> None: ...
    def onSubscribeStarted(self, session: SubscribeDiscoverySession, /) -> None: ...

class IdentityChangedListener(java.lang.Object):
    CLUSTER_CHANGE_EVENT_JOINED: typing.ClassVar[int] = ...
    CLUSTER_CHANGE_EVENT_STARTED: typing.ClassVar[int] = ...
    def __init__(self) -> None: ...
    def onClusterIdChanged(self, clusterEventType: int | java.jint | java.lang.Integer, clusterId: android.net.MacAddress, /) -> None: ...
    def onIdentityChanged(self, mac: java.chaquopy.JavaArrayJByte, /) -> None: ...

class ParcelablePeerHandle(PeerHandle, android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[ParcelablePeerHandle]] = ...
    def __init__(self, peerHandle: PeerHandle, /) -> None: ...
    def describeContents(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class PeerHandle(java.lang.Object):
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def hashCode(self) -> int: ...

class PublishConfig(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PublishConfig]] = ...
    PUBLISH_TYPE_SOLICITED: typing.ClassVar[int] = ...
    PUBLISH_TYPE_UNSOLICITED: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getInstantCommunicationBand(self) -> int: ...
    def getPairingConfig(self) -> AwarePairingConfig | None: ...
    def getSecurityConfig(self) -> WifiAwareDataPathSecurityConfig | None: ...
    def hashCode(self) -> int: ...
    def isInstantCommunicationModeEnabled(self) -> bool: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> PublishConfig: ...
        def setDataPathSecurityConfig(self, securityConfig: WifiAwareDataPathSecurityConfig, /) -> PublishConfig.Builder: ...
        def setInstantCommunicationModeEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, band: int | java.jint | java.lang.Integer, /) -> PublishConfig.Builder: ...
        def setMatchFilter(self, matchFilter: java.util.List[java.chaquopy.JavaArrayJByte], /) -> PublishConfig.Builder: ...
        def setPairingConfig(self, config: AwarePairingConfig, /) -> PublishConfig.Builder: ...
        def setPublishType(self, publishType: int | java.jint | java.lang.Integer, /) -> PublishConfig.Builder: ...
        def setRangingEnabled(self, enable: bool | java.jboolean | java.lang.Boolean, /) -> PublishConfig.Builder: ...
        def setServiceName(self, serviceName: str | java.lang.String, /) -> PublishConfig.Builder: ...
        def setServiceSpecificInfo(self, serviceSpecificInfo: java.chaquopy.JavaArrayJByte, /) -> PublishConfig.Builder: ...
        def setTerminateNotificationEnabled(self, enable: bool | java.jboolean | java.lang.Boolean, /) -> PublishConfig.Builder: ...
        def setTtlSec(self, ttlSec: int | java.jint | java.lang.Integer, /) -> PublishConfig.Builder: ...

class PublishDiscoverySession(DiscoverySession):
    def updatePublish(self, publishConfig: PublishConfig, /) -> None: ...

class ServiceDiscoveryInfo(java.lang.Object):
    def getMatchFilters(self) -> java.util.List[java.chaquopy.JavaArrayJByte]: ...
    def getPairedAlias(self) -> str | None: ...
    def getPairingConfig(self) -> AwarePairingConfig | None: ...
    def getPeerCipherSuite(self) -> int: ...
    def getPeerHandle(self) -> PeerHandle: ...
    def getScid(self) -> java.chaquopy.JavaArrayJByte | None: ...
    def getServiceSpecificInfo(self) -> java.chaquopy.JavaArrayJByte | None: ...

class SubscribeConfig(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SubscribeConfig]] = ...
    SUBSCRIBE_TYPE_ACTIVE: typing.ClassVar[int] = ...
    SUBSCRIBE_TYPE_PASSIVE: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getInstantCommunicationBand(self) -> int: ...
    def getPairingConfig(self) -> AwarePairingConfig | None: ...
    def hashCode(self) -> int: ...
    def isInstantCommunicationModeEnabled(self) -> bool: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> SubscribeConfig: ...
        def setInstantCommunicationModeEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, band: int | java.jint | java.lang.Integer, /) -> SubscribeConfig.Builder: ...
        def setMatchFilter(self, matchFilter: java.util.List[java.chaquopy.JavaArrayJByte], /) -> SubscribeConfig.Builder: ...
        def setMaxDistanceMm(self, maxDistanceMm: int | java.jint | java.lang.Integer, /) -> SubscribeConfig.Builder: ...
        def setMinDistanceMm(self, minDistanceMm: int | java.jint | java.lang.Integer, /) -> SubscribeConfig.Builder: ...
        def setPairingConfig(self, config: AwarePairingConfig, /) -> SubscribeConfig.Builder: ...
        def setServiceName(self, serviceName: str | java.lang.String, /) -> SubscribeConfig.Builder: ...
        def setServiceSpecificInfo(self, serviceSpecificInfo: java.chaquopy.JavaArrayJByte, /) -> SubscribeConfig.Builder: ...
        def setSubscribeType(self, subscribeType: int | java.jint | java.lang.Integer, /) -> SubscribeConfig.Builder: ...
        def setTerminateNotificationEnabled(self, enable: bool | java.jboolean | java.lang.Boolean, /) -> SubscribeConfig.Builder: ...
        def setTtlSec(self, ttlSec: int | java.jint | java.lang.Integer, /) -> SubscribeConfig.Builder: ...

class SubscribeDiscoverySession(DiscoverySession):
    def updateSubscribe(self, subscribeConfig: SubscribeConfig, /) -> None: ...

class WifiAwareChannelInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[WifiAwareChannelInfo]] = ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getChannelBandwidth(self) -> int: ...
    def getChannelFrequencyMhz(self) -> int: ...
    def getSpatialStreamCount(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class WifiAwareDataPathSecurityConfig(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[WifiAwareDataPathSecurityConfig]] = ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getCipherSuite(self) -> int: ...
    def getPmk(self) -> java.chaquopy.JavaArrayJByte | None: ...
    def getPmkId(self) -> java.chaquopy.JavaArrayJByte | None: ...
    def getPskPassphrase(self) -> str | None: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, cipherSuite: int | java.jint | java.lang.Integer, /) -> None: ...
        def build(self) -> WifiAwareDataPathSecurityConfig: ...
        def setPmk(self, pmk: java.chaquopy.JavaArrayJByte, /) -> WifiAwareDataPathSecurityConfig.Builder: ...
        def setPmkId(self, pmkId: java.chaquopy.JavaArrayJByte, /) -> WifiAwareDataPathSecurityConfig.Builder: ...
        def setPskPassphrase(self, pskPassphrase: str | java.lang.String, /) -> WifiAwareDataPathSecurityConfig.Builder: ...

class WifiAwareManager(java.lang.Object):
    ACTION_WIFI_AWARE_RESOURCE_CHANGED: typing.ClassVar[str] = ...
    ACTION_WIFI_AWARE_STATE_CHANGED: typing.ClassVar[str] = ...
    EXTRA_AWARE_RESOURCES: typing.ClassVar[str] = ...
    WIFI_AWARE_DATA_PATH_ROLE_INITIATOR: typing.ClassVar[int] = ...
    WIFI_AWARE_DATA_PATH_ROLE_RESPONDER: typing.ClassVar[int] = ...
    WIFI_AWARE_DISCOVERY_LOST_REASON_PEER_NOT_VISIBLE: typing.ClassVar[int] = ...
    WIFI_AWARE_DISCOVERY_LOST_REASON_UNKNOWN: typing.ClassVar[int] = ...
    @typing.overload
    def attach(self, attachCallback: AttachCallback, handler: android.os.Handler, /) -> None: ...
    @typing.overload
    def attach(self, attachCallback: AttachCallback, identityChangedListener: IdentityChangedListener, handler: android.os.Handler, /) -> None: ...
    def getAvailableAwareResources(self) -> AwareResources | None: ...
    def getCharacteristics(self) -> Characteristics | None: ...
    def getPairedDevices(self, executor: java.util.concurrent.Executor, resultsCallback: java.util.function.Consumer[java.util.List[java.lang.String]], /) -> None: ...
    def isAvailable(self) -> bool: ...
    def isDeviceAttached(self) -> bool: ...
    def isInstantCommunicationModeEnabled(self) -> bool: ...
    def isOpportunisticModeEnabled(self, executor: java.util.concurrent.Executor, resultsCallback: java.util.function.Consumer[java.lang.Boolean], /) -> None: ...
    def isSetChannelOnDataPathSupported(self) -> bool: ...
    def removePairedDevice(self, alias: str | java.lang.String, /) -> None: ...
    def resetPairedDevices(self) -> None: ...
    def setOpportunisticModeEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> None: ...

class WifiAwareNetworkInfo(android.net.TransportInfo, android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[WifiAwareNetworkInfo]] = ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getChannelInfoList(self) -> java.util.List[WifiAwareChannelInfo]: ...
    def getPeerIpv6Addr(self) -> java.net.Inet6Address | None: ...
    def getPort(self) -> int: ...
    def getTransportProtocol(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class WifiAwareNetworkSpecifier(android.net.NetworkSpecifier, android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[WifiAwareNetworkSpecifier]] = ...
    def canBeSatisfiedBy(self, other: android.net.NetworkSpecifier, /) -> bool: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getChannelFrequencyMhz(self) -> int: ...
    def getWifiAwareDataPathSecurityConfig(self) -> WifiAwareDataPathSecurityConfig | None: ...
    def hashCode(self) -> int: ...
    def isChannelRequired(self) -> bool: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self, publishDiscoverySession: PublishDiscoverySession, /) -> None: ...
        @typing.overload
        def __init__(self, discoverySession: DiscoverySession, peerHandle: PeerHandle, /) -> None: ...
        def build(self) -> WifiAwareNetworkSpecifier: ...
        def setChannelFrequencyMhz(self, channelInMhz: int | java.jint | java.lang.Integer, required: bool | java.jboolean | java.lang.Boolean, /) -> WifiAwareNetworkSpecifier.Builder: ...
        def setDataPathSecurityConfig(self, securityConfig: WifiAwareDataPathSecurityConfig, /) -> WifiAwareNetworkSpecifier.Builder: ...
        def setPmk(self, pmk: java.chaquopy.JavaArrayJByte, /) -> WifiAwareNetworkSpecifier.Builder: ...
        def setPort(self, port: int | java.jint | java.lang.Integer, /) -> WifiAwareNetworkSpecifier.Builder: ...
        def setPskPassphrase(self, pskPassphrase: str | java.lang.String, /) -> WifiAwareNetworkSpecifier.Builder: ...
        def setTransportProtocol(self, transportProtocol: int | java.jint | java.lang.Integer, /) -> WifiAwareNetworkSpecifier.Builder: ...

class WifiAwareSession(java.lang.AutoCloseable):
    def close(self) -> None: ...
    def createNetworkSpecifierOpen(self, role: int | java.jint | java.lang.Integer, peer: java.chaquopy.JavaArrayJByte, /) -> android.net.NetworkSpecifier: ...
    def createNetworkSpecifierPassphrase(self, role: int | java.jint | java.lang.Integer, peer: java.chaquopy.JavaArrayJByte, passphrase: str | java.lang.String, /) -> android.net.NetworkSpecifier: ...
    def finalize(self) -> None: ...
    def publish(self, publishConfig: PublishConfig, callback: DiscoverySessionCallback, handler: android.os.Handler, /) -> None: ...
    def subscribe(self, subscribeConfig: SubscribeConfig, callback: DiscoverySessionCallback, handler: android.os.Handler, /) -> None: ...
