• 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.ITvInputSession;
20 import android.net.Uri;
21 import android.media.tv.TvTrackInfo;
22 import android.os.Bundle;
23 
24 /**
25  * Helper interface for ITvInputSession to allow the TV input to notify the system service when a
26  * new session has been created.
27  * @hide
28  */
29 oneway interface ITvInputSessionCallback {
onSessionCreated(ITvInputSession session, in IBinder hardwareSessionToken)30     void onSessionCreated(ITvInputSession session, in IBinder hardwareSessionToken);
onSessionEvent(in String name, in Bundle args)31     void onSessionEvent(in String name, in Bundle args);
onChannelRetuned(in Uri channelUri)32     void onChannelRetuned(in Uri channelUri);
onTracksChanged(in List<TvTrackInfo> tracks)33     void onTracksChanged(in List<TvTrackInfo> tracks);
onTrackSelected(int type, in String trackId)34     void onTrackSelected(int type, in String trackId);
onVideoAvailable()35     void onVideoAvailable();
onVideoUnavailable(int reason)36     void onVideoUnavailable(int reason);
onContentAllowed()37     void onContentAllowed();
onContentBlocked(in String rating)38     void onContentBlocked(in String rating);
onLayoutSurface(int left, int top, int right, int bottom)39     void onLayoutSurface(int left, int top, int right, int bottom);
onTimeShiftStatusChanged(int status)40     void onTimeShiftStatusChanged(int status);
onTimeShiftStartPositionChanged(long timeMs)41     void onTimeShiftStartPositionChanged(long timeMs);
onTimeShiftCurrentPositionChanged(long timeMs)42     void onTimeShiftCurrentPositionChanged(long timeMs);
43 
44     // For the recording session
onTuned(in Uri channelUri)45     void onTuned(in Uri channelUri);
onRecordingStopped(in Uri recordedProgramUri)46     void onRecordingStopped(in Uri recordedProgramUri);
onError(int error)47     void onError(int error);
48 }
49