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.AdResponse; 21 import android.media.tv.BroadcastInfoResponse; 22 import android.media.tv.TvTrackInfo; 23 import android.media.tv.interactive.AppLinkInfo; 24 import android.media.tv.interactive.ITvInteractiveAppClient; 25 import android.media.tv.interactive.ITvInteractiveAppManagerCallback; 26 import android.media.tv.interactive.TvInteractiveAppServiceInfo; 27 import android.net.Uri; 28 import android.os.Bundle; 29 import android.view.Surface; 30 31 /** 32 * Interface to the TV interactive app service. 33 * @hide 34 */ 35 interface ITvInteractiveAppManager { getTvInteractiveAppServiceList(int userId)36 List<TvInteractiveAppServiceInfo> getTvInteractiveAppServiceList(int userId); registerAppLinkInfo(String tiasId, in AppLinkInfo info, int userId)37 void registerAppLinkInfo(String tiasId, in AppLinkInfo info, int userId); unregisterAppLinkInfo(String tiasId, in AppLinkInfo info, int userId)38 void unregisterAppLinkInfo(String tiasId, in AppLinkInfo info, int userId); sendAppLinkCommand(String tiasId, in Bundle command, int userId)39 void sendAppLinkCommand(String tiasId, in Bundle command, int userId); startInteractiveApp(in IBinder sessionToken, int userId)40 void startInteractiveApp(in IBinder sessionToken, int userId); stopInteractiveApp(in IBinder sessionToken, int userId)41 void stopInteractiveApp(in IBinder sessionToken, int userId); resetInteractiveApp(in IBinder sessionToken, int userId)42 void resetInteractiveApp(in IBinder sessionToken, int userId); createBiInteractiveApp( in IBinder sessionToken, in Uri biIAppUri, in Bundle params, int userId)43 void createBiInteractiveApp( 44 in IBinder sessionToken, in Uri biIAppUri, in Bundle params, int userId); destroyBiInteractiveApp(in IBinder sessionToken, in String biIAppId, int userId)45 void destroyBiInteractiveApp(in IBinder sessionToken, in String biIAppId, int userId); setTeletextAppEnabled(in IBinder sessionToken, boolean enable, int userId)46 void setTeletextAppEnabled(in IBinder sessionToken, boolean enable, int userId); sendCurrentChannelUri(in IBinder sessionToken, in Uri channelUri, int userId)47 void sendCurrentChannelUri(in IBinder sessionToken, in Uri channelUri, int userId); sendCurrentChannelLcn(in IBinder sessionToken, int lcn, int userId)48 void sendCurrentChannelLcn(in IBinder sessionToken, int lcn, int userId); sendStreamVolume(in IBinder sessionToken, float volume, int userId)49 void sendStreamVolume(in IBinder sessionToken, float volume, int userId); sendTrackInfoList(in IBinder sessionToken, in List<TvTrackInfo> tracks, int userId)50 void sendTrackInfoList(in IBinder sessionToken, in List<TvTrackInfo> tracks, int userId); sendCurrentTvInputId(in IBinder sessionToken, in String inputId, int userId)51 void sendCurrentTvInputId(in IBinder sessionToken, in String inputId, int userId); sendSigningResult(in IBinder sessionToken, in String signingId, in byte[] result, int userId)52 void sendSigningResult(in IBinder sessionToken, in String signingId, in byte[] result, 53 int userId); notifyError(in IBinder sessionToken, in String errMsg, in Bundle params, int userId)54 void notifyError(in IBinder sessionToken, in String errMsg, in Bundle params, int userId); createSession(in ITvInteractiveAppClient client, in String iAppServiceId, int type, int seq, int userId)55 void createSession(in ITvInteractiveAppClient client, in String iAppServiceId, int type, 56 int seq, int userId); releaseSession(in IBinder sessionToken, int userId)57 void releaseSession(in IBinder sessionToken, int userId); notifyTuned(in IBinder sessionToken, in Uri channelUri, int userId)58 void notifyTuned(in IBinder sessionToken, in Uri channelUri, int userId); notifyTrackSelected(in IBinder sessionToken, int type, in String trackId, int userId)59 void notifyTrackSelected(in IBinder sessionToken, int type, in String trackId, int userId); notifyTracksChanged(in IBinder sessionToken, in List<TvTrackInfo> tracks, int userId)60 void notifyTracksChanged(in IBinder sessionToken, in List<TvTrackInfo> tracks, int userId); notifyVideoAvailable(in IBinder sessionToken, int userId)61 void notifyVideoAvailable(in IBinder sessionToken, int userId); notifyVideoUnavailable(in IBinder sessionToken, int reason, int userId)62 void notifyVideoUnavailable(in IBinder sessionToken, int reason, int userId); notifyContentAllowed(in IBinder sessionToken, int userId)63 void notifyContentAllowed(in IBinder sessionToken, int userId); notifyContentBlocked(in IBinder sessionToken, in String rating, int userId)64 void notifyContentBlocked(in IBinder sessionToken, in String rating, int userId); notifySignalStrength(in IBinder sessionToken, int stength, int userId)65 void notifySignalStrength(in IBinder sessionToken, int stength, int userId); setSurface(in IBinder sessionToken, in Surface surface, int userId)66 void setSurface(in IBinder sessionToken, in Surface surface, int userId); dispatchSurfaceChanged(in IBinder sessionToken, int format, int width, int height, int userId)67 void dispatchSurfaceChanged(in IBinder sessionToken, int format, int width, int height, 68 int userId); notifyBroadcastInfoResponse(in IBinder sessionToken, in BroadcastInfoResponse response, int UserId)69 void notifyBroadcastInfoResponse(in IBinder sessionToken, in BroadcastInfoResponse response, 70 int UserId); notifyAdResponse(in IBinder sessionToken, in AdResponse response, int UserId)71 void notifyAdResponse(in IBinder sessionToken, in AdResponse response, int UserId); 72 createMediaView(in IBinder sessionToken, in IBinder windowToken, in Rect frame, int userId)73 void createMediaView(in IBinder sessionToken, in IBinder windowToken, in Rect frame, 74 int userId); relayoutMediaView(in IBinder sessionToken, in Rect frame, int userId)75 void relayoutMediaView(in IBinder sessionToken, in Rect frame, int userId); removeMediaView(in IBinder sessionToken, int userId)76 void removeMediaView(in IBinder sessionToken, int userId); 77 registerCallback(in ITvInteractiveAppManagerCallback callback, int userId)78 void registerCallback(in ITvInteractiveAppManagerCallback callback, int userId); unregisterCallback(in ITvInteractiveAppManagerCallback callback, int userId)79 void unregisterCallback(in ITvInteractiveAppManagerCallback callback, int userId); 80 } 81