1 /* 2 * Copyright (c) 2025 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 ARK_AUDIO_CENC_INFO_ADAPTER_H 17 #define ARK_AUDIO_CENC_INFO_ADAPTER_H 18 #pragma once 19 20 #include "base/include/ark_web_base_ref_counted.h" 21 #include "base/include/ark_web_types.h" 22 23 namespace OHOS::ArkWeb { 24 25 /*--ark web(source=webcore)--*/ 26 class ArkAudioCencInfoAdapter : public virtual ArkWebBaseRefCounted { 27 public: 28 /*--ark web()--*/ 29 virtual uint8_t* GetKeyId() = 0; 30 31 /*--ark web()--*/ 32 virtual uint32_t GetKeyIdLen() = 0; 33 34 /*--ark web()--*/ 35 virtual uint8_t* GetIv() = 0; 36 37 /*--ark web()--*/ 38 virtual uint32_t GetIvLen() = 0; 39 40 /*--ark web()--*/ 41 virtual uint32_t GetAlgo() = 0; 42 43 /*--ark web()--*/ 44 virtual uint32_t GetEncryptedBlockCount() = 0; 45 46 /*--ark web()--*/ 47 virtual uint32_t GetSkippedBlockCount() = 0; 48 49 /*--ark web()--*/ 50 virtual uint32_t GetFirstEncryptedOffset() = 0; 51 52 /*--ark web()--*/ 53 virtual ArkWebUint32Vector GetClearHeaderLens() = 0; 54 55 /*--ark web()--*/ 56 virtual ArkWebUint32Vector GetPayLoadLens() = 0; 57 58 /*--ark web()--*/ 59 virtual uint32_t GetMode() = 0; 60 61 /*--ark web()--*/ 62 virtual void SetKeyId(uint8_t* keyId) = 0; 63 64 /*--ark web()--*/ 65 virtual void SetKeyIdLen(uint32_t keyIdLen) = 0; 66 67 /*--ark web()--*/ 68 virtual void SetIv(uint8_t* iv) = 0; 69 70 /*--ark web()--*/ 71 virtual void SetIvLen(uint32_t ivLen) = 0; 72 73 /*--ark web()--*/ 74 virtual void SetAlgo(uint32_t algo) = 0; 75 76 /*--ark web()--*/ 77 virtual void SetEncryptedBlockCount(uint32_t blockCount) = 0; 78 79 /*--ark web()--*/ 80 virtual void SetSkippedBlockCount(uint32_t blockCount) = 0; 81 82 /*--ark web()--*/ 83 virtual void SetFirstEncryptedOffset(uint32_t offset) = 0; 84 85 /*--ark web()--*/ 86 virtual void SetClearHeaderLens(const ArkWebUint32Vector& lens) = 0; 87 88 /*--ark web()--*/ 89 virtual void SetPayLoadLens(const ArkWebUint32Vector& lens) = 0; 90 91 /*--ark web()--*/ 92 virtual void SetMode(uint32_t mode) = 0; 93 }; 94 95 96 } // namespace OHOS::ArkWeb 97 98 #endif // ARK_AUDIO_CODEC_DECODER_ADAPTER_H 99