import typing

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

class DrmConvertedStatus(java.lang.Object):
    STATUS_ERROR: typing.ClassVar[int] = ...
    STATUS_INPUTDATA_ERROR: typing.ClassVar[int] = ...
    STATUS_OK: typing.ClassVar[int] = ...
    convertedData: java.chaquopy.JavaArrayJByte = ...
    offset: int = ...
    statusCode: int = ...
    def __init__(self, statusCode: int | java.jint | java.lang.Integer, convertedData: java.chaquopy.JavaArrayJByte, offset: int | java.jint | java.lang.Integer, /) -> None: ...

class DrmErrorEvent(DrmEvent):
    TYPE_ACQUIRE_DRM_INFO_FAILED: typing.ClassVar[int] = ...
    TYPE_NOT_SUPPORTED: typing.ClassVar[int] = ...
    TYPE_NO_INTERNET_CONNECTION: typing.ClassVar[int] = ...
    TYPE_OUT_OF_MEMORY: typing.ClassVar[int] = ...
    TYPE_PROCESS_DRM_INFO_FAILED: typing.ClassVar[int] = ...
    TYPE_REMOVE_ALL_RIGHTS_FAILED: typing.ClassVar[int] = ...
    TYPE_RIGHTS_NOT_INSTALLED: typing.ClassVar[int] = ...
    TYPE_RIGHTS_RENEWAL_NOT_ALLOWED: typing.ClassVar[int] = ...
    @typing.overload
    def __init__(self, uniqueId: int | java.jint | java.lang.Integer, type: int | java.jint | java.lang.Integer, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, uniqueId: int | java.jint | java.lang.Integer, type: int | java.jint | java.lang.Integer, message: str | java.lang.String, attributes: java.util.HashMap[java.lang.String, java.lang.Object], /) -> None: ...

class DrmEvent(java.lang.Object):
    DRM_INFO_OBJECT: typing.ClassVar[str] = ...
    DRM_INFO_STATUS_OBJECT: typing.ClassVar[str] = ...
    TYPE_ALL_RIGHTS_REMOVED: typing.ClassVar[int] = ...
    TYPE_DRM_INFO_PROCESSED: typing.ClassVar[int] = ...
    @typing.overload
    def __init__(self, uniqueId: int | java.jint | java.lang.Integer, type: int | java.jint | java.lang.Integer, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, uniqueId: int | java.jint | java.lang.Integer, type: int | java.jint | java.lang.Integer, message: str | java.lang.String, attributes: java.util.HashMap[java.lang.String, java.lang.Object], /) -> None: ...
    def getAttribute(self, key: str | java.lang.String, /) -> java.lang.Object | None: ...
    def getMessage(self) -> str: ...
    def getType(self) -> int: ...
    def getUniqueId(self) -> int: ...

class DrmInfo(java.lang.Object):
    @typing.overload
    def __init__(self, infoType: int | java.jint | java.lang.Integer, path: str | java.lang.String, mimeType: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, infoType: int | java.jint | java.lang.Integer, data: java.chaquopy.JavaArrayJByte, mimeType: str | java.lang.String, /) -> None: ...
    def get(self, key: str | java.lang.String, /) -> java.lang.Object | None: ...
    def getData(self) -> java.chaquopy.JavaArrayJByte: ...
    def getInfoType(self) -> int: ...
    def getMimeType(self) -> str: ...
    def iterator(self) -> java.util.Iterator[java.lang.Object]: ...
    def keyIterator(self) -> java.util.Iterator[java.lang.String]: ...
    def put(self, key: str | java.lang.String, value: java.lang.Object | int | bool | float | str, /) -> None: ...

class DrmInfoEvent(DrmEvent):
    TYPE_ACCOUNT_ALREADY_REGISTERED: typing.ClassVar[int] = ...
    TYPE_ALREADY_REGISTERED_BY_ANOTHER_ACCOUNT: typing.ClassVar[int] = ...
    TYPE_REMOVE_RIGHTS: typing.ClassVar[int] = ...
    TYPE_RIGHTS_INSTALLED: typing.ClassVar[int] = ...
    TYPE_RIGHTS_REMOVED: typing.ClassVar[int] = ...
    TYPE_WAIT_FOR_RIGHTS: typing.ClassVar[int] = ...
    @typing.overload
    def __init__(self, uniqueId: int | java.jint | java.lang.Integer, type: int | java.jint | java.lang.Integer, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, uniqueId: int | java.jint | java.lang.Integer, type: int | java.jint | java.lang.Integer, message: str | java.lang.String, attributes: java.util.HashMap[java.lang.String, java.lang.Object], /) -> None: ...

