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

Commit 5072930c authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-fbba21d1-17b5-4752-9864-95770e5db190-for-git_oc-mr1-release-41...

release-request-fbba21d1-17b5-4752-9864-95770e5db190-for-git_oc-mr1-release-4144771 snap-temp-L10300000078657232

Change-Id: Ia46335bc8b701c8a42a23a661b8f87842cb0f200
parents 9cf96452 4512a57e
Loading
Loading
Loading
Loading
+1976 −1757

File changed.

Preview size limit exceeded, changes collapsed.

cas/1.0/Android.bp

0 → 100644
+84 −0
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen. Do not edit manually.

filegroup {
    name: "android.hardware.cas@1.0_hal",
    srcs: [
        "types.hal",
        "ICas.hal",
        "ICasListener.hal",
        "IDescramblerBase.hal",
        "IMediaCasService.hal",
    ],
}

genrule {
    name: "android.hardware.cas@1.0_genc++",
    tools: ["hidl-gen"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas@1.0",
    srcs: [
        ":android.hardware.cas@1.0_hal",
    ],
    out: [
        "android/hardware/cas/1.0/types.cpp",
        "android/hardware/cas/1.0/CasAll.cpp",
        "android/hardware/cas/1.0/CasListenerAll.cpp",
        "android/hardware/cas/1.0/DescramblerBaseAll.cpp",
        "android/hardware/cas/1.0/MediaCasServiceAll.cpp",
    ],
}

genrule {
    name: "android.hardware.cas@1.0_genc++_headers",
    tools: ["hidl-gen"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas@1.0",
    srcs: [
        ":android.hardware.cas@1.0_hal",
    ],
    out: [
        "android/hardware/cas/1.0/types.h",
        "android/hardware/cas/1.0/hwtypes.h",
        "android/hardware/cas/1.0/ICas.h",
        "android/hardware/cas/1.0/IHwCas.h",
        "android/hardware/cas/1.0/BnHwCas.h",
        "android/hardware/cas/1.0/BpHwCas.h",
        "android/hardware/cas/1.0/BsCas.h",
        "android/hardware/cas/1.0/ICasListener.h",
        "android/hardware/cas/1.0/IHwCasListener.h",
        "android/hardware/cas/1.0/BnHwCasListener.h",
        "android/hardware/cas/1.0/BpHwCasListener.h",
        "android/hardware/cas/1.0/BsCasListener.h",
        "android/hardware/cas/1.0/IDescramblerBase.h",
        "android/hardware/cas/1.0/IHwDescramblerBase.h",
        "android/hardware/cas/1.0/BnHwDescramblerBase.h",
        "android/hardware/cas/1.0/BpHwDescramblerBase.h",
        "android/hardware/cas/1.0/BsDescramblerBase.h",
        "android/hardware/cas/1.0/IMediaCasService.h",
        "android/hardware/cas/1.0/IHwMediaCasService.h",
        "android/hardware/cas/1.0/BnHwMediaCasService.h",
        "android/hardware/cas/1.0/BpHwMediaCasService.h",
        "android/hardware/cas/1.0/BsMediaCasService.h",
    ],
}

cc_library_shared {
    name: "android.hardware.cas@1.0",
    defaults: ["hidl-module-defaults"],
    generated_sources: ["android.hardware.cas@1.0_genc++"],
    generated_headers: ["android.hardware.cas@1.0_genc++_headers"],
    export_generated_headers: ["android.hardware.cas@1.0_genc++_headers"],
    vendor_available: true,
    shared_libs: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "liblog",
        "libutils",
        "libcutils",
    ],
    export_shared_lib_headers: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "libutils",
    ],
}

cas/1.0/CasHal.mk

0 → 100644
+192 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2017 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.


########################################################################
# Included by frameworks/base for MediaCas. Hidl HAL can't be linked as
# Java lib from frameworks because it has dependency on frameworks itself.
#

intermediates := $(TARGET_OUT_COMMON_GEN)/JAVA_LIBRARIES/android.hardware.cas-V1.0-java_intermediates

HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
HIDL_PATH := system/libhidl/transport/base/1.0

