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.AudioPresentation;
21 import android.media.tv.AdBuffer;
22 import android.media.tv.AdResponse;
23 import android.media.tv.AitInfo;
24 import android.media.tv.BroadcastInfoResponse;
25 import android.media.tv.ITvInputSession;
26 import android.media.tv.TvTrackInfo;
27 import android.net.Uri;
28 import android.os.Bundle;
29 import android.view.InputChannel;
30 
31 /**
32  * Interface a client of the ITvInputManager implements, to identify itself and receive information
33  * about changes to the state of each TV input service.
34  * @hide
35  */
36 oneway interface ITvInputClient {
onSessionCreated(in String inputId, IBinder token, in InputChannel channel, int seq)37     void onSessionCreated(in String inputId, IBinder token, in InputChannel channel, int seq);
onSessionReleased(int seq)38     void onSessionReleased(int seq);
onSessionEvent(in String name, in Bundle args, int seq)39     void onSessionEvent(in String name, in Bundle args, int seq);
onChannelRetuned(in Uri channelUri, int seq)40     void onChannelRetuned(in Uri channelUri, int seq);
onAudioPresentationsChanged(in List<AudioPresentation> AudioPresentations, int seq)41     void onAudioPresentationsChanged(in List<AudioPresentation> AudioPresentations, int seq);
onAudioPresentationSelected(int presentationId, int programId, int seq)42     void onAudioPresentationSelected(int presentationId, int programId, int seq);
onTracksChanged(in List<TvTrackInfo> tracks, int seq)43     void onTracksChanged(in List<TvTrackInfo> tracks, int seq);
onTrackSelected(int type, in String trackId, int seq)44     void onTrackSelected(int type, in String trackId, int seq);
onVideoAvailable(int seq)45     void onVideoAvailable(int seq);
onVideoUnavailable(int reason, int seq)46     void onVideoUnavailable(int reason, int seq);
onContentAllowed(int seq)47     void onContentAllowed(int seq);
onContentBlocked(in String rating, int seq)48     void onContentBlocked(in String rating, int seq);
onLayoutSurface(int left, int top, int right, int bottom, int seq)49     void onLayoutSurface(int left, int top, int right, int bottom, int seq);
onTimeShiftStatusChanged(int status, int seq)50     void onTimeShiftStatusChanged(int status, int seq);
onTimeShiftStartPositionChanged(long timeMs, int seq)51     void onTimeShiftStartPositionChanged(long timeMs, int seq);
onTimeShiftCurrentPositionChanged(long timeMs, int seq)52     void onTimeShiftCurrentPositionChanged(long timeMs, int seq);
onAitInfoUpdated(in AitInfo aitInfo, int seq)53     void onAitInfoUpdated(in AitInfo aitInfo, int seq);
onSignalStrength(int stength, int seq)54     void onSignalStrength(int stength, int seq);
onCueingMessageAvailability(boolean available, int seq)55     void onCueingMessageAvailability(boolean available, int seq);
onTimeShiftMode(int mode, int seq)56     void onTimeShiftMode(int mode, int seq);
onAvailableSpeeds(in float[] speeds, int seq)57     void onAvailableSpeeds(in float[] speeds, int seq);
onTvMessage(int type, in Bundle data, int seq)58     void onTvMessage(int type, in Bundle data, int seq);
59 
onTuned(in Uri channelUri, int seq)60     void onTuned(in Uri channelUri, int seq);
61     // For the recording session
onRecordingStopped(in Uri recordedProgramUri, int seq)62     void onRecordingStopped(in Uri recordedProgramUri, int seq);
onError(int error, int seq)63     void onError(int error, int seq);
64 
65     // For broadcast info
onBroadcastInfoResponse(in BroadcastInfoResponse response, int seq)66     void onBroadcastInfoResponse(in BroadcastInfoResponse response, int seq);
67 
68     // For ad response
onAdResponse(in AdResponse response, int seq)69     void onAdResponse(in AdResponse response, int seq);
onAdBufferConsumed(in AdBuffer buffer, int seq)70     void onAdBufferConsumed(in AdBuffer buffer, int seq);
71 }
72