class DrmInfoRequest(java.lang.Object):
    ACCOUNT_ID: typing.ClassVar[str] = ...
    SUBSCRIPTION_ID: typing.ClassVar[str] = ...
    TYPE_REGISTRATION_INFO: typing.ClassVar[int] = ...
    TYPE_RIGHTS_ACQUISITION_INFO: typing.ClassVar[int] = ...
    TYPE_RIGHTS_ACQUISITION_PROGRESS_INFO: typing.ClassVar[int] = ...
    TYPE_UNREGISTRATION_INFO: typing.ClassVar[int] = ...
    def __init__(self, infoType: int | java.jint | java.lang.Integer, mimeType: str | java.lang.String, /) -> None: ...
    def get(self, key: str | java.lang.String, /) -> java.lang.Object | None: ...
    def getInfoType(self) -> int: ...
    def getMimeType(self) -> str: ...
    def iterator(self) -> java.util.Iterator[java.lang.Object]: ...
    def keyIterator(self) -> java.util.Iterator[java.lang.String]: ...
    def put(self, key: str | java.lang.String, value: java.lang.Object | int | bool | float | str, /) -> None: ...

class DrmInfoStatus(java.lang.Object):
    STATUS_ERROR: typing.ClassVar[int] = ...
    STATUS_OK: typing.ClassVar[int] = ...
    data: ProcessedData = ...
    infoType: int = ...
    mimeType: str = ...
    statusCode: int = ...
    def __init__(self, statusCode: int | java.jint | java.lang.Integer, infoType: int | java.jint | java.lang.Integer, data: ProcessedData, mimeType: str | java.lang.String, /) -> None: ...

