ITvInputManager.aidl revision 4f9f57cede3de2e2aa3045e04b485b176ab22dbd
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.os.Bundle; 30import android.view.Surface; 31 32/** 33 * Interface to the TV input manager service. 34 * @hide 35 */ 36interface ITvInputManager { 37 List<TvInputInfo> getTvInputList(int userId); 38 TvInputInfo getTvInputInfo(in String inputId, int userId); 39 40 void registerCallback(in ITvInputManagerCallback callback, int userId); 41 void unregisterCallback(in ITvInputManagerCallback callback, int userId); 42 43 void createSession(in ITvInputClient client, in String inputId, int seq, int userId); 44 void releaseSession(in IBinder sessionToken, int userId); 45 46 void setSurface(in IBinder sessionToken, in Surface surface, int userId); 47 void dispatchSurfaceChanged(in IBinder sessionToken, int format, int width, int height, 48 int userId); 49 void setVolume(in IBinder sessionToken, float volume, int userId); 50 void tune(in IBinder sessionToken, in Uri channelUri, int userId); 51 void setCaptionEnabled(in IBinder sessionToken, boolean enabled, int userId); 52 void selectTrack(in IBinder sessionToken, in TvTrackInfo track, int userId); 53 void unselectTrack(in IBinder sessionToken, in TvTrackInfo track, int userId); 54 55 void sendAppPrivateCommand(in IBinder sessionToken, in String action, in Bundle data, 56 int userId); 57 58 void createOverlayView(in IBinder sessionToken, in IBinder windowToken, in Rect frame, 59 int userId); 60 void relayoutOverlayView(in IBinder sessionToken, in Rect frame, int userId); 61 void removeOverlayView(in IBinder sessionToken, int userId); 62 63 void requestUnblockContent(in IBinder sessionToken, in String unblockedRating, int userId); 64 65 // For TV input hardware binding 66 List<TvInputHardwareInfo> getHardwareList(); 67 ITvInputHardware acquireTvInputHardware(int deviceId, in ITvInputHardwareCallback callback, 68 in TvInputInfo info, int userId); 69 void releaseTvInputHardware(int deviceId, in ITvInputHardware hardware, int userId); 70} 71