Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8d76bd1 authored by Henry Fang's avatar Henry Fang Committed by Gerrit Code Review
Browse files

Merge "Update cas@1.1 hal to cas@1.2."

parents 00fab92a a9f93655
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -80,3 +80,6 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/vndk-Q/android.hardwar
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/android.hardware.configstore@1.2.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk-Q/android.hardware.configstore@1.2.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/android.hardware.configstore@1.2.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.cas@1.1*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.cas@1.1*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.cas@1.1*)

cas/1.2/Android.bp

0 → 100644
+21 −0
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen -Landroidbp.

hidl_interface {
    name: "android.hardware.cas@1.2",
    root: "android.hardware",
    vndk: {
        enabled: true,
    },
    srcs: [
        "ICas.hal",
        "ICasListener.hal",
        "IMediaCasService.hal",
        "types.hal",
    ],
    interfaces: [
        "android.hardware.cas@1.0",
        "android.hardware.cas@1.1",
        "android.hidl.base@1.0",
    ],
    gen_java: true,
}

cas/1.2/ICas.hal

0 → 100644
+43 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.cas@1.2;

import @1.0::HidlCasSessionId;
import @1.1::ICas;
import ScramblingMode;
import SessionIntent;
import Status;

/**
 * ICas is the API to control the cas system and is accessible from both
 * Java and native level. It is used to manage sessions, provision/refresh
 * the cas system, and process the EMM/ECM messages. It also allows bi-directional,
 * scheme-specific communications between the client and the cas system.
 */
interface ICas extends @1.1::ICas {
    /**
     * Open a session to descramble one or more streams by specifying intention
     * and scrambling mode.
     *
     * @param intent the intention of the session to be opened.
     * @param mode the scrambling mode the session will use.
     * @return status the status of the call.
     * @return sessionId the id of the newly opened session.
     */
    openSession_1_2(SessionIntent intent, ScramblingMode mode)
        generates (Status status, HidlCasSessionId sessionId);
};
+37 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.cas@1.2;

import @1.1::ICasListener;
import StatusEvent;

interface ICasListener extends @1.1::ICasListener {
    /**
     * Notify the listener that the status of CAS system has changed.
     *
     * @param event the event type of status change.
     * @param number value for status event.
     *               For PLUGIN_PHYSICAL_MODULE_CHANGED event:
     *               the positive number presents how many plugins are inserted;
     *               the negative number presents how many plugins are removed.
     *               Client must enumerate plugins after receive the event.
     *               For PLUGIN_SESSION_NUMBER_CHANGED event:
     *               the number presents how many sessions are supported
     *               in the plugin.
     */
    onStatusUpdate(StatusEvent event, int32_t number);
};
+35 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.cas@1.2;

import ICas;
import ICasListener;
import @1.1::IMediaCasService;

/**
 * IMediaCasService is the main entry point for interacting with a vendor's
 * cas HAL to create cas and descrambler plugin instances. A cas plugin instance
 * opens cas sessions which are used to obtain keys for a descrambler session,
 * which can in turn be used to descramble protected video content.
 *
 * The 1.2 must always create 1.2 ICas interfaces, which are
 * returned via the 1.1 createPluginExt method.
 *
 * To use 1.2 features the caller must cast the returned interface to a
 * 1.2 HAL, using V1_2::ICas::castFrom().
 */
interface IMediaCasService extends @1.1::IMediaCasService {};
Loading