Home | History | Annotate | Download | only in tv
      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.ITvInputSession;
     21 import android.net.Uri;
     22 import android.media.tv.TvTrackInfo;
     23 import android.os.Bundle;
     24 import android.view.InputChannel;
     25 
     26 /**
     27  * Interface a client of the ITvInputManager implements, to identify itself and receive information
     28  * about changes to the state of each TV input service.
     29  * @hide
     30  */
     31 oneway interface ITvInputClient {
     32     void onSessionCreated(in String inputId, IBinder token, in InputChannel channel, int seq);
     33     void onSessionReleased(int seq);
     34     void onSessionEvent(in String name, in Bundle args, int seq);
     35     void onChannelRetuned(in Uri channelUri, int seq);
     36     void onTracksChanged(in List<TvTrackInfo> tracks, int seq);
     37     void onTrackSelected(int type, in String trackId, int seq);
     38     void onVideoAvailable(int seq);
     39     void onVideoUnavailable(int reason, int seq);
     40     void onContentAllowed(int seq);
     41     void onContentBlocked(in String rating, int seq);
     42     void onLayoutSurface(int left, int top, int right, int bottom, int seq);
     43     void onTimeShiftStatusChanged(int status, int seq);
     44     void onTimeShiftStartPositionChanged(long timeMs, int seq);
     45     void onTimeShiftCurrentPositionChanged(long timeMs, int seq);
     46 
     47     // For the recording session
     48     void onTuned(int seq, in Uri channelUri);
     49     void onRecordingStopped(in Uri recordedProgramUri, int seq);
     50     void onError(int error, int seq);
     51 }
     52