ISessionController.aidl revision 07c7077c54717dbbf2c401ea32d00fa6df6d77c6
1/* 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 16package android.media.session; 17 18import android.content.Intent; 19import android.media.Rating; 20import android.media.session.ISessionControllerCallback; 21import android.media.session.MediaMetadata; 22import android.media.session.PlaybackState; 23import android.os.Bundle; 24import android.os.ResultReceiver; 25import android.view.KeyEvent; 26 27/** 28 * Interface to a MediaSession in the system. 29 * @hide 30 */ 31interface ISessionController { 32 void sendCommand(String command, in Bundle extras, in ResultReceiver cb); 33 void sendMediaButton(in KeyEvent mediaButton); 34 void registerCallbackListener(in ISessionControllerCallback cb); 35 void unregisterCallbackListener(in ISessionControllerCallback cb); 36 boolean isTransportControlEnabled(); 37 void showRoutePicker(); 38 39 // These commands are for the TransportController 40 void play(); 41 void pause(); 42 void stop(); 43 void next(); 44 void previous(); 45 void fastForward(); 46 void rewind(); 47 void seekTo(long pos); 48 void rate(in Rating rating); 49 MediaMetadata getMetadata(); 50 PlaybackState getPlaybackState(); 51 int getRatingType(); 52}