1 /* 2 * Copyright 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 */ 16 17 package android.media.tv.interactive; 18 19 import android.graphics.Rect; 20 import android.media.tv.AdRequest; 21 import android.media.tv.BroadcastInfoRequest; 22 import android.media.tv.interactive.ITvInteractiveAppSession; 23 import android.net.Uri; 24 import android.os.Bundle; 25 26 /** 27 * Helper interface for ITvInteractiveAppSession to allow TvInteractiveAppService to notify the 28 * system service when there is a related event. 29 * @hide 30 */ 31 oneway interface ITvInteractiveAppSessionCallback { onSessionCreated(in ITvInteractiveAppSession session)32 void onSessionCreated(in ITvInteractiveAppSession session); onLayoutSurface(int left, int top, int right, int bottom)33 void onLayoutSurface(int left, int top, int right, int bottom); onBroadcastInfoRequest(in BroadcastInfoRequest request)34 void onBroadcastInfoRequest(in BroadcastInfoRequest request); onRemoveBroadcastInfo(int id)35 void onRemoveBroadcastInfo(int id); onSessionStateChanged(int state, int err)36 void onSessionStateChanged(int state, int err); onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId)37 void onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId); onTeletextAppStateChanged(int state)38 void onTeletextAppStateChanged(int state); onCommandRequest(in String cmdType, in Bundle parameters)39 void onCommandRequest(in String cmdType, in Bundle parameters); onSetVideoBounds(in Rect rect)40 void onSetVideoBounds(in Rect rect); onRequestCurrentChannelUri()41 void onRequestCurrentChannelUri(); onRequestCurrentChannelLcn()42 void onRequestCurrentChannelLcn(); onRequestStreamVolume()43 void onRequestStreamVolume(); onRequestTrackInfoList()44 void onRequestTrackInfoList(); onRequestCurrentTvInputId()45 void onRequestCurrentTvInputId(); onRequestSigning(in String id, in String algorithm, in String alias, in byte[] data)46 void onRequestSigning(in String id, in String algorithm, in String alias, in byte[] data); onAdRequest(in AdRequest request)47 void onAdRequest(in AdRequest request); 48 } 49