#
# Build types.hal (DebugInfo)
#
GEN := $(intermediates)/android/hidl/base/V1_0/DebugInfo.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(HIDL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hidl:system/libhidl/transport \
        android.hidl.base@1.0::types.DebugInfo

$(GEN): $(HIDL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build IBase.hal
#
GEN := $(intermediates)/android/hidl/base/V1_0/IBase.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(HIDL_PATH)/IBase.hal
$(GEN): PRIVATE_DEPS += $(HIDL_PATH)/types.hal
$(GEN): $(HIDL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hidl:system/libhidl/transport \
        android.hidl.base@1.0::IBase

$(GEN): $(HIDL_PATH)/IBase.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

HIDL_PATH := hardware/interfaces/cas/1.0

#
# Build types.hal (HidlCasPluginDescriptor)
#
GEN := $(intermediates)/android/hardware/cas/V1_0/HidlCasPluginDescriptor.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(HIDL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.cas@1.0::types.HidlCasPluginDescriptor

$(GEN): $(HIDL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (Status)
#
GEN := $(intermediates)/android/hardware/cas/V1_0/Status.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(HIDL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.cas@1.0::types.Status

$(GEN): $(HIDL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build ICas.hal
#
GEN := $(intermediates)/android/hardware/cas/V1_0/ICas.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(HIDL_PATH)/ICas.hal
$(GEN): PRIVATE_DEPS += $(HIDL_PATH)/types.hal
$(GEN): $(HIDL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.cas@1.0::ICas

$(GEN): $(HIDL_PATH)/ICas.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build ICasListener.hal
#
GEN := $(intermediates)/android/hardware/cas/V1_0/ICasListener.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(HIDL_PATH)/ICasListener.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.cas@1.0::ICasListener

$(GEN): $(HIDL_PATH)/ICasListener.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build IDescramblerBase.hal
#
GEN := $(intermediates)/android/hardware/cas/V1_0/IDescramblerBase.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(HIDL_PATH)/IDescramblerBase.hal
$(GEN): PRIVATE_DEPS += $(HIDL_PATH)/types.hal
$(GEN): $(HIDL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.cas@1.0::IDescramblerBase

$(GEN): $(HIDL_PATH)/IDescramblerBase.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build IMediaCasService.hal
#
GEN := $(intermediates)/android/hardware/cas/V1_0/IMediaCasService.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(HIDL_PATH)/IMediaCasService.hal
$(GEN): PRIVATE_DEPS += $(HIDL_PATH)/ICas.hal
$(GEN): $(HIDL_PATH)/ICas.hal
$(GEN): PRIVATE_DEPS += $(HIDL_PATH)/ICasListener.hal
$(GEN): $(HIDL_PATH)/ICasListener.hal
$(GEN): PRIVATE_DEPS += $(HIDL_PATH)/IDescramblerBase.hal
$(GEN): $(HIDL_PATH)/IDescramblerBase.hal
$(GEN): PRIVATE_DEPS += $(HIDL_PATH)/types.hal
$(GEN): $(HIDL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.cas@1.0::IMediaCasService

$(GEN): $(HIDL_PATH)/IMediaCasService.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

cas/1.0/ICas.hal

0 → 100644
+122 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.0;

import android.hardware.cas@1.0::types;

/**
  * 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 {
    /**
     * Provide the CA private data from a CA_descriptor in the conditional
     * access table to a CasPlugin.
     *
     * @param pvtData a byte array containing the private data, the format of
     * which is scheme-specific and opaque to the framework.
     * @return status the status of the call.
     */
    setPrivateData(vec<uint8_t> pvtData) generates (Status status);

    /**
     * Open a session to descramble one or more streams scrambled by the
     * conditional access system.
     *
     * @return status the status of the call.
     * @return sessionId the id of the newly opened session.
     */
    openSession() generates(Status status, HidlCasSessionId sessionId);

    /**
     * Close a session.
     *
     * @param sessionId the id of the session to be closed.
     * @return status the status of the call.
     */
    closeSession(HidlCasSessionId sessionId) generates (Status status);

    /**
     * Provide the CA private data from a CA_descriptor in the program map
     * table to a session.
     *
     * @param sessionId the id of the session which the private data applies to.
     * @param pvtData a byte array containing the private data, the format of
     * which is scheme-specific and opaque to the framework.
     * @return status the status of the call.
     */
    setSessionPrivateData(HidlCasSessionId sessionId, vec<uint8_t> pvtData)
        generates (Status status);

    /**
     * Process an ECM from the ECM stream for this session’s elementary stream.
     *
     * @param sessionId the id of the session which the ecm data applies to.
     * @param ecm a byte array containing the ecm data.
     * @return status the status of the call.
     */
    processEcm(HidlCasSessionId sessionId, vec<uint8_t> ecm)
        generates (Status status);

    /**
     * Process an in-band EMM from the EMM stream.
     *
     * @param emm a byte array containing the emm data.
     * @return status the status of the call.
     */
    processEmm(vec<uint8_t> emm) generates (Status status);

    /**
     * Send an scheme-specific event to the CasPlugin.
     *
     * @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.
     */
    sendEvent(int32_t event, int32_t arg, vec<uint8_t> eventData)
        generates (Status status);

    /**
     * Initiate a provisioning operation for a CA system.
     *
     * @param provisionString string containing information needed for the
     * provisioning operation, the format of which is scheme and implementation
     * specific.
     * @return status the status of the call.
     */
    provision(string provisionString) generates (Status status);

    /**
     * Notify the CA system to refresh entitlement keys.
     *
     * @param refreshType the type of the refreshment.
     * @param refreshData private data associated with the refreshment.
     * @return status the status of the call.
     */
    refreshEntitlements(int32_t refreshType, vec<uint8_t> refreshData)
        generates (Status status);

    /**
     * Release the descrambler instance.
     *
     * @return status the status of the call.
     */
    release() generates (Status status);
};
+28 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.0;

interface ICasListener {
    /**
      * Notify the listener of a scheme-specific event from the CA system.
      *
      * @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.
      */
    onEvent(int32_t event, int32_t arg, vec<uint8_t> data);
};
Loading