import typing

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

class DownloadProgressListener(java.lang.Object):
    def __init__(self) -> None: ...
    def onProgressUpdated(self, request: DownloadRequest, fileInfo: FileInfo, currentDownloadSize: int | java.jint | java.lang.Integer, fullDownloadSize: int | java.jint | java.lang.Integer, currentDecodedSize: int | java.jint | java.lang.Integer, fullDecodedSize: int | java.jint | java.lang.Integer, /) -> None: ...

class DownloadRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[DownloadRequest]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getDestinationUri(self) -> android.net.Uri: ...
    def getFileServiceId(self) -> str: ...
    @staticmethod
    def getMaxAppIntentSize() -> int: ...
    @staticmethod
    def getMaxDestinationUriSize() -> int: ...
    def getSourceUri(self) -> android.net.Uri: ...
    def getSubscriptionId(self) -> int: ...
    def hashCode(self) -> int: ...
    def toByteArray(self) -> java.chaquopy.JavaArrayJByte: ...
    def writeToParcel(self, out: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, sourceUri: android.net.Uri, destinationUri: android.net.Uri, /) -> None: ...
        def build(self) -> DownloadRequest: ...
        @staticmethod
        def fromDownloadRequest(other: DownloadRequest, /) -> DownloadRequest.Builder: ...
        @staticmethod
        def fromSerializedRequest(data: java.chaquopy.JavaArrayJByte, /) -> DownloadRequest.Builder: ...
        def setAppIntent(self, intent: android.content.Intent, /) -> DownloadRequest.Builder: ...
        def setServiceInfo(self, serviceInfo: FileServiceInfo, /) -> DownloadRequest.Builder: ...
        def setSubscriptionId(self, subscriptionId: int | java.jint | java.lang.Integer, /) -> DownloadRequest.Builder: ...

class DownloadStatusListener(java.lang.Object):
    def __init__(self) -> None: ...
    def onStatusUpdated(self, request: DownloadRequest, fileInfo: FileInfo, status: int | java.jint | java.lang.Integer, /) -> None: ...

class FileInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[FileInfo]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getMimeType(self) -> str: ...
    def getUri(self) -> android.net.Uri: ...
    def hashCode(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class FileServiceInfo(android.os.Parcelable, ServiceInfo):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[FileServiceInfo]] = ...
    def describeContents(self) -> int: ...
    def getFiles(self) -> java.util.List[FileInfo]: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class GroupCall(java.lang.AutoCloseable):
    REASON_BY_USER_REQUEST: typing.ClassVar[int] = ...
    REASON_FREQUENCY_CONFLICT: typing.ClassVar[int] = ...
    REASON_LEFT_MBMS_BROADCAST_AREA: typing.ClassVar[int] = ...
    REASON_NONE: typing.ClassVar[int] = ...
    REASON_NOT_CONNECTED_TO_HOMECARRIER_LTE: typing.ClassVar[int] = ...
    REASON_OUT_OF_MEMORY: typing.ClassVar[int] = ...
    STATE_STALLED: typing.ClassVar[int] = ...
    STATE_STARTED: typing.ClassVar[int] = ...
    STATE_STOPPED: typing.ClassVar[int] = ...
    def close(self) -> None: ...
    def getTmgi(self) -> int: ...
    def updateGroupCall(self, saiList: java.util.List[java.lang.Integer], frequencyList: java.util.List[java.lang.Integer], /) -> None: ...

class GroupCallCallback(java.lang.Object):
    SIGNAL_STRENGTH_UNAVAILABLE: typing.ClassVar[int] = ...
    def onBroadcastSignalStrengthUpdated(self, signalStrength: int | java.jint | java.lang.Integer, /) -> None: ...
    def onError(self, errorCode: int | java.jint | java.lang.Integer, message: str | java.lang.String, /) -> None: ...
    def onGroupCallStateChanged(self, state: int | java.jint | java.lang.Integer, reason: int | java.jint | java.lang.Integer, /) -> None: ...

class MbmsDownloadReceiver(android.content.BroadcastReceiver):
    def __init__(self) -> None: ...
    def onReceive(self, context: android.content.Context, intent: android.content.Intent, /) -> None: ...

class MbmsDownloadSessionCallback(java.lang.Object):
    def __init__(self) -> None: ...
    def onError(self, errorCode: int | java.jint | java.lang.Integer, message: str | java.lang.String, /) -> None: ...
    def onFileServicesUpdated(self, services: java.util.List[FileServiceInfo], /) -> None: ...
    def onMiddlewareReady(self) -> None: ...

