summaryrefslogtreecommitdiff
path: root/drm/1.2/IDrmPluginListener.hal
blob: e8cb91a9c7a09a4a556a85a492a6aa22811f0f47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
 * Copyright (C) 2018 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.drm@1.2;

import @1.0::IDrmPluginListener;
import @1.0::SessionId;

/**
 * IDrmPluginListener is a listener interface for Drm events sent from an
 * IDrmPlugin instance.
 */
interface IDrmPluginListener extends @1.0::IDrmPluginListener {
    /**
     * Some device crypto hardware is incapable of retaining crypto
     * session state across suspend and resume cycles. A
     * SessionLostState event must be signaled when a session has
     * become invalid for this reason. This event must not be used to
     * indicate a failure in the crypto system. Closing the session
     * and opening a new one must allow the application to resume
     * normal use of the drm hal module.
     *
     * @param sessionId identifies the session that has been invalidated
     */
     oneway sendSessionLostState(SessionId sessionId);

    /**
     * Send a keys change event to the listener. The keys change event
     * indicates the status of each key in the session. Keys can be
     * indicated as being usable, expired, outputnotallowed or statuspending.
     *
     * This method only differs from @1.0 version by the addition of new
     * KeyStatusType(s) in keyStatusList.
     *
     * @param sessionId identifies the session the event originated from
     * @param keyStatusList indicates the status for each key ID in the
     * session.
     * @param hasNewUsableKey indicates if the event includes at least one
     * key that has become usable.
     */
    oneway sendKeysChange_1_2(SessionId sessionId, vec<KeyStatus> keyStatusList,
            bool hasNewUsableKey);

};