1 /* 2 * Copyright (C) 2014 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; 18 19 import android.content.ComponentName; 20 import android.media.tv.AdResponse; 21 import android.media.tv.AitInfo; 22 import android.media.tv.BroadcastInfoResponse; 23 import android.media.tv.ITvInputSession; 24 import android.media.tv.TvTrackInfo; 25 import android.net.Uri; 26 import android.os.Bundle; 27 import android.view.InputChannel; 28 29 /** 30 * Interface a client of the ITvInputManager implements, to identify itself and receive information 31 * about changes to the state of each TV input service. 32 * @hide 33 */ 34 oneway interface ITvInputClient { onSessionCreated(in String inputId, IBinder token, in InputChannel channel, int seq)35 void onSessionCreated(in String inputId, IBinder token, in InputChannel channel, int seq); onSessionReleased(int seq)36 void onSessionReleased(int seq); onSessionEvent(in String name, in Bundle args, int seq)37 void onSessionEvent(in String name, in Bundle args, int seq); onChannelRetuned(in Uri channelUri, int seq)38 void onChannelRetuned(in Uri channelUri, int seq); onTracksChanged(in List<TvTrackInfo> tracks, int seq)39 void onTracksChanged(in List<TvTrackInfo> tracks, int seq); onTrackSelected(int type, in String trackId, int seq)40 void onTrackSelected(int type, in String trackId, int seq); onVideoAvailable(int seq)41 void onVideoAvailable(int seq); onVideoUnavailable(int reason, int seq)42 void onVideoUnavailable(int reason, int seq); onContentAllowed(int seq)43 void onContentAllowed(int seq); onContentBlocked(in String rating, int seq)44 void onContentBlocked(in String rating, int seq); onLayoutSurface(int left, int top, int right, int bottom, int seq)45 void onLayoutSurface(int left, int top, int right, int bottom, int seq); onTimeShiftStatusChanged(int status, int seq)46 void onTimeShiftStatusChanged(int status, int seq); onTimeShiftStartPositionChanged(long timeMs, int seq)47 void onTimeShiftStartPositionChanged(long timeMs, int seq); onTimeShiftCurrentPositionChanged(long timeMs, int seq)48 void onTimeShiftCurrentPositionChanged(long timeMs, int seq); onAitInfoUpdated(in AitInfo aitInfo, int seq)49 void onAitInfoUpdated(in AitInfo aitInfo, int seq); onSignalStrength(int stength, int seq)50 void onSignalStrength(int stength, int seq); 51 onTuned(in Uri channelUri, int seq)52 void onTuned(in Uri channelUri, int seq); 53 // For the recording session onRecordingStopped(in Uri recordedProgramUri, int seq)54 void onRecordingStopped(in Uri recordedProgramUri, int seq); onError(int error, int seq)55 void onError(int error, int seq); 56 57 // For broadcast info onBroadcastInfoResponse(in BroadcastInfoResponse response, int seq)58 void onBroadcastInfoResponse(in BroadcastInfoResponse response, int seq); 59 60 // For ad response onAdResponse(in AdResponse response, int seq)61 void onAdResponse(in AdResponse response, int seq); 62 } 63