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.BroadcastInfoResponse; 21 import android.net.Uri; 22 import android.media.tv.AdBuffer; 23 import android.media.PlaybackParams; 24 import android.media.tv.AdResponse; 25 import android.media.tv.BroadcastInfoResponse; 26 import android.media.tv.TvTrackInfo; 27 import android.media.tv.TvRecordingInfo; 28 import android.os.Bundle; 29 import android.view.Surface; 30 31 /** 32 * Sub-interface of ITvInteractiveAppService.aidl which is created per session and has its own 33 * context. 34 * @hide 35 */ 36 oneway interface ITvInteractiveAppSession { startInteractiveApp()37 void startInteractiveApp(); stopInteractiveApp()38 void stopInteractiveApp(); resetInteractiveApp()39 void resetInteractiveApp(); createBiInteractiveApp(in Uri biIAppUri, in Bundle params)40 void createBiInteractiveApp(in Uri biIAppUri, in Bundle params); destroyBiInteractiveApp(in String biIAppId)41 void destroyBiInteractiveApp(in String biIAppId); setTeletextAppEnabled(boolean enable)42 void setTeletextAppEnabled(boolean enable); sendCurrentVideoBounds(in Rect bounds)43 void sendCurrentVideoBounds(in Rect bounds); sendCurrentChannelUri(in Uri channelUri)44 void sendCurrentChannelUri(in Uri channelUri); sendCurrentChannelLcn(int lcn)45 void sendCurrentChannelLcn(int lcn); sendStreamVolume(float volume)46 void sendStreamVolume(float volume); sendTrackInfoList(in List<TvTrackInfo> tracks)47 void sendTrackInfoList(in List<TvTrackInfo> tracks); sendCurrentTvInputId(in String inputId)48 void sendCurrentTvInputId(in String inputId); sendTimeShiftMode(int mode)49 void sendTimeShiftMode(int mode); sendAvailableSpeeds(in float[] speeds)50 void sendAvailableSpeeds(in float[] speeds); sendSigningResult(in String signingId, in byte[] result)51 void sendSigningResult(in String signingId, in byte[] result); sendTvRecordingInfo(in TvRecordingInfo recordingInfo)52 void sendTvRecordingInfo(in TvRecordingInfo recordingInfo); sendTvRecordingInfoList(in List<TvRecordingInfo> recordingInfoList)53 void sendTvRecordingInfoList(in List<TvRecordingInfo> recordingInfoList); notifyError(in String errMsg, in Bundle params)54 void notifyError(in String errMsg, in Bundle params); notifyTimeShiftPlaybackParams(in PlaybackParams params)55 void notifyTimeShiftPlaybackParams(in PlaybackParams params); notifyTimeShiftStatusChanged(in String inputId, int status)56 void notifyTimeShiftStatusChanged(in String inputId, int status); notifyTimeShiftStartPositionChanged(in String inputId, long timeMs)57 void notifyTimeShiftStartPositionChanged(in String inputId, long timeMs); notifyTimeShiftCurrentPositionChanged(in String inputId, long timeMs)58 void notifyTimeShiftCurrentPositionChanged(in String inputId, long timeMs); notifyRecordingConnectionFailed(in String recordingId, in String inputId)59 void notifyRecordingConnectionFailed(in String recordingId, in String inputId); notifyRecordingDisconnected(in String recordingId, in String inputId)60 void notifyRecordingDisconnected(in String recordingId, in String inputId); notifyRecordingTuned(in String recordingId, in Uri channelUri)61 void notifyRecordingTuned(in String recordingId, in Uri channelUri); notifyRecordingError(in String recordingId, int err)62 void notifyRecordingError(in String recordingId, int err); notifyRecordingScheduled(in String recordingId, in String requestId)63 void notifyRecordingScheduled(in String recordingId, in String requestId); release()64 void release(); notifyTuned(in Uri channelUri)65 void notifyTuned(in Uri channelUri); notifyTrackSelected(int type, in String trackId)66 void notifyTrackSelected(int type, in String trackId); notifyTracksChanged(in List<TvTrackInfo> tracks)67 void notifyTracksChanged(in List<TvTrackInfo> tracks); notifyVideoAvailable()68 void notifyVideoAvailable(); notifyVideoUnavailable(int reason)69 void notifyVideoUnavailable(int reason); notifyContentAllowed()70 void notifyContentAllowed(); notifyContentBlocked(in String rating)71 void notifyContentBlocked(in String rating); notifySignalStrength(int strength)72 void notifySignalStrength(int strength); notifyRecordingStarted(in String recordingId, in String requestId)73 void notifyRecordingStarted(in String recordingId, in String requestId); notifyRecordingStopped(in String recordingId)74 void notifyRecordingStopped(in String recordingId); notifyTvMessage(int type, in Bundle data)75 void notifyTvMessage(int type, in Bundle data); setSurface(in Surface surface)76 void setSurface(in Surface surface); dispatchSurfaceChanged(int format, int width, int height)77 void dispatchSurfaceChanged(int format, int width, int height); notifyBroadcastInfoResponse(in BroadcastInfoResponse response)78 void notifyBroadcastInfoResponse(in BroadcastInfoResponse response); notifyAdResponse(in AdResponse response)79 void notifyAdResponse(in AdResponse response); notifyAdBufferConsumed(in AdBuffer buffer)80 void notifyAdBufferConsumed(in AdBuffer buffer); 81 createMediaView(in IBinder windowToken, in Rect frame)82 void createMediaView(in IBinder windowToken, in Rect frame); relayoutMediaView(in Rect frame)83 void relayoutMediaView(in Rect frame); removeMediaView()84 void removeMediaView(); 85 } 86