1 /* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_DRM_REMOTE_REQUEST_CODE_H 17 #define OHOS_DRM_REMOTE_REQUEST_CODE_H 18 19 namespace OHOS { 20 namespace DrmStandard { 21 enum MediaKeySystemFactoryServiceRequestCode { 22 MEDIA_KEY_SYSTEM_FACTORY_IS_MEDIA_KEY_SYSTEM_SURPPORTED = 0, 23 MEDIA_KEY_SYSTEM_FACTORY_CREATE_MEDIA_KEYSYSTEM = 1, 24 MEDIA_KEY_SYSTEM_FACTORY_SET_LISTENER_OBJ = 2, 25 MEDIA_KEY_SYSTEM_FACTORY_GET_MEDIA_KEYSYSTEM_NAME = 3, 26 MEDIA_KEY_SYSTEM_FACTORY_GET_MEDIA_KEYSYSTEM_UUID = 4, 27 }; 28 29 enum MediaKeySystemServiceRequestCode { 30 MEDIA_KEY_SYSTEM_CREATE_KEY_SESSION = 0, 31 MEDIA_KEY_SYSTEM_GENERATE_KEYSYSTEM_REQUEST, 32 MEDIA_KEY_SYSTEM_PROCESS_KEYSYSTEM_RESPONSE, 33 MEDIA_KEY_SYSTEM_SETCONFIGURATION_STRING, 34 MEDIA_KEY_SYSTEM_GETCONFIGURATION_STRING, 35 MEDIA_KEY_SYSTEM_SETCONFIGURATION_BYTEARRAY, 36 MEDIA_KEY_SYSTEM_GETCONFIGURATION_BYTEARRAY, 37 MEDIA_KEY_SYSTEM_GETMETRIC, 38 MEDIA_KEY_SYSTEM_RELEASE, 39 MEDIA_KEY_SYSTEM_GETMAXSECURITYLEVEL, 40 MEDIA_KEY_SYSTEM_GETCERTIFICATESTATUS, 41 MEDIA_KEY_SYSTEM_GET_OFFLINELICENSEIDS, 42 MEDIA_KEY_SYSTEM_GET_OFFLINEKEY_STATUS, 43 MEDIA_KEY_SYSTEM_REMOVE_OFFLINELICENSE, 44 MEDIA_KEY_SYSTEM_SET_LISTENER_OBJ, 45 MEDIA_KEY_SYSTEM_SETCALLBACK, 46 }; 47 48 enum MediaKeySessionServiceRequestCode { 49 GET_MEDIA_DECRYPT_MODULE = 0, 50 KEY_SESSION_RELEASE, 51 MEDIA_KEY_SESSION_GENERATE_LICENSE_REQUEST, 52 MEDIA_KEY_SESSION_PROCESS_LICENSE_RESPONSE, 53 MEDIA_KEY_SESSION_GENERATE_OFFLINE_RELEASE_REQUEST, 54 MEDIA_KEY_SESSION_PROCESS_OFFLINE_RELEASE_RESPONSE, 55 MEDIA_KEY_SESSION_GENERATE_CHECK_LICENSE_STATUS, 56 MEDIA_KEY_SESSION_RESTORE_OFFLINEKEYS, 57 MEDIA_KEY_SESSION_REMOVE_LICENSE, 58 MEDIA_KEY_SESSION_SET_CALLBACK, 59 MEDIA_KEY_SESSION_REQUIRE_SECURE_DECODER, 60 MEDIA_KEY_SESSION_SET_LISTENER_OBJ, 61 MEDIA_KEY_SESSION_GETSECURITYLEVEL, 62 }; 63 64 enum MediaDecryptModuleServiceRequestCode { 65 DECRYPT_MODULE_DECRYPT_DATA = 0, 66 DECRYPT_MODULE_RELEASE = 1, 67 }; 68 69 enum MediaKeySessionServiceCallbackRequestCode { 70 MEDIA_KEY_SESSION_SERVICE_CALLBACK_SEND_EVENT = 0, 71 MEDIA_KEY_SESSION_SERVICE_CALLBACK_SEND_EVENT_KEY_CHANGED, 72 }; 73 74 enum MediaKeySystemServiceCallbackRequestCode { 75 MEDIA_KEY_SYSTEM_SERVICE_CALLBACK_SEND_EVENT = 0, 76 }; 77 } // namespace DrmStandard 78 } // namespace OHOS 79 80 #endif // OHOS_DRM_REMOTE_REQUEST_CODE_H 81