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 DRM_ERROR_CODE_H 17 #define DRM_ERROR_CODE_H 18 19 #include <string> 20 21 namespace OHOS { 22 namespace DrmStandard { 23 const int32_t DRM_ERROR = -1; 24 const int32_t DRM_OK = 0; 25 const int32_t DRM_ALLOC_ERROR = 1; 26 const int32_t DRM_INVALID_ARG = 2; 27 const int32_t DRM_INVALID_STATE = 3; 28 const int32_t DRM_OPERATION_NOT_ALLOWED = 5; 29 const int32_t DRM_HOST_ERROR = 6; 30 const int32_t DRM_SERVICE_ERROR = 7; 31 const int32_t DRM_MEMORY_ERROR = 8; 32 const int32_t DRM_UNKNOWN_ERROR = 24700101; 33 const int32_t DRM_MAX_SYSTEM_NUM_REACHED = 24700103; 34 const int32_t DRM_MAX_SESSION_NUM_REACHED = 24700104; 35 const int32_t DRM_SERVICE_FATAL_ERROR = 24700201; 36 const int32_t DRM_INVALID_PARAM = 401; 37 38 const std::string DRM_INVALID_PARAM_INFO = "input parameter value error"; 39 const std::string DRM_SERVICE_FATAL_ERRO_INFO = "service error"; 40 const std::string DRM_UNKNOWN_ERROR_INFO = "unknow error"; 41 const std::string DRM_MAX_SYSTEM_NUM_REACHED_INFO = "mediaKeySystem number limited"; 42 const std::string DRM_MAX_SESSION_NUM_REACHED_INFO = "mediaKeySession number limited"; 43 } // namespace DrmStandard 44 } // namespace OHOS 45 #endif // DRM_ERROR_CODE_H