1/**
2 * Copyright (C) 2021 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 android.hardware.drm@1.4;
17
18import @1.2::ICryptoPlugin;
19import @1.4::LogMessage;
20import @1.4::Status;
21
22/**
23 * ICryptoPlugin is the HAL for vendor-provided crypto plugins.
24 * It allows crypto sessions to be opened and operated on, to
25 * load crypto keys for a codec to decrypt protected video content.
26 */
27interface ICryptoPlugin extends @1.2::ICryptoPlugin {
28
29    /**
30     * @return logMessages latest plugin level log messages. Can be used
31     *     by apps in diagnosis of errors.
32     * @return status the status of the call. The status must be:
33     *     OK on success;
34     *     GENERAL_OEM_ERROR on OEM-provided, low-level component failures;
35     *     GENERAL_PLUGIN_ERROR on unexpected plugin-level errors.
36     */
37    getLogMessages() generates (@1.4::Status status, vec<LogMessage> logMessages);
38
39};
40