• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.AdResponse;
22 import android.media.tv.BroadcastInfoResponse;
23 import android.media.tv.TvTrackInfo;
24 import android.media.tv.TvRecordingInfo;
25 import android.media.tv.interactive.AppLinkInfo;
26 import android.media.tv.interactive.ITvInteractiveAppClient;
27 import android.media.tv.interactive.ITvInteractiveAppManagerCallback;
28 import android.media.tv.interactive.TvInteractiveAppServiceInfo;
29 import android.media.PlaybackParams;
30 import android.net.Uri;
31 import android.os.Bundle;
32 import android.view.Surface;
33 
34 /**
35  * Interface to the TV interactive app service.
36  * @hide
37  */
38 interface ITvInteractiveAppManager {
getTvInteractiveAppServiceList(int userId)39     List<TvInteractiveAppServiceInfo> getTvInteractiveAppServiceList(int userId);
getAppLinkInfoList(int userId)40     List<AppLinkInfo> getAppLinkInfoList(int userId);
registerAppLinkInfo(String tiasId, in AppLinkInfo info, int userId)41     void registerAppLinkInfo(String tiasId, in AppLinkInfo info, int userId);
unregisterAppLinkInfo(String tiasId, in AppLinkInfo info, int userId)42     void unregisterAppLinkInfo(String tiasId, in AppLinkInfo info, int userId);
sendAppLinkCommand(String tiasId, in Bundle command, int userId)43     void sendAppLinkCommand(String tiasId, in Bundle command, int userId);
startInteractiveApp(in IBinder sessionToken, int userId)44     void startInteractiveApp(in IBinder sessionToken, int userId);
stopInteractiveApp(in IBinder sessionToken, int userId)45     void stopInteractiveApp(in IBinder sessionToken, int userId);
resetInteractiveApp(in IBinder sessionToken, int userId)46     void resetInteractiveApp(in IBinder sessionToken, int userId);
createBiInteractiveApp( in IBinder sessionToken, in Uri biIAppUri, in Bundle params, int userId)47     void createBiInteractiveApp(
48             in IBinder sessionToken, in Uri biIAppUri, in Bundle params, int userId);
destroyBiInteractiveApp(in IBinder sessionToken, in String biIAppId, int userId)49     void destroyBiInteractiveApp(in IBinder sessionToken, in String biIAppId, int userId);
setTeletextAppEnabled(in IBinder sessionToken, boolean enable, int userId)50     void setTeletextAppEnabled(in IBinder sessionToken, boolean enable, int userId);
sendCurrentVideoBounds(in IBinder sessionToken, in Rect bounds, int userId)51     void sendCurrentVideoBounds(in IBinder sessionToken, in Rect bounds, int userId);
sendCurrentChannelUri(in IBinder sessionToken, in Uri channelUri, int userId)52     void sendCurrentChannelUri(in IBinder sessionToken, in Uri channelUri, int userId);
sendCurrentChannelLcn(in IBinder sessionToken, int lcn, int userId)53     void sendCurrentChannelLcn(in IBinder sessionToken, int lcn, int userId);
sendStreamVolume(in IBinder sessionToken, float volume, int userId)54     void sendStreamVolume(in IBinder sessionToken, float volume, int userId);
sendTrackInfoList(in IBinder sessionToken, in List<TvTrackInfo> tracks, int userId)55     void sendTrackInfoList(in IBinder sessionToken, in List<TvTrackInfo> tracks, int userId);
sendCurrentTvInputId(in IBinder sessionToken, in String inputId, int userId)56     void sendCurrentTvInputId(in IBinder sessionToken, in String inputId, int userId);
sendTimeShiftMode(in IBinder sessionToken, int mode, int userId)57     void sendTimeShiftMode(in IBinder sessionToken, int mode, int userId);
sendAvailableSpeeds(in IBinder sessionToken, in float[] speeds, int userId)58     void sendAvailableSpeeds(in IBinder sessionToken, in float[] speeds, int userId);
sendSigningResult(in IBinder sessionToken, in String signingId, in byte[] result, int userId)59     void sendSigningResult(in IBinder sessionToken, in String signingId, in byte[] result,
60             int userId);
sendCertificate(in IBinder sessionToken, in String host, int port, in Bundle certBundle, int userId)61     void sendCertificate(in IBinder sessionToken, in String host, int port,
62             in Bundle certBundle, int userId);
sendTvRecordingInfo(in IBinder sessionToken, in TvRecordingInfo recordingInfo, int userId)63     void sendTvRecordingInfo(in IBinder sessionToken, in TvRecordingInfo recordingInfo, int userId);
sendTvRecordingInfoList(in IBinder sessionToken, in List<TvRecordingInfo> recordingInfoList, int userId)64     void sendTvRecordingInfoList(in IBinder sessionToken,
65             in List<TvRecordingInfo> recordingInfoList, int userId);
notifyError(in IBinder sessionToken, in String errMsg, in Bundle params, int userId)66     void notifyError(in IBinder sessionToken, in String errMsg, in Bundle params, int userId);
notifyTimeShiftPlaybackParams( in IBinder sessionToken, in PlaybackParams params, int userId)67     void notifyTimeShiftPlaybackParams(
68             in IBinder sessionToken, in PlaybackParams params, int userId);
notifyTimeShiftStatusChanged( in IBinder sessionToken, in String inputId, int status, int userId)69     void notifyTimeShiftStatusChanged(
70             in IBinder sessionToken, in String inputId, int status, int userId);
notifyTimeShiftStartPositionChanged( in IBinder sessionToken, in String inputId, long timeMs, int userId)71     void notifyTimeShiftStartPositionChanged(
72             in IBinder sessionToken, in String inputId, long timeMs, int userId);
notifyTimeShiftCurrentPositionChanged( in IBinder sessionToken, in String inputId, long timeMs, int userId)73     void notifyTimeShiftCurrentPositionChanged(
74             in IBinder sessionToken, in String inputId, long timeMs, int userId);
notifyRecordingConnectionFailed( in IBinder sessionToken, in String recordingId, in String inputId, int userId)75     void notifyRecordingConnectionFailed(
76             in IBinder sessionToken, in String recordingId, in String inputId, int userId);
notifyRecordingDisconnected( in IBinder sessionToken, in String recordingId, in String inputId, int userId)77     void notifyRecordingDisconnected(
78             in IBinder sessionToken, in String recordingId, in String inputId, int userId);
notifyRecordingTuned( in IBinder sessionToken, in String recordingId, in Uri channelUri, int userId)79     void notifyRecordingTuned(
80             in IBinder sessionToken, in String recordingId, in Uri channelUri, int userId);
notifyRecordingError( in IBinder sessionToken, in String recordingId, int err, int userId)81     void notifyRecordingError(
82             in IBinder sessionToken, in String recordingId, int err, int userId);
notifyRecordingScheduled( in IBinder sessionToken, in String recordingId, in String requestId, int userId)83     void notifyRecordingScheduled(
84             in IBinder sessionToken, in String recordingId, in String requestId, int userId);
createSession(in ITvInteractiveAppClient client, in String iAppServiceId, int type, int seq, int userId)85     void createSession(in ITvInteractiveAppClient client, in String iAppServiceId, int type,
86             int seq, int userId);
releaseSession(in IBinder sessionToken, int userId)87     void releaseSession(in IBinder sessionToken, int userId);
notifyTuned(in IBinder sessionToken, in Uri channelUri, int userId)88     void notifyTuned(in IBinder sessionToken, in Uri channelUri, int userId);
notifyTrackSelected(in IBinder sessionToken, int type, in String trackId, int userId)89     void notifyTrackSelected(in IBinder sessionToken, int type, in String trackId, int userId);
notifyTracksChanged(in IBinder sessionToken, in List<TvTrackInfo> tracks, int userId)90     void notifyTracksChanged(in IBinder sessionToken, in List<TvTrackInfo> tracks, int userId);
notifyVideoAvailable(in IBinder sessionToken, int userId)91     void notifyVideoAvailable(in IBinder sessionToken, int userId);
notifyVideoUnavailable(in IBinder sessionToken, int reason, int userId)92     void notifyVideoUnavailable(in IBinder sessionToken, int reason, int userId);
notifyVideoFreezeUpdated(in IBinder sessionToken, boolean isFrozen, int userId)93     void notifyVideoFreezeUpdated(in IBinder sessionToken, boolean isFrozen, int userId);
notifyContentAllowed(in IBinder sessionToken, int userId)94     void notifyContentAllowed(in IBinder sessionToken, int userId);
notifyContentBlocked(in IBinder sessionToken, in String rating, int userId)95     void notifyContentBlocked(in IBinder sessionToken, in String rating, int userId);
notifySignalStrength(in IBinder sessionToken, int stength, int userId)96     void notifySignalStrength(in IBinder sessionToken, int stength, int userId);
notifyRecordingStarted(in IBinder sessionToken, in String recordingId, String requestId, int userId)97     void notifyRecordingStarted(in IBinder sessionToken, in String recordingId, String requestId,
98             int userId);
notifyRecordingStopped(in IBinder sessionToken, in String recordingId, int userId)99     void notifyRecordingStopped(in IBinder sessionToken, in String recordingId, int userId);
notifyTvMessage(in IBinder sessionToken, in int type, in Bundle data, int userId)100     void notifyTvMessage(in IBinder sessionToken, in int type, in Bundle data, int userId);
setSurface(in IBinder sessionToken, in Surface surface, int userId)101     void setSurface(in IBinder sessionToken, in Surface surface, int userId);
dispatchSurfaceChanged(in IBinder sessionToken, int format, int width, int height, int userId)102     void dispatchSurfaceChanged(in IBinder sessionToken, int format, int width, int height,
103             int userId);
notifyBroadcastInfoResponse(in IBinder sessionToken, in BroadcastInfoResponse response, int UserId)104     void notifyBroadcastInfoResponse(in IBinder sessionToken, in BroadcastInfoResponse response,
105             int UserId);
notifyAdResponse(in IBinder sessionToken, in AdResponse response, int UserId)106     void notifyAdResponse(in IBinder sessionToken, in AdResponse response, int UserId);
notifyAdBufferConsumed(in IBinder sessionToken, in AdBuffer buffer, int userId)107     void notifyAdBufferConsumed(in IBinder sessionToken, in AdBuffer buffer, int userId);
sendSelectedTrackInfo(in IBinder sessionToken, in List<TvTrackInfo> tracks, int userId)108     void sendSelectedTrackInfo(in IBinder sessionToken, in List<TvTrackInfo> tracks,
109             int userId);
110 
createMediaView(in IBinder sessionToken, in IBinder windowToken, in Rect frame, int userId)111     void createMediaView(in IBinder sessionToken, in IBinder windowToken, in Rect frame,
112             int userId);
relayoutMediaView(in IBinder sessionToken, in Rect frame, int userId)113     void relayoutMediaView(in IBinder sessionToken, in Rect frame, int userId);
removeMediaView(in IBinder sessionToken, int userId)114     void removeMediaView(in IBinder sessionToken, int userId);
115 
registerCallback(in ITvInteractiveAppManagerCallback callback, int userId)116     void registerCallback(in ITvInteractiveAppManagerCallback callback, int userId);
unregisterCallback(in ITvInteractiveAppManagerCallback callback, int userId)117     void unregisterCallback(in ITvInteractiveAppManagerCallback callback, int userId);
118 }
119