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.AdBuffer; 21 import android.media.tv.AdRequest; 22 import android.media.tv.BroadcastInfoRequest; 23 import android.media.tv.TvRecordingInfo; 24 import android.media.tv.interactive.ITvInteractiveAppSession; 25 import android.net.Uri; 26 import android.os.Bundle; 27 28 /** 29 * Helper interface for ITvInteractiveAppSession to allow TvInteractiveAppService to notify the 30 * system service when there is a related event. 31 * @hide 32 */ 33 oneway interface ITvInteractiveAppSessionCallback { onSessionCreated(in ITvInteractiveAppSession session)34 void onSessionCreated(in ITvInteractiveAppSession session); onLayoutSurface(int left, int top, int right, int bottom)35 void onLayoutSurface(int left, int top, int right, int bottom); onBroadcastInfoRequest(in BroadcastInfoRequest request)36 void onBroadcastInfoRequest(in BroadcastInfoRequest request); onRemoveBroadcastInfo(int id)37 void onRemoveBroadcastInfo(int id); onSessionStateChanged(int state, int err)38 void onSessionStateChanged(int state, int err); onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId)39 void onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId); onTeletextAppStateChanged(int state)40 void onTeletextAppStateChanged(int state); onAdBufferReady(in AdBuffer buffer)41 void onAdBufferReady(in AdBuffer buffer); onCommandRequest(in String cmdType, in Bundle parameters)42 void onCommandRequest(in String cmdType, in Bundle parameters); onTimeShiftCommandRequest(in String cmdType, in Bundle parameters)43 void onTimeShiftCommandRequest(in String cmdType, in Bundle parameters); onSetVideoBounds(in Rect rect)44 void onSetVideoBounds(in Rect rect); onRequestCurrentVideoBounds()45 void onRequestCurrentVideoBounds(); onRequestCurrentChannelUri()46 void onRequestCurrentChannelUri(); onRequestCurrentChannelLcn()47 void onRequestCurrentChannelLcn(); onRequestStreamVolume()48 void onRequestStreamVolume(); onRequestTrackInfoList()49 void onRequestTrackInfoList(); onRequestCurrentTvInputId()50 void onRequestCurrentTvInputId(); onRequestTimeShiftMode()51 void onRequestTimeShiftMode(); onRequestAvailableSpeeds()52 void onRequestAvailableSpeeds(); onRequestSelectedTrackInfo()53 void onRequestSelectedTrackInfo(); onRequestStartRecording(in String requestId, in Uri programUri)54 void onRequestStartRecording(in String requestId, in Uri programUri); onRequestStopRecording(in String recordingId)55 void onRequestStopRecording(in String recordingId); onRequestScheduleRecording(in String requestId, in String inputId, in Uri channelUri, in Uri programUri, in Bundle params)56 void onRequestScheduleRecording(in String requestId, in String inputId, in Uri channelUri, 57 in Uri programUri, in Bundle params); onRequestScheduleRecording2(in String requestId, in String inputId, in Uri channelUri, long start, long duration, int repeat, in Bundle params)58 void onRequestScheduleRecording2(in String requestId, in String inputId, in Uri channelUri, 59 long start, long duration, int repeat, in Bundle params); onSetTvRecordingInfo(in String recordingId, in TvRecordingInfo recordingInfo)60 void onSetTvRecordingInfo(in String recordingId, in TvRecordingInfo recordingInfo); onRequestTvRecordingInfo(in String recordingId)61 void onRequestTvRecordingInfo(in String recordingId); onRequestTvRecordingInfoList(in int type)62 void onRequestTvRecordingInfoList(in int type); onRequestSigning(in String id, in String algorithm, in String alias, in byte[] data)63 void onRequestSigning(in String id, in String algorithm, in String alias, in byte[] data); onRequestSigning2(in String id, in String algorithm, in String host, int port, in byte[] data)64 void onRequestSigning2(in String id, in String algorithm, in String host, int port, in byte[] data); onRequestCertificate(in String host, int port)65 void onRequestCertificate(in String host, int port); onAdRequest(in AdRequest request)66 void onAdRequest(in AdRequest request); 67 } 68