• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.media.tv.AdResponse;
20 import android.media.tv.AitInfo;
21 import android.media.tv.BroadcastInfoResponse;
22 import android.media.tv.ITvInputSession;
23 import android.net.Uri;
24 import android.media.tv.TvTrackInfo;
25 import android.os.Bundle;
26 
27 /**
28  * Helper interface for ITvInputSession to allow the TV input to notify the system service when a
29  * new session has been created.
30  * @hide
31  */
32 oneway interface ITvInputSessionCallback {
onSessionCreated(ITvInputSession session, in IBinder hardwareSessionToken)33     void onSessionCreated(ITvInputSession session, in IBinder hardwareSessionToken);
onSessionEvent(in String name, in Bundle args)34     void onSessionEvent(in String name, in Bundle args);
onChannelRetuned(in Uri channelUri)35     void onChannelRetuned(in Uri channelUri);
onTracksChanged(in List<TvTrackInfo> tracks)36     void onTracksChanged(in List<TvTrackInfo> tracks);
onTrackSelected(int type, in String trackId)37     void onTrackSelected(int type, in String trackId);
onVideoAvailable()38     void onVideoAvailable();
onVideoUnavailable(int reason)39     void onVideoUnavailable(int reason);
onContentAllowed()40     void onContentAllowed();
onContentBlocked(in String rating)41     void onContentBlocked(in String rating);
onLayoutSurface(int left, int top, int right, int bottom)42     void onLayoutSurface(int left, int top, int right, int bottom);
onTimeShiftStatusChanged(int status)43     void onTimeShiftStatusChanged(int status);
onTimeShiftStartPositionChanged(long timeMs)44     void onTimeShiftStartPositionChanged(long timeMs);
onTimeShiftCurrentPositionChanged(long timeMs)45     void onTimeShiftCurrentPositionChanged(long timeMs);
onAitInfoUpdated(in AitInfo aitInfo)46     void onAitInfoUpdated(in AitInfo aitInfo);
onSignalStrength(int strength)47     void onSignalStrength(int strength);
48 
49     // For the recording session
onTuned(in Uri channelUri)50     void onTuned(in Uri channelUri);
onRecordingStopped(in Uri recordedProgramUri)51     void onRecordingStopped(in Uri recordedProgramUri);
onError(int error)52     void onError(int error);
53 
54     // For broadcast info
onBroadcastInfoResponse(in BroadcastInfoResponse response)55     void onBroadcastInfoResponse(in BroadcastInfoResponse response);
56 
57     // For ad response
onAdResponse(in AdResponse response)58     void onAdResponse(in AdResponse response);
59 }
60