ITvInputManager.aidl revision e821d711db1799dc51661a3ed6188f3cd942bae7
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 17package android.media.tv; 18 19import android.content.ComponentName; 20import android.graphics.Rect; 21import android.media.tv.ITvInputClient; 22import android.media.tv.ITvInputHardware; 23import android.media.tv.ITvInputHardwareCallback; 24import android.media.tv.ITvInputManagerCallback; 25import android.media.tv.TvInputHardwareInfo; 26import android.media.tv.TvInputInfo; 27import android.media.tv.TvTrackInfo; 28import android.net.Uri; 29import android.view.Surface; 30 31/** 32 * Interface to the TV input manager service. 33 * @hide 34 */ 35interface ITvInputManager { 36 List<TvInputInfo> getTvInputList(int userId); 37 38 void registerCallback(in ITvInputManagerCallback callback, int userId); 39 void unregisterCallback(in ITvInputManagerCallback callback, int userId); 40 41 void createSession(in ITvInputClient client, in String inputId, int seq, int userId); 42 void releaseSession(in IBinder sessionToken, int userId); 43 44 void setSurface(in IBinder sessionToken, in Surface surface, int userId); 45 void dispatchSurfaceChanged(in IBinder sessionToken, int format, int width, int height, 46 int userId); 47 void setVolume(in IBinder sessionToken, float volume, int userId); 48 void tune(in IBinder sessionToken, in Uri channelUri, int userId); 49 void setCaptionEnabled(in IBinder sessionToken, boolean enabled, int userId); 50 void selectTrack(in IBinder sessionToken, in TvTrackInfo track, int userId); 51 void unselectTrack(in IBinder sessionToken, in TvTrackInfo track, int userId); 52 53 void createOverlayView(in IBinder sessionToken, in IBinder windowToken, in Rect frame, 54 int userId); 55 void relayoutOverlayView(in IBinder sessionToken, in Rect frame, int userId); 56 void removeOverlayView(in IBinder sessionToken, int userId); 57 58 // For TV input hardware binding 59 List<TvInputHardwareInfo> getHardwareList(); 60 /* 61 * All TvInputServices which want to use hardware must call this method on 62 * BOOT_COMPLETE. 63 */ 64 void registerTvInputInfo(in TvInputInfo info, int deviceId); 65 ITvInputHardware acquireTvInputHardware(int deviceId, in ITvInputHardwareCallback callback, 66 in TvInputInfo info, int userId); 67 void releaseTvInputHardware(int deviceId, in ITvInputHardware hardware, int userId); 68} 69