1/* Copyright (C) 2011 The Android Open Source Project 2 * 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16package android.media; 17 18import android.graphics.Bitmap; 19import android.media.IRemoteControlDisplay; 20import android.media.Rating; 21 22/** 23 * @hide 24 * Interface registered by AudioManager to notify a source of remote control information 25 * that information is requested to be displayed on the remote control (through 26 * IRemoteControlDisplay). 27 * {@see AudioManager#registerRemoteControlClient(RemoteControlClient)}. 28 */ 29oneway interface IRemoteControlClient 30{ 31 /** 32 * Notifies a remote control client that information for the given generation ID is 33 * requested. If the flags contains 34 * {@link RemoteControlClient#FLAG_INFORMATION_REQUESTED_ALBUM_ART} then the width and height 35 * parameters are valid. 36 * @param generationId 37 * @param infoFlags 38 * FIXME: is infoFlags required? since the RCC pushes info, this might always be called 39 * with RC_INFO_ALL 40 */ 41 void onInformationRequested(int generationId, int infoFlags); 42 43 /** 44 * Notifies a remote control client that information for the given generation ID is 45 * requested for the given IRemoteControlDisplay alone. 46 * @param rcd the display to which current info should be sent 47 */ 48 void informationRequestForDisplay(IRemoteControlDisplay rcd, int w, int h); 49 50 /** 51 * Sets the generation counter of the current client that is displayed on the remote control. 52 */ 53 void setCurrentClientGenerationId(int clientGeneration); 54 55 void plugRemoteControlDisplay(IRemoteControlDisplay rcd, int w, int h); 56 void unplugRemoteControlDisplay(IRemoteControlDisplay rcd); 57 void setBitmapSizeForDisplay(IRemoteControlDisplay rcd, int w, int h); 58 void setWantsSyncForDisplay(IRemoteControlDisplay rcd, boolean wantsSync); 59 void enableRemoteControlDisplay(IRemoteControlDisplay rcd, boolean enabled); 60 void seekTo(int clientGeneration, long timeMs); 61 void updateMetadata(int clientGeneration, int key, in Rating value); 62}