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;
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 */
28oneway 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     * @param artWidth if > 0, artHeight must be > 0 too.
38     * @param artHeight
39     * FIXME: is infoFlags required? since the RCC pushes info, this might always be called
40     *        with RC_INFO_ALL
41     */
42    void onInformationRequested(int generationId, int infoFlags, int artWidth, int artHeight);
43
44    /**
45     * Sets the generation counter of the current client that is displayed on the remote control.
46     */
47    void setCurrentClientGenerationId(int clientGeneration);
48
49    void   plugRemoteControlDisplay(IRemoteControlDisplay rcd);
50    void unplugRemoteControlDisplay(IRemoteControlDisplay rcd);
51}