1# Enums 2 3> **NOTE** 4> 5> The initial APIs of this module are supported since API version 11. Newly added APIs will be marked with a superscript to indicate their earliest API version. 6 7## DrmErrorCode 8 9Enumerates the DRM error codes. 10 11**Atomic service API**: This API can be used in atomic services since API version 14. 12 13**System capability**: SystemCapability.Multimedia.Drm.Core 14 15| Name | Value | Description | 16| ------------------------- | ---- | ------------ | 17| ERROR_UNKNOWN | 24700101 | Unknown error. | 18| MAX_SYSTEM_NUM_REACHED | 24700103 | The number of MediaKeySystem instances reaches the upper limit (64). | 19| MAX_SESSION_NUM_REACHED | 24700104 | The number of MediaKeySession instances reaches the upper limit (64). | 20| SERVICE_FATAL_ERROR | 24700201 | DRM service error. | 21 22## PreDefinedConfigName 23 24Enumerates the names of predefined configuration items. 25 26**Atomic service API**: This API can be used in atomic services since API version 14. 27 28**System capability**: SystemCapability.Multimedia.Drm.Core 29 30| Name | Value | Description | 31| ------------------------- | ---- | ------------ | 32| CONFIG_DEVICE_VENDOR | 'vendor' | Plugin vendor name, which corresponds to the value of **vendor** in the return value of [getConfigurationString](arkts-apis-drm-MediaKeySystem.md#getconfigurationstring). | 33| CONFIG_DEVICE_VERSION | 'version' | Plugin version number, which corresponds to the value of **version** in the return value of [getConfigurationString](arkts-apis-drm-MediaKeySystem.md#getconfigurationstring). | 34| CONFIG_DEVICE_DESCRIPTION | 'description' | Device descriptor, which corresponds to the value of **description** in the return value of [getConfigurationString](arkts-apis-drm-MediaKeySystem.md#getconfigurationstring). | 35| CONFIG_DEVICE_ALGORITHMS | 'algorithms' | Supported algorithm names, which correspond to the value of **algorithms** in the return value of [getConfigurationString](arkts-apis-drm-MediaKeySystem.md#getconfigurationstring). | 36| CONFIG_DEVICE_UNIQUE_ID | 'deviceUniqueId' | Unique device ID, which corresponds to the value of **deviceUniqueId** in the return value of [getConfigurationByteArray](arkts-apis-drm-MediaKeySystem.md#getconfigurationbytearray). | 37| CONFIG_SESSION_MAX | 'maxSessionNum' | Maximum number of sessions supported by the device, which corresponds to the value of **maxSessionNum** in the return value of [getConfigurationString](arkts-apis-drm-MediaKeySystem.md#getconfigurationstring). | 38| CONFIG_SESSION_CURRENT | 'currentSessionNum' | Number of existing sessions, which corresponds to the value of **currentSessionNum** in the return value of [getConfigurationString](arkts-apis-drm-MediaKeySystem.md#getconfigurationstring). | 39 40## MediaKeyType 41 42Enumerates the types of media keys. 43 44**Atomic service API**: This API can be used in atomic services since API version 14. 45 46**System capability**: SystemCapability.Multimedia.Drm.Core 47 48| Name | Value | Description | 49| ------------------------- | ---- | ------------ | 50| MEDIA_KEY_TYPE_OFFLINE | 0 | Offline. | 51| MEDIA_KEY_TYPE_ONLINE | 1 | Online. | 52 53## OfflineMediaKeyStatus 54 55Enumerates the statuses of offline media keys. 56 57**Atomic service API**: This API can be used in atomic services since API version 14. 58 59**System capability**: SystemCapability.Multimedia.Drm.Core 60 61| Name | Value | Description | 62| ------------------------- | ---- | ------------ | 63| OFFLINE_MEDIA_KEY_STATUS_UNKNOWN | 0 | Unknown status. | 64| OFFLINE_MEDIA_KEY_STATUS_USABLE | 1 | The media key is available. | 65| OFFLINE_MEDIA_KEY_STATUS_INACTIVE | 2 | The media key is inactive. | 66 67## CertificateStatus 68 69Enumerates the statuses of DRM certificates. 70 71**Atomic service API**: This API can be used in atomic services since API version 14. 72 73**System capability**: SystemCapability.Multimedia.Drm.Core 74 75| Name | Value | Description | 76| ------------------------- | ---- | ------------ | 77| CERT_STATUS_PROVISIONED | 0 | A DRM certificate has been installed on the device. | 78| CERT_STATUS_NOT_PROVISIONED | 1 | No DRM certificate is installed on the device. | 79| CERT_STATUS_EXPIRED | 2 | The DRM certificate has expired. | 80| CERT_STATUS_INVALID | 3 | The DRM certificate is invalid. | 81| CERT_STATUS_UNAVAILABLE | 4 | The DRM certificate is unavailable. | 82 83## MediaKeyRequestType 84 85Enumerates the types of media key requests. 86 87**Atomic service API**: This API can be used in atomic services since API version 12. 88 89**System capability**: SystemCapability.Multimedia.Drm.Core 90 91| Name | Value | Description | 92| ------------------------- | ---- | ------------ | 93| MEDIA_KEY_REQUEST_TYPE_UNKNOWN | 0 | Unknown type. | 94| MEDIA_KEY_REQUEST_TYPE_INITIAL | 1 | Initial request. | 95| MEDIA_KEY_REQUEST_TYPE_RENEWAL | 2 | Renewal request. | 96| MEDIA_KEY_REQUEST_TYPE_RELEASE | 3 | Release request. | 97| MEDIA_KEY_REQUEST_TYPE_NONE | 4 | None. | 98| MEDIA_KEY_REQUEST_TYPE_UPDATE | 5 | Update request. | 99 100## ContentProtectionLevel 101 102Enumerates the content protection levels. 103 104**Atomic service API**: This API can be used in atomic services since API version 12. 105 106**System capability**: SystemCapability.Multimedia.Drm.Core 107 108| Name | Value | Description | 109| ------------------------- | ---- | ------------ | 110| CONTENT_PROTECTION_LEVEL_UNKNOWN | 0 | Unknown content protection level. | 111| CONTENT_PROTECTION_LEVEL_SW_CRYPTO | 1 | Software content protection level. | 112| CONTENT_PROTECTION_LEVEL_HW_CRYPTO | 2 | Hardware content protection level. | 113| CONTENT_PROTECTION_LEVEL_ENHANCED_HW | 3 | Enhanced hardware content protection level. | 114| CONTENT_PROTECTION_LEVEL_MAX | 4 | Highest content protection level. | 115