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.net.Uri; 25 import android.os.Bundle; 26 import android.view.InputChannel; 27 28 /** 29 * Interface a client of the ITvInteractiveAppManager implements, to identify itself and receive 30 * information about changes to the state of each TV interactive application service. 31 * @hide 32 */ 33 oneway interface ITvInteractiveAppClient { onSessionCreated(in String iAppServiceId, IBinder token, in InputChannel channel, int seq)34 void onSessionCreated(in String iAppServiceId, IBinder token, in InputChannel channel, int seq); onSessionReleased(int seq)35 void onSessionReleased(int seq); onLayoutSurface(int left, int top, int right, int bottom, int seq)36 void onLayoutSurface(int left, int top, int right, int bottom, int seq); onBroadcastInfoRequest(in BroadcastInfoRequest request, int seq)37 void onBroadcastInfoRequest(in BroadcastInfoRequest request, int seq); onRemoveBroadcastInfo(int id, int seq)38 void onRemoveBroadcastInfo(int id, int seq); onSessionStateChanged(int state, int err, int seq)39 void onSessionStateChanged(int state, int err, int seq); onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId, int seq)40 void onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId, int seq); onTeletextAppStateChanged(int state, int seq)41 void onTeletextAppStateChanged(int state, int seq); onAdBufferReady(in AdBuffer buffer, int seq)42 void onAdBufferReady(in AdBuffer buffer, int seq); onCommandRequest(in String cmdType, in Bundle parameters, int seq)43 void onCommandRequest(in String cmdType, in Bundle parameters, int seq); onTimeShiftCommandRequest(in String cmdType, in Bundle parameters, int seq)44 void onTimeShiftCommandRequest(in String cmdType, in Bundle parameters, int seq); onSetVideoBounds(in Rect rect, int seq)45 void onSetVideoBounds(in Rect rect, int seq); onRequestCurrentVideoBounds(int seq)46 void onRequestCurrentVideoBounds(int seq); onRequestCurrentChannelUri(int seq)47 void onRequestCurrentChannelUri(int seq); onRequestCurrentChannelLcn(int seq)48 void onRequestCurrentChannelLcn(int seq); onRequestStreamVolume(int seq)49 void onRequestStreamVolume(int seq); onRequestTrackInfoList(int seq)50 void onRequestTrackInfoList(int seq); onRequestSelectedTrackInfo(int seq)51 void onRequestSelectedTrackInfo(int seq); onRequestCurrentTvInputId(int seq)52 void onRequestCurrentTvInputId(int seq); onRequestTimeShiftMode(int seq)53 void onRequestTimeShiftMode(int seq); onRequestAvailableSpeeds(int seq)54 void onRequestAvailableSpeeds(int seq); onRequestStartRecording(in String requestId, in Uri programUri, int seq)55 void onRequestStartRecording(in String requestId, in Uri programUri, int seq); onRequestStopRecording(in String recordingId, int seq)56 void onRequestStopRecording(in String recordingId, int seq); onRequestScheduleRecording(in String requestId, in String inputId, in Uri channelUri, in Uri programUri, in Bundle params, int seq)57 void onRequestScheduleRecording(in String requestId, in String inputId, in Uri channelUri, 58 in Uri programUri, in Bundle params, int seq); onRequestScheduleRecording2(in String requestId, in String inputId, in Uri channelUri, long start, long duration, int repeat, in Bundle params, int seq)59 void onRequestScheduleRecording2(in String requestId, in String inputId, in Uri channelUri, 60 long start, long duration, int repeat, in Bundle params, int seq); onSetTvRecordingInfo(in String recordingId, in TvRecordingInfo recordingInfo, int seq)61 void onSetTvRecordingInfo(in String recordingId, in TvRecordingInfo recordingInfo, int seq); onRequestTvRecordingInfo(in String recordingId, int seq)62 void onRequestTvRecordingInfo(in String recordingId, int seq); onRequestTvRecordingInfoList(in int type, int seq)63 void onRequestTvRecordingInfoList(in int type, int seq); onRequestSigning(in String id, in String algorithm, in String alias, in byte[] data, int seq)64 void onRequestSigning(in String id, in String algorithm, in String alias, in byte[] data, 65 int seq); onRequestSigning2(in String id, in String algorithm, in String host, int port, in byte[] data, int seq)66 void onRequestSigning2(in String id, in String algorithm, in String host, 67 int port, in byte[] data, int seq); onRequestCertificate(in String host, int port, int seq)68 void onRequestCertificate(in String host, int port, int seq); onAdRequest(in AdRequest request, int Seq)69 void onAdRequest(in AdRequest request, int Seq); 70 } 71