1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 
5 package org.mozilla.gecko.media;
6 
7 // Non-default types used in interface.
8 import org.mozilla.gecko.media.SessionKeyInfo;
9 
10 interface IMediaDrmBridgeCallbacks {
11 
onSessionCreated(int createSessionToken, int promiseId, in byte[] sessionId, in byte[] request)12     oneway void onSessionCreated(int createSessionToken,
13                                  int promiseId,
14                                  in byte[] sessionId,
15                                  in byte[] request);
16 
onSessionUpdated(int promiseId, in byte[] sessionId)17     oneway void onSessionUpdated(int promiseId, in byte[] sessionId);
18 
onSessionClosed(int promiseId, in byte[] sessionId)19     oneway void onSessionClosed(int promiseId, in byte[] sessionId);
20 
onSessionMessage(in byte[] sessionId, int sessionMessageType, in byte[] request)21     oneway void onSessionMessage(in byte[] sessionId,
22                                  int sessionMessageType,
23                                  in byte[] request);
24 
onSessionError(in byte[] sessionId, String message)25     oneway void onSessionError(in byte[] sessionId, String message);
26 
onSessionBatchedKeyChanged(in byte[] sessionId, in SessionKeyInfo[] keyInfos)27     oneway void onSessionBatchedKeyChanged(in byte[] sessionId,
28                                            in SessionKeyInfo[] keyInfos);
29 
onRejectPromise(int promiseId, String message)30     oneway void onRejectPromise(int promiseId, String message);
31 }
32