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 16 package android.media; 17 18 import android.graphics.Bitmap; 19 import android.media.IRemoteControlDisplay; 20 21 /** 22 * @hide 23 * Interface registered by AudioManager to notify a source of remote control information 24 * that information is requested to be displayed on the remote control (through 25 * IRemoteControlDisplay). 26 * {@see AudioManager#registerRemoteControlClient(RemoteControlClient)}. 27 */ 28 oneway interface IRemoteControlClient 29 { 30 /** 31 * Notifies a remote control client that information for the given generation ID is 32 * requested. If the flags contains 33 * {@link RemoteControlClient#FLAG_INFORMATION_REQUESTED_ALBUM_ART} then the width and height 34 * parameters are valid. 35 * @param generationId 36 * @param infoFlags 37 * FIXME: is infoFlags required? since the RCC pushes info, this might always be called 38 * with RC_INFO_ALL 39 */ onInformationRequested(int generationId, int infoFlags)40 void onInformationRequested(int generationId, int infoFlags); 41 42 /** 43 * Sets the generation counter of the current client that is displayed on the remote control. 44 */ setCurrentClientGenerationId(int clientGeneration)45 void setCurrentClientGenerationId(int clientGeneration); 46 plugRemoteControlDisplay(IRemoteControlDisplay rcd, int w, int h)47 void plugRemoteControlDisplay(IRemoteControlDisplay rcd, int w, int h); unplugRemoteControlDisplay(IRemoteControlDisplay rcd)48 void unplugRemoteControlDisplay(IRemoteControlDisplay rcd); setBitmapSizeForDisplay(IRemoteControlDisplay rcd, int w, int h)49 void setBitmapSizeForDisplay(IRemoteControlDisplay rcd, int w, int h); setWantsSyncForDisplay(IRemoteControlDisplay rcd, boolean wantsSync)50 void setWantsSyncForDisplay(IRemoteControlDisplay rcd, boolean wantsSync); seekTo(int clientGeneration, long timeMs)51 void seekTo(int clientGeneration, long timeMs); 52 }