2 * Copyright (C) 2016 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package android.hardware.drm@1.0;
19 import android.hardware.drm@1.0::types;
22 * Ref: frameworks/native/include/media/drm/DrmAPI.h:DrmPluginListener
26 * IDrmPluginListener is a listener interface for Drm events sent from an
27 * IDrmPlugin instance.
29 interface IDrmPluginListener {
32 * Legacy event sending method, it sends events of various types using a
33 * single overloaded set of parameters. This form is deprecated.
35 * @param eventType the type of the event
36 * @param sessionId identifies the session the event originated from
37 * @param data event-specific data blob
39 oneway sendEvent(EventType eventType, SessionId sessionId,
43 * Send a license expiration update to the listener. The expiration
44 * update indicates how long the current keys are valid before they
47 * @param sessionId identifies the session the event originated from
48 * @param expiryTimeInMS the time when the keys need to be renewed.
49 * The time is in milliseconds, relative to the Unix epoch. A time
50 * of 0 indicates that the keys never expire.
52 oneway sendExpirationUpdate(SessionId sessionId, int64_t expiryTimeInMS);
55 * Send a keys change event to the listener. The keys change event
56 * indicates the status of each key in the session. Keys can be
57 * indicated as being usable, expired, outputnotallowed or statuspending.
59 * @param sessionId identifies the session the event originated from
60 * @param keyStatusList indicates the status for each key ID in the
62 * @param hasNewUsableKey indicates if the event includes at least one
63 * key that has become usable.
65 oneway sendKeysChange(SessionId sessionId, vec<KeyStatus> keyStatusList,
66 bool hasNewUsableKey);