14426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi/* Copyright (C) 2011 The Android Open Source Project
24426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi *
34426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi * Licensed under the Apache License, Version 2.0 (the "License");
44426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi * you may not use this file except in compliance with the License.
54426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi * You may obtain a copy of the License at
64426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi *
74426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi *      http://www.apache.org/licenses/LICENSE-2.0
84426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi *
94426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi * Unless required by applicable law or agreed to in writing, software
104426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi * distributed under the License is distributed on an "AS IS" BASIS,
114426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
124426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi * See the License for the specific language governing permissions and
134426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi * limitations under the License.
144426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi */
154426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi
164426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivipackage android.media;
174426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi
184426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Triviimport android.graphics.Bitmap;
194426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Triviimport android.media.IRemoteControlDisplay;
2088183e67d4628e8c8a3310af0076b6f33f955cb2Jean-Michel Triviimport android.media.Rating;
214426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi
224426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi/**
234426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi * @hide
244426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi * Interface registered by AudioManager to notify a source of remote control information
254426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi * that information is requested to be displayed on the remote control (through
264426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi * IRemoteControlDisplay).
274426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi * {@see AudioManager#registerRemoteControlClient(RemoteControlClient)}.
284426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi */
294426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivioneway interface IRemoteControlClient
304426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi{
314426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi    /**
324426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi     * Notifies a remote control client that information for the given generation ID is
334426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi     * requested. If the flags contains
344426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi     * {@link RemoteControlClient#FLAG_INFORMATION_REQUESTED_ALBUM_ART} then the width and height
354426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi     *   parameters are valid.
364426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi     * @param generationId
374426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi     * @param infoFlags
384426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi     * FIXME: is infoFlags required? since the RCC pushes info, this might always be called
394426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi     *        with RC_INFO_ALL
404426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi     */
414a5700556191c835116ec2a6997a4f16f464ac9dJean-Michel Trivi    void onInformationRequested(int generationId, int infoFlags);
424426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi
434426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi    /**
4486142da1ce8c1341404a9f9e21be8acbcba69ab3Jean-Michel Trivi     * Notifies a remote control client that information for the given generation ID is
4586142da1ce8c1341404a9f9e21be8acbcba69ab3Jean-Michel Trivi     * requested for the given IRemoteControlDisplay alone.
4686142da1ce8c1341404a9f9e21be8acbcba69ab3Jean-Michel Trivi     * @param rcd the display to which current info should be sent
4786142da1ce8c1341404a9f9e21be8acbcba69ab3Jean-Michel Trivi     */
4886142da1ce8c1341404a9f9e21be8acbcba69ab3Jean-Michel Trivi    void informationRequestForDisplay(IRemoteControlDisplay rcd, int w, int h);
4986142da1ce8c1341404a9f9e21be8acbcba69ab3Jean-Michel Trivi
5086142da1ce8c1341404a9f9e21be8acbcba69ab3Jean-Michel Trivi    /**
514426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi     * Sets the generation counter of the current client that is displayed on the remote control.
524426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi     */
534426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi    void setCurrentClientGenerationId(int clientGeneration);
544426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi
554a5700556191c835116ec2a6997a4f16f464ac9dJean-Michel Trivi    void   plugRemoteControlDisplay(IRemoteControlDisplay rcd, int w, int h);
564426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi    void unplugRemoteControlDisplay(IRemoteControlDisplay rcd);
574a5700556191c835116ec2a6997a4f16f464ac9dJean-Michel Trivi    void setBitmapSizeForDisplay(IRemoteControlDisplay rcd, int w, int h);
58c3c4babf8424f65b3d3d2700f60fae6e94e9cd00Jean-Michel Trivi    void setWantsSyncForDisplay(IRemoteControlDisplay rcd, boolean wantsSync);
59f108cdd9ee5efe354d87edd02a07b323298c116cJean-Michel Trivi    void enableRemoteControlDisplay(IRemoteControlDisplay rcd, boolean enabled);
603261b537c5fdec824575a1f6ad6d8942715e82e2Jean-Michel Trivi    void seekTo(int clientGeneration, long timeMs);
6188183e67d4628e8c8a3310af0076b6f33f955cb2Jean-Michel Trivi    void updateMetadata(int clientGeneration, int key, in Rating value);
624426e42ac6107bf6b09f7c4cdad39eb161d8b9caJean-Michel Trivi}