import typing

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

class CarrierIdentifier(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[CarrierIdentifier]] = ...
    @typing.overload
    def __init__(self, mccMnc: java.chaquopy.JavaArrayJByte, gid1: str | java.lang.String, gid2: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, mcc: str | java.lang.String, mnc: str | java.lang.String, spn: str | java.lang.String, imsi: str | java.lang.String, gid1: str | java.lang.String, gid2: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, mcc: str | java.lang.String, mnc: str | java.lang.String, spn: str | java.lang.String, imsi: str | java.lang.String, gid1: str | java.lang.String, gid2: str | java.lang.String, carrierid: int | java.jint | java.lang.Integer, specificCarrierId: int | java.jint | java.lang.Integer, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getCarrierId(self) -> int: ...
    def getGid1(self) -> str | None: ...
    def getGid2(self) -> str | None: ...
    def getImsi(self) -> str | None: ...
    def getMcc(self) -> str: ...
    def getMnc(self) -> str: ...
    def getSpecificCarrierId(self) -> int: ...
    def getSpn(self) -> str | None: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, out: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class CarrierMessagingClientService(android.app.Service):
    def __init__(self) -> None: ...
    def onBind(self, intent: android.content.Intent, /) -> android.os.IBinder: ...


_CarrierMessagingService__ResultCallback__T = typing.TypeVar('_CarrierMessagingService__ResultCallback__T')  # <T>
class CarrierMessagingService(android.app.Service):
    DOWNLOAD_STATUS_ERROR: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_MMS_ERROR_CONFIGURATION_ERROR: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_MMS_ERROR_DATA_DISABLED: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_MMS_ERROR_HTTP_FAILURE: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_MMS_ERROR_INACTIVE_SUBSCRIPTION: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_MMS_ERROR_INVALID_APN: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_MMS_ERROR_INVALID_SUBSCRIPTION_ID: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_MMS_ERROR_IO_ERROR: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_MMS_ERROR_MMS_DISABLED_BY_CARRIER: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_MMS_ERROR_NO_DATA_NETWORK: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_MMS_ERROR_RETRY: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_MMS_ERROR_UNABLE_CONNECT_MMS: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_MMS_ERROR_UNSPECIFIED: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_OK: typing.ClassVar[int] = ...
    DOWNLOAD_STATUS_RETRY_ON_CARRIER_NETWORK: typing.ClassVar[int] = ...
    RECEIVE_OPTIONS_DEFAULT: typing.ClassVar[int] = ...
    RECEIVE_OPTIONS_DROP: typing.ClassVar[int] = ...
    RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_PROTECTED_STORAGE_UNAVAILABLE: typing.ClassVar[int] = ...
    SEND_FLAG_REQUEST_DELIVERY_STATUS: typing.ClassVar[int] = ...
    SEND_STATUS_ERROR: typing.ClassVar[int] = ...
    SEND_STATUS_MMS_ERROR_CONFIGURATION_ERROR: typing.ClassVar[int] = ...
    SEND_STATUS_MMS_ERROR_DATA_DISABLED: typing.ClassVar[int] = ...
    SEND_STATUS_MMS_ERROR_HTTP_FAILURE: typing.ClassVar[int] = ...
    SEND_STATUS_MMS_ERROR_INACTIVE_SUBSCRIPTION: typing.ClassVar[int] = ...
    SEND_STATUS_MMS_ERROR_INVALID_APN: typing.ClassVar[int] = ...
    SEND_STATUS_MMS_ERROR_INVALID_SUBSCRIPTION_ID: typing.ClassVar[int] = ...
    SEND_STATUS_MMS_ERROR_IO_ERROR: typing.ClassVar[int] = ...
    SEND_STATUS_MMS_ERROR_MMS_DISABLED_BY_CARRIER: typing.ClassVar[int] = ...
    SEND_STATUS_MMS_ERROR_NO_DATA_NETWORK: typing.ClassVar[int] = ...
    SEND_STATUS_MMS_ERROR_RETRY: typing.ClassVar[int] = ...
    SEND_STATUS_MMS_ERROR_UNABLE_CONNECT_MMS: typing.ClassVar[int] = ...
    SEND_STATUS_MMS_ERROR_UNSPECIFIED: typing.ClassVar[int] = ...
    SEND_STATUS_OK: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_CANCELLED: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_ENCODING_ERROR: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_ERROR_FDN_CHECK_FAILURE: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_ERROR_GENERIC_FAILURE: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_ERROR_LIMIT_EXCEEDED: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_ERROR_NO_SERVICE: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_ERROR_NULL_PDU: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_ERROR_SHORT_CODE_NOT_ALLOWED: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_INVALID_ARGUMENTS: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_INVALID_SMSC_ADDRESS: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_INVALID_SMS_FORMAT: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_INVALID_STATE: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_NETWORK_ERROR: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_NETWORK_REJECT: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_OPERATION_NOT_ALLOWED: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_REQUEST_NOT_SUPPORTED: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_SMS_BLOCKED_DURING_EMERGENCY: typing.ClassVar[int] = ...
    SEND_STATUS_RESULT_SMS_SEND_RETRY_FAILED: typing.ClassVar[int] = ...
    SEND_STATUS_RETRY_ON_CARRIER_NETWORK: typing.ClassVar[int] = ...
    SERVICE_INTERFACE: typing.ClassVar[str] = ...
    def __init__(self) -> None: ...
    def onBind(self, intent: android.content.Intent, /) -> android.os.IBinder | None: ...
    def onDownloadMms(self, contentUri: android.net.Uri, subId: int | java.jint | java.lang.Integer, location: android.net.Uri, callback: CarrierMessagingService.ResultCallback[java.lang.Integer], /) -> None: ...
    def onFilterSms(self, pdu: MessagePdu, format: str | java.lang.String, destPort: int | java.jint | java.lang.Integer, subId: int | java.jint | java.lang.Integer, callback: CarrierMessagingService.ResultCallback[java.lang.Boolean], /) -> None: ...
    def onReceiveTextSms(self, pdu: MessagePdu, format: str | java.lang.String, destPort: int | java.jint | java.lang.Integer, subId: int | java.jint | java.lang.Integer, callback: CarrierMessagingService.ResultCallback[java.lang.Integer], /) -> None: ...
    @typing.overload
    def onSendDataSms(self, data: java.chaquopy.JavaArrayJByte, subId: int | java.jint | java.lang.Integer, destAddress: str | java.lang.String, destPort: int | java.jint | java.lang.Integer, callback: CarrierMessagingService.ResultCallback[CarrierMessagingService.SendSmsResult], /) -> None: ...
    @typing.overload
    def onSendDataSms(self, data: java.chaquopy.JavaArrayJByte, subId: int | java.jint | java.lang.Integer, destAddress: str | java.lang.String, destPort: int | java.jint | java.lang.Integer, sendSmsFlag: int | java.jint | java.lang.Integer, callback: CarrierMessagingService.ResultCallback[CarrierMessagingService.SendSmsResult], /) -> None: ...
    def onSendMms(self, pduUri: android.net.Uri, subId: int | java.jint | java.lang.Integer, location: android.net.Uri, callback: CarrierMessagingService.ResultCallback[CarrierMessagingService.SendMmsResult], /) -> None: ...
    @typing.overload
    def onSendMultipartTextSms(self, parts: java.util.List[java.lang.String], subId: int | java.jint | java.lang.Integer, destAddress: str | java.lang.String, callback: CarrierMessagingService.ResultCallback[CarrierMessagingService.SendMultipartSmsResult], /) -> None: ...
    @typing.overload
    def onSendMultipartTextSms(self, parts: java.util.List[java.lang.String], subId: int | java.jint | java.lang.Integer, destAddress: str | java.lang.String, sendSmsFlag: int | java.jint | java.lang.Integer, callback: CarrierMessagingService.ResultCallback[CarrierMessagingService.SendMultipartSmsResult], /) -> None: ...
    @typing.overload
    def onSendTextSms(self, text: str | java.lang.String, subId: int | java.jint | java.lang.Integer, destAddress: str | java.lang.String, callback: CarrierMessagingService.ResultCallback[CarrierMessagingService.SendSmsResult], /) -> None: ...
    @typing.overload
    def onSendTextSms(self, text: str | java.lang.String, subId: int | java.jint | java.lang.Integer, destAddress: str | java.lang.String, sendSmsFlag: int | java.jint | java.lang.Integer, callback: CarrierMessagingService.ResultCallback[CarrierMessagingService.SendSmsResult], /) -> None: ...

    class SendSmsResult(java.lang.Object):
        def __init__(self, sendStatus: int | java.jint | java.lang.Integer, messageRef: int | java.jint | java.lang.Integer, /) -> None: ...
        def getMessageRef(self) -> int: ...
        def getSendStatus(self) -> int: ...

    class SendMultipartSmsResult(java.lang.Object):
        def __init__(self, sendStatus: int | java.jint | java.lang.Integer, messageRefs: java.chaquopy.JavaArrayJInt, /) -> None: ...
        def getMessageRefs(self) -> java.chaquopy.JavaArrayJInt: ...
        def getSendStatus(self) -> int: ...

    class SendMmsResult(java.lang.Object):
        def __init__(self, sendStatus: int | java.jint | java.lang.Integer, sendConfPdu: java.chaquopy.JavaArrayJByte, /) -> None: ...
        def getSendConfPdu(self) -> java.chaquopy.JavaArrayJByte: ...
        def getSendStatus(self) -> int: ...
    class ResultCallback(java.lang.Object, typing.Generic[_CarrierMessagingService__ResultCallback__T]):
        def onReceiveResult(self, arg1: _CarrierMessagingService__ResultCallback__T, /) -> None: ...

class CarrierService(android.app.Service):
    CARRIER_SERVICE_INTERFACE: typing.ClassVar[str] = ...
    def __init__(self) -> None: ...
    @typing.overload
    def notifyCarrierNetworkChange(self, active: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    @typing.overload
    def notifyCarrierNetworkChange(self, subscriptionId: int | java.jint | java.lang.Integer, active: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def onBind(self, intent: android.content.Intent, /) -> android.os.IBinder: ...
    @typing.overload
    def onLoadConfig(self, arg1: CarrierIdentifier, /) -> android.os.PersistableBundle | None: ...
    @typing.overload
    def onLoadConfig(self, subscriptionId: int | java.jint | java.lang.Integer, id: CarrierIdentifier, /) -> android.os.PersistableBundle | None: ...

class MessagePdu(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[MessagePdu]] = ...
    def __init__(self, pduList: java.util.List[java.chaquopy.JavaArrayJByte], /) -> None: ...
    def describeContents(self) -> int: ...
    def getPdus(self) -> java.util.List[java.chaquopy.JavaArrayJByte]: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...
