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_TYPES_H 17 #define OHOS_DRM_TYPES_H 18 19 #include <stdint.h> 20 21 namespace OHOS { 22 namespace DrmStandard { 23 enum MediaKeySessionKeyStatus { 24 MEDIA_KEY_SESSION_KEY_STATUS_USABLE = 0, 25 MEDIA_KEY_SESSION_KEY_STATUS_EXPIRED = 1, 26 MEDIA_KEY_SESSION_KEY_STATUS_OUTPUT_NOT_ALLOWED = 2, 27 MEDIA_KEY_SESSION_KEY_STATUS_PENDING = 3, 28 MEDIA_KEY_SESSION_KEY_STATUS_INTERNAL_ERROR = 4, 29 MEDIA_KEY_SESSION_KEY_STATUS_USABLE_IN_FUTURE = 5, 30 }; 31 32 typedef enum DrmEventType : int32_t { 33 DRM_EVENT_PROVISION_REQUIRED = 0, 34 DRM_EVENT_KEY_NEEDED, 35 DRM_EVENT_KEY_EXPIRED, 36 DRM_EVENT_VENDOR_DEFINED, 37 DRM_EVENT_EXPIRATION_UPDATED, 38 DRM_EVENT_KEY_CHANGED, 39 DRM_EVENT_KEYSESSION_LOST, 40 } DrmEventType; 41 } // DrmStandard 42 } // OHOS 43 44 #endif // OHOS_DRM_TYPES_H