1/* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16package [email protected]; 17 18import [email protected]::types; 19 20/** 21 * IDescramblerBase is the API to control the descrambler and is accessible 22 * from both Java and native level. 23 */ 24 25interface IDescramblerBase { 26 /** 27 * Associate a MediaCas session with this MediaDescrambler instance. 28 * 29 * @param sessionId the id of the session to associate with this descrambler instance. 30 * @return status the status of the call. 31 */ 32 setMediaCasSession(HidlCasSessionId sessionId) generates (Status status); 33 34 /** 35 * Query if the scrambling scheme requires the use of a secure decoder 36 * to decode data of the given mime type. 37 * 38 * @param mime the mime type of the media data. 39 * @return result whether the descrambler requires a secure decoder. 40 */ 41 requiresSecureDecoderComponent(string mime) generates (bool result); 42 43 /** 44 * Release the descrambler instance. 45 * 46 * @return status the status of the call. 47 */ 48 release() generates (Status status); 49}; 50