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); sendCertificate(in String host, int port, in Bundle certBundle)52 void sendCertificate(in String host, int port, in Bundle certBundle); sendTvRecordingInfo(in TvRecordingInfo recordingInfo)53 void sendTvRecordingInfo(in TvRecordingInfo recordingInfo); sendTvRecordingInfoList(in List<TvRecordingInfo> recordingInfoList)54 void sendTvRecordingInfoList(in List<TvRecordingInfo> recordingInfoList); notifyError(in String errMsg, in Bundle params)55 void notifyError(in String errMsg, in Bundle params); notifyTimeShiftPlaybackParams(in PlaybackParams params)56 void notifyTimeShiftPlaybackParams(in PlaybackParams params); notifyTimeShiftStatusChanged(in String inputId, int status)57 void notifyTimeShiftStatusChanged(in String inputId, int status); notifyTimeShiftStartPositionChanged(in String inputId, long timeMs)58 void notifyTimeShiftStartPositionChanged(in String inputId, long timeMs); notifyTimeShiftCurrentPositionChanged(in String inputId, long timeMs)59 void notifyTimeShiftCurrentPositionChanged(in String inputId, long timeMs); notifyRecordingConnectionFailed(in String recordingId, in String inputId)60 void notifyRecordingConnectionFailed(in String recordingId, in String inputId); notifyRecordingDisconnected(in String recordingId, in String inputId)61 void notifyRecordingDisconnected(in String recordingId, in String inputId); notifyRecordingTuned(in String recordingId, in Uri channelUri)62 void notifyRecordingTuned(in String recordingId, in Uri channelUri); notifyRecordingError(in String recordingId, int err)63 void notifyRecordingError(in String recordingId, int err); notifyRecordingScheduled(in String recordingId, in String requestId)64 void notifyRecordingScheduled(in String recordingId, in String requestId); release()65 void release(); notifyTuned(in Uri channelUri)66 void notifyTuned(in Uri channelUri); notifyTrackSelected(int type, in String trackId)67 void notifyTrackSelected(int type, in String trackId); notifyTracksChanged(in List<TvTrackInfo> tracks)68 void notifyTracksChanged(in List<TvTrackInfo> tracks); notifyVideoAvailable()69 void notifyVideoAvailable(); notifyVideoUnavailable(int reason)70 void notifyVideoUnavailable(int reason); notifyVideoFreezeUpdated(boolean isFrozen)71 void notifyVideoFreezeUpdated(boolean isFrozen); notifyContentAllowed()72 void notifyContentAllowed(); notifyContentBlocked(in String rating)73 void notifyContentBlocked(in String rating); notifySignalStrength(int strength)74 void notifySignalStrength(int strength); notifyRecordingStarted(in String recordingId, in String requestId)75 void notifyRecordingStarted(in String recordingId, in String requestId); notifyRecordingStopped(in String recordingId)76 void notifyRecordingStopped(in String recordingId); notifyTvMessage(int type, in Bundle data)77 void notifyTvMessage(int type, in Bundle data); setSurface(in Surface surface)78 void setSurface(in Surface surface); dispatchSurfaceChanged(int format, int width, int height)79 void dispatchSurfaceChanged(int format, int width, int height); notifyBroadcastInfoResponse(in BroadcastInfoResponse response)80 void notifyBroadcastInfoResponse(in BroadcastInfoResponse response); notifyAdResponse(in AdResponse response)81 void notifyAdResponse(in AdResponse response); notifyAdBufferConsumed(in AdBuffer buffer)82 void notifyAdBufferConsumed(in AdBuffer buffer); sendSelectedTrackInfo(in List<TvTrackInfo> tracks)83 void sendSelectedTrackInfo(in List<TvTrackInfo> tracks); 84 createMediaView(in IBinder windowToken, in Rect frame)85 void createMediaView(in IBinder windowToken, in Rect frame); relayoutMediaView(in Rect frame)86 void relayoutMediaView(in Rect frame); removeMediaView()87 void removeMediaView(); 88 } 89