class DrmManagerClient(java.lang.AutoCloseable):
    ERROR_NONE: typing.ClassVar[int] = ...
    ERROR_UNKNOWN: typing.ClassVar[int] = ...
    def __init__(self, context: android.content.Context, /) -> None: ...
    def acquireDrmInfo(self, drmInfoRequest: DrmInfoRequest, /) -> DrmInfo: ...
    def acquireRights(self, drmInfoRequest: DrmInfoRequest, /) -> int: ...
    @typing.overload
    def canHandle(self, uri: android.net.Uri, mimeType: str | java.lang.String, /) -> bool: ...
    @typing.overload
    def canHandle(self, path: str | java.lang.String, mimeType: str | java.lang.String, /) -> bool: ...
    @typing.overload
    def checkRightsStatus(self, uri: android.net.Uri, /) -> int: ...
    @typing.overload
    def checkRightsStatus(self, path: str | java.lang.String, /) -> int: ...
    @typing.overload
    def checkRightsStatus(self, uri: android.net.Uri, action: int | java.jint | java.lang.Integer, /) -> int: ...
    @typing.overload
    def checkRightsStatus(self, path: str | java.lang.String, action: int | java.jint | java.lang.Integer, /) -> int: ...
    def close(self) -> None: ...
    def closeConvertSession(self, convertId: int | java.jint | java.lang.Integer, /) -> DrmConvertedStatus: ...
    def convertData(self, convertId: int | java.jint | java.lang.Integer, inputData: java.chaquopy.JavaArrayJByte, /) -> DrmConvertedStatus: ...
    def finalize(self) -> None: ...
    def getAvailableDrmEngines(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getAvailableDrmSupportInfo(self) -> java.util.Collection[DrmSupportInfo]: ...
    @typing.overload
    def getConstraints(self, uri: android.net.Uri, action: int | java.jint | java.lang.Integer, /) -> android.content.ContentValues: ...
    @typing.overload
    def getConstraints(self, path: str | java.lang.String, action: int | java.jint | java.lang.Integer, /) -> android.content.ContentValues: ...
    @typing.overload
    def getDrmObjectType(self, uri: android.net.Uri, mimeType: str | java.lang.String, /) -> int: ...
    @typing.overload
    def getDrmObjectType(self, path: str | java.lang.String, mimeType: str | java.lang.String, /) -> int: ...
    @typing.overload
    def getMetadata(self, uri: android.net.Uri, /) -> android.content.ContentValues: ...
    @typing.overload
    def getMetadata(self, path: str | java.lang.String, /) -> android.content.ContentValues: ...
    @typing.overload
    def getOriginalMimeType(self, uri: android.net.Uri, /) -> str: ...
    @typing.overload
    def getOriginalMimeType(self, path: str | java.lang.String, /) -> str: ...
    def openConvertSession(self, mimeType: str | java.lang.String, /) -> int: ...
    def processDrmInfo(self, drmInfo: DrmInfo, /) -> int: ...
    def release(self) -> None: ...
    def removeAllRights(self) -> int: ...
    @typing.overload
    def removeRights(self, uri: android.net.Uri, /) -> int: ...
    @typing.overload
    def removeRights(self, path: str | java.lang.String, /) -> int: ...
    def saveRights(self, drmRights: DrmRights, rightsPath: str | java.lang.String, contentPath: str | java.lang.String, /) -> int: ...
    def setOnErrorListener(self, errorListener: DrmManagerClient.OnErrorListener, /) -> None: ...
    def setOnEventListener(self, eventListener: DrmManagerClient.OnEventListener, /) -> None: ...
    def setOnInfoListener(self, infoListener: DrmManagerClient.OnInfoListener, /) -> None: ...

    class OnInfoListener(java.lang.Object):
        def onInfo(self, arg1: DrmManagerClient, arg2: DrmInfoEvent, /) -> None: ...

    class OnEventListener(java.lang.Object):
        def onEvent(self, arg1: DrmManagerClient, arg2: DrmEvent, /) -> None: ...

    class OnErrorListener(java.lang.Object):
        def onError(self, arg1: DrmManagerClient, arg2: DrmErrorEvent, /) -> None: ...

class DrmRights(java.lang.Object):
    @typing.overload
    def __init__(self, data: ProcessedData, mimeType: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, rightsFile: java.io.File, mimeType: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, rightsFilePath: str | java.lang.String, mimeType: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, rightsFilePath: str | java.lang.String, mimeType: str | java.lang.String, accountId: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, rightsFilePath: str | java.lang.String, mimeType: str | java.lang.String, accountId: str | java.lang.String, subscriptionId: str | java.lang.String, /) -> None: ...
    def getAccountId(self) -> str: ...
    def getData(self) -> java.chaquopy.JavaArrayJByte: ...
    def getMimeType(self) -> str: ...
    def getSubscriptionId(self) -> str: ...

class DrmStore(java.lang.Object):
    def __init__(self) -> None: ...

    class RightsStatus(java.lang.Object):
        RIGHTS_EXPIRED: typing.ClassVar[int] = ...
        RIGHTS_INVALID: typing.ClassVar[int] = ...
        RIGHTS_NOT_ACQUIRED: typing.ClassVar[int] = ...
        RIGHTS_VALID: typing.ClassVar[int] = ...
        def __init__(self) -> None: ...

    class Playback(java.lang.Object):
        PAUSE: typing.ClassVar[int] = ...
        RESUME: typing.ClassVar[int] = ...
        START: typing.ClassVar[int] = ...
        STOP: typing.ClassVar[int] = ...
        def __init__(self) -> None: ...

    class DrmObjectType(java.lang.Object):
        CONTENT: typing.ClassVar[int] = ...
        RIGHTS_OBJECT: typing.ClassVar[int] = ...
        TRIGGER_OBJECT: typing.ClassVar[int] = ...
        UNKNOWN: typing.ClassVar[int] = ...
        def __init__(self) -> None: ...

    class ConstraintsColumns(java.lang.Object):
        EXTENDED_METADATA: typing.ClassVar[str] = ...
        LICENSE_AVAILABLE_TIME: typing.ClassVar[str] = ...
        LICENSE_EXPIRY_TIME: typing.ClassVar[str] = ...
        LICENSE_START_TIME: typing.ClassVar[str] = ...
        MAX_REPEAT_COUNT: typing.ClassVar[str] = ...
        REMAINING_REPEAT_COUNT: typing.ClassVar[str] = ...

    class Action(java.lang.Object):
        DEFAULT: typing.ClassVar[int] = ...
        DISPLAY: typing.ClassVar[int] = ...
        EXECUTE: typing.ClassVar[int] = ...
        OUTPUT: typing.ClassVar[int] = ...
        PLAY: typing.ClassVar[int] = ...
        PREVIEW: typing.ClassVar[int] = ...
        RINGTONE: typing.ClassVar[int] = ...
        TRANSFER: typing.ClassVar[int] = ...
        def __init__(self) -> None: ...

class DrmSupportInfo(java.lang.Object):
    def __init__(self) -> None: ...
    def addFileSuffix(self, fileSuffix: str | java.lang.String, /) -> None: ...
    def addMimeType(self, mimeType: str | java.lang.String, /) -> None: ...
    def equals(self, object: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getDescriprition(self) -> str: ...
    def getDescription(self) -> str: ...
    def getFileSuffixIterator(self) -> java.util.Iterator[java.lang.String]: ...
    def getMimeTypeIterator(self) -> java.util.Iterator[java.lang.String]: ...
    def hashCode(self) -> int: ...
    def setDescription(self, description: str | java.lang.String, /) -> None: ...

class DrmUtils(java.lang.Object):
    def __init__(self) -> None: ...
    @staticmethod
    def getExtendedMetadataParser(extendedMetadata: java.chaquopy.JavaArrayJByte, /) -> DrmUtils.ExtendedMetadataParser: ...

    class ExtendedMetadataParser(java.lang.Object):
        def get(self, key: str | java.lang.String, /) -> str: ...
        def iterator(self) -> java.util.Iterator[java.lang.String]: ...
        def keyIterator(self) -> java.util.Iterator[java.lang.String]: ...

class ProcessedData(java.lang.Object):
    def getAccountId(self) -> str: ...
    def getData(self) -> java.chaquopy.JavaArrayJByte: ...
    def getSubscriptionId(self) -> str: ...
