import typing

import android.content
import java
import java.chaquopy
import java.lang
import java.net

class AudioCodec(java.lang.Object):
    AMR: typing.ClassVar[AudioCodec] = ...
    GSM: typing.ClassVar[AudioCodec] = ...
    GSM_EFR: typing.ClassVar[AudioCodec] = ...
    PCMA: typing.ClassVar[AudioCodec] = ...
    PCMU: typing.ClassVar[AudioCodec] = ...
    fmtp: str = ...
    rtpmap: str = ...
    type: int = ...
    @staticmethod
    def getCodec(type: int | java.jint | java.lang.Integer, rtpmap: str | java.lang.String, fmtp: str | java.lang.String, /) -> AudioCodec: ...
    @staticmethod
    def getCodecs() -> java.chaquopy.JavaArray[AudioCodec]: ...

class AudioGroup(java.lang.Object):
    MODE_ECHO_SUPPRESSION: typing.ClassVar[int] = ...
    MODE_MUTED: typing.ClassVar[int] = ...
    MODE_NORMAL: typing.ClassVar[int] = ...
    MODE_ON_HOLD: typing.ClassVar[int] = ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    def clear(self) -> None: ...
    def finalize(self) -> None: ...
    def getMode(self) -> int: ...
    def getStreams(self) -> java.chaquopy.JavaArray[AudioStream]: ...
    def sendDtmf(self, event: int | java.jint | java.lang.Integer, /) -> None: ...
    def setMode(self, mode: int | java.jint | java.lang.Integer, /) -> None: ...

class AudioStream(RtpStream):
    def __init__(self, address: java.net.InetAddress, /) -> None: ...
    def getCodec(self) -> AudioCodec: ...
    def getDtmfType(self) -> int: ...
    def getGroup(self) -> AudioGroup: ...
    def isBusy(self) -> bool: ...
    def join(self, group: AudioGroup, /) -> None: ...
    def setCodec(self, codec: AudioCodec, /) -> None: ...
    def setDtmfType(self, type: int | java.jint | java.lang.Integer, /) -> None: ...

class RtpStream(java.lang.Object):
    MODE_NORMAL: typing.ClassVar[int] = ...
    MODE_RECEIVE_ONLY: typing.ClassVar[int] = ...
    MODE_SEND_ONLY: typing.ClassVar[int] = ...
    def associate(self, address: java.net.InetAddress, port: int | java.jint | java.lang.Integer, /) -> None: ...
    def finalize(self) -> None: ...
    def getLocalAddress(self) -> java.net.InetAddress: ...
    def getLocalPort(self) -> int: ...
    def getMode(self) -> int: ...
    def getRemoteAddress(self) -> java.net.InetAddress: ...
    def getRemotePort(self) -> int: ...
    def isBusy(self) -> bool: ...
    def release(self) -> None: ...
    def setMode(self, mode: int | java.jint | java.lang.Integer, /) -> None: ...
