blob: bd0019f0f1d8480c6fbb4b3a8933b3b90e7d793a [file] [log] [blame]
RoboErik01fe6612014-02-13 14:19:04 -08001/* Copyright (C) 2014 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
RoboErik2f5b0572014-02-21 10:30:38 -080016package android.media.session;
RoboErik01fe6612014-02-13 14:19:04 -080017
RoboErike34c09d2014-07-24 10:20:41 -070018import android.app.PendingIntent;
Gabriel Pealf0593bc2014-07-22 09:39:06 -070019import android.content.pm.ParceledListSlice;
RoboErik9db9bf72014-07-21 12:44:53 -070020import android.media.AudioAttributes;
RoboErik42ea7ee2014-05-16 16:27:35 -070021import android.media.MediaMetadata;
RoboErik07c70772014-03-20 13:33:52 -070022import android.media.session.ISessionController;
RoboErik8ae0f342014-02-24 18:02:08 -080023import android.media.session.PlaybackState;
Gabriel Pealf0593bc2014-07-22 09:39:06 -070024import android.media.session.MediaSession;
RoboErik01fe6612014-02-13 14:19:04 -080025import android.os.Bundle;
RoboErik07c70772014-03-20 13:33:52 -070026import android.os.ResultReceiver;
RoboErik01fe6612014-02-13 14:19:04 -080027
28/**
29 * Interface to a MediaSession in the system.
30 * @hide
31 */
RoboErik07c70772014-03-20 13:33:52 -070032interface ISession {
RoboErik8ae0f342014-02-24 18:02:08 -080033 void sendEvent(String event, in Bundle data);
RoboErik07c70772014-03-20 13:33:52 -070034 ISessionController getController();
RoboErika8f95142014-05-05 14:23:49 -070035 void setFlags(int flags);
36 void setActive(boolean active);
RoboErikb214efb2014-07-24 13:20:30 -070037 void setMediaButtonReceiver(in PendingIntent mbr);
RoboErike34c09d2014-07-24 10:20:41 -070038 void setLaunchPendingIntent(in PendingIntent pi);
RoboErik01fe6612014-02-13 14:19:04 -080039 void destroy();
RoboErik8ae0f342014-02-24 18:02:08 -080040
41 // These commands are for the TransportPerformer
42 void setMetadata(in MediaMetadata metadata);
43 void setPlaybackState(in PlaybackState state);
Gabriel Pealf0593bc2014-07-22 09:39:06 -070044 void setQueue(in ParceledListSlice queue);
45 void setQueueTitle(CharSequence title);
46 void setExtras(in Bundle extras);
RoboErik8ae0f342014-02-24 18:02:08 -080047 void setRatingType(int type);
RoboErikb69ffd42014-05-30 14:57:59 -070048
49 // These commands relate to volume handling
RoboErik9db9bf72014-07-21 12:44:53 -070050 void setPlaybackToLocal(in AudioAttributes attributes);
51 void setPlaybackToRemote(int control, int max);
RoboErikb69ffd42014-05-30 14:57:59 -070052 void setCurrentVolume(int currentVolume);
Jeff Brown01a500e2014-07-10 22:50:50 -070053}