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

Commit d9c767a4 authored by Xusong Wang's avatar Xusong Wang Committed by Android (Google) Code Review
Browse files

Merge "Revert "Update cas@1.0 hal to cas@1.1""

parents 9eb00fe9 1b066c8d
Loading
Loading
Loading
Loading

cas/1.1/Android.bp

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

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

cas/1.1/ICas.hal

deleted100644 → 0
+0 −42
Original line number Original line 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.1;

import @1.0::HidlCasSessionId;
import @1.0::ICas;
import @1.0::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.0::ICas {
   /**
     * Send an scheme-specific session event to the CasPlugin.
     *
     * @param sessionId the id of an opened session.
     * @param event an integer denoting a scheme-specific event to be sent.
     * @param arg a scheme-specific integer argument for the event.
     * @param data a byte array containing scheme-specific data for the event.
     * @return status the status of the call.
     */
    sendSessionEvent(HidlCasSessionId sessionId, int32_t event, int32_t arg,
                     vec<uint8_t> eventData)
          generates (Status status);
};

cas/1.1/ICasListener.hal

deleted100644 → 0
+0 −33
Original line number Original line 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.1;

import @1.0::ICasListener;
import @1.0::HidlCasSessionId;

interface ICasListener extends @1.0::ICasListener{
    /**
      * Notify the listener of a scheme-specific session event from CA system.
      *
      * @param sessionId the id of an opened session.
      * @param event an integer whose meaning is scheme-specific.
      * @param arg an integer whose meaning is scheme-specific.
      * @param data a byte array of data whose format and meaning are
      * scheme-specific.
      */
    onSessionEvent(HidlCasSessionId sessionId, int32_t event, int32_t arg,
                   vec<uint8_t> data);
};

cas/1.1/IMediaCasService.hal

deleted100644 → 0
+0 −38
Original line number Original line 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.1;

import @1.1::ICas;
import @1.1::ICasListener;
import @1.0::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.
 */

interface IMediaCasService extends @1.0::IMediaCasService {
    /**
     * Construct a new instance of a @1.1 ICAS CasPlugin given a CA_system_id.
     *
     * @param caSystemId the id of the CA system.
     * @param listener the event listener to receive events coming from the CasPlugin.
     * @return cas the newly created CasPlugin interface.
     */
    createPluginExt(int32_t caSystemId, ICasListener listener) generates (ICas cas);
};

cas/1.1/default/Android.bp

deleted100644 → 0
+0 −49
Original line number Original line Diff line number Diff line
cc_defaults {
    name: "cas_service_defaults@1.1",
    defaults: ["hidl_defaults"],
    vendor: true,
    relative_install_path: "hw",
    srcs: [
      "CasImpl.cpp",
      "DescramblerImpl.cpp",
      "MediaCasService.cpp",
      "service.cpp",
      "SharedLibrary.cpp",
      "TypeConvert.cpp",
    ],

    compile_multilib: "32",

    shared_libs: [
      "android.hardware.cas@1.0",
      "android.hardware.cas@1.1",
      "android.hardware.cas.native@1.0",
      "android.hidl.memory@1.0",
      "libbinder",
      "libhidlbase",
      "libhidlmemory",
      "libhidltransport",
      "liblog",
      "libutils",
    ],
    header_libs: [
      "libstagefright_foundation_headers",
      "media_plugin_headers",
    ],
}

cc_binary {
    name: "android.hardware.cas@1.1-service",
    vintf_fragments: ["android.hardware.cas@1.1-service.xml"],
    defaults: ["cas_service_defaults@1.1"],
    init_rc: ["android.hardware.cas@1.1-service.rc"],
}

cc_binary {
    name: "android.hardware.cas@1.1-service-lazy",
    vintf_fragments: ["android.hardware.cas@1.1-service-lazy.xml"],
    overrides: ["android.hardware.cas@1.1-service"],
    defaults: ["cas_service_defaults@1.1"],
    init_rc: ["android.hardware.cas@1.1-service-lazy.rc"],
    cflags: ["-DLAZY_SERVICE"],
}
Loading