class MbmsErrors(java.lang.Object):
    ERROR_MIDDLEWARE_LOST: typing.ClassVar[int] = ...
    ERROR_MIDDLEWARE_NOT_BOUND: typing.ClassVar[int] = ...
    ERROR_NO_UNIQUE_MIDDLEWARE: typing.ClassVar[int] = ...
    SUCCESS: typing.ClassVar[int] = ...
    UNKNOWN: typing.ClassVar[int] = ...

    class StreamingErrors(java.lang.Object):
        ERROR_CONCURRENT_SERVICE_LIMIT_REACHED: typing.ClassVar[int] = ...
        ERROR_DUPLICATE_START_STREAM: typing.ClassVar[int] = ...
        ERROR_UNABLE_TO_START_SERVICE: typing.ClassVar[int] = ...

    class InitializationErrors(java.lang.Object):
        ERROR_APP_PERMISSIONS_NOT_GRANTED: typing.ClassVar[int] = ...
        ERROR_DUPLICATE_INITIALIZE: typing.ClassVar[int] = ...
        ERROR_UNABLE_TO_INITIALIZE: typing.ClassVar[int] = ...

    class GroupCallErrors(java.lang.Object):
        ERROR_DUPLICATE_START_GROUP_CALL: typing.ClassVar[int] = ...
        ERROR_UNABLE_TO_START_SERVICE: typing.ClassVar[int] = ...

    class GeneralErrors(java.lang.Object):
        ERROR_CARRIER_CHANGE_NOT_ALLOWED: typing.ClassVar[int] = ...
        ERROR_IN_E911: typing.ClassVar[int] = ...
        ERROR_MIDDLEWARE_NOT_YET_READY: typing.ClassVar[int] = ...
        ERROR_MIDDLEWARE_TEMPORARILY_UNAVAILABLE: typing.ClassVar[int] = ...
        ERROR_NOT_CONNECTED_TO_HOME_CARRIER_LTE: typing.ClassVar[int] = ...
        ERROR_OUT_OF_MEMORY: typing.ClassVar[int] = ...
        ERROR_UNABLE_TO_READ_SIM: typing.ClassVar[int] = ...

    class DownloadErrors(java.lang.Object):
        ERROR_CANNOT_CHANGE_TEMP_FILE_ROOT: typing.ClassVar[int] = ...
        ERROR_MALFORMED_SERVICE_ANNOUNCEMENT: typing.ClassVar[int] = ...
        ERROR_UNKNOWN_DOWNLOAD_REQUEST: typing.ClassVar[int] = ...
        ERROR_UNKNOWN_FILE_INFO: typing.ClassVar[int] = ...

class MbmsGroupCallSessionCallback(java.lang.Object):
    def onAvailableSaisUpdated(self, currentSais: java.util.List[java.lang.Integer], availableSais: java.util.List[java.util.List[java.lang.Integer]], /) -> None: ...
    def onError(self, errorCode: int | java.jint | java.lang.Integer, message: str | java.lang.String, /) -> None: ...
    def onMiddlewareReady(self) -> None: ...
    def onServiceInterfaceAvailable(self, interfaceName: str | java.lang.String, index: int | java.jint | java.lang.Integer, /) -> None: ...

class MbmsStreamingSessionCallback(java.lang.Object):
    def __init__(self) -> None: ...
    def onError(self, errorCode: int | java.jint | java.lang.Integer, message: str | java.lang.String, /) -> None: ...
    def onMiddlewareReady(self) -> None: ...
    def onStreamingServicesUpdated(self, services: java.util.List[StreamingServiceInfo], /) -> None: ...

class ServiceInfo(java.lang.Object):
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getLocales(self) -> java.util.List[java.util.Locale]: ...
    def getNameForLocale(self, locale: java.util.Locale, /) -> java.lang.CharSequence: ...
    def getNamedContentLocales(self) -> java.util.Set[java.util.Locale]: ...
    def getServiceClassName(self) -> str: ...
    def getServiceId(self) -> str: ...
    def getSessionEndTime(self) -> java.util.Date: ...
    def getSessionStartTime(self) -> java.util.Date: ...
    def hashCode(self) -> int: ...

class StreamingService(java.lang.AutoCloseable):
    BROADCAST_METHOD: typing.ClassVar[int] = ...
    REASON_BY_USER_REQUEST: typing.ClassVar[int] = ...
    REASON_END_OF_SESSION: typing.ClassVar[int] = ...
    REASON_FREQUENCY_CONFLICT: typing.ClassVar[int] = ...
    REASON_LEFT_MBMS_BROADCAST_AREA: typing.ClassVar[int] = ...
    REASON_NONE: typing.ClassVar[int] = ...
    REASON_NOT_CONNECTED_TO_HOMECARRIER_LTE: typing.ClassVar[int] = ...
    REASON_OUT_OF_MEMORY: typing.ClassVar[int] = ...
    STATE_STALLED: typing.ClassVar[int] = ...
    STATE_STARTED: typing.ClassVar[int] = ...
    STATE_STOPPED: typing.ClassVar[int] = ...
    UNICAST_METHOD: typing.ClassVar[int] = ...
    def close(self) -> None: ...
    def getInfo(self) -> StreamingServiceInfo: ...
    def getPlaybackUri(self) -> android.net.Uri | None: ...

class StreamingServiceCallback(java.lang.Object):
    SIGNAL_STRENGTH_UNAVAILABLE: typing.ClassVar[int] = ...
    def __init__(self) -> None: ...
    def onBroadcastSignalStrengthUpdated(self, signalStrength: int | java.jint | java.lang.Integer, /) -> None: ...
    def onError(self, errorCode: int | java.jint | java.lang.Integer, message: str | java.lang.String, /) -> None: ...
    def onMediaDescriptionUpdated(self) -> None: ...
    def onStreamMethodUpdated(self, methodType: int | java.jint | java.lang.Integer, /) -> None: ...
    def onStreamStateUpdated(self, state: int | java.jint | java.lang.Integer, reason: int | java.jint | java.lang.Integer, /) -> None: ...

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