101fe661ae5da3739215d93922412df4b24c859a2RoboErik/* Copyright (C) 2014 The Android Open Source Project 201fe661ae5da3739215d93922412df4b24c859a2RoboErik * 301fe661ae5da3739215d93922412df4b24c859a2RoboErik * Licensed under the Apache License, Version 2.0 (the "License"); 401fe661ae5da3739215d93922412df4b24c859a2RoboErik * you may not use this file except in compliance with the License. 501fe661ae5da3739215d93922412df4b24c859a2RoboErik * You may obtain a copy of the License at 601fe661ae5da3739215d93922412df4b24c859a2RoboErik * 701fe661ae5da3739215d93922412df4b24c859a2RoboErik * http://www.apache.org/licenses/LICENSE-2.0 801fe661ae5da3739215d93922412df4b24c859a2RoboErik * 901fe661ae5da3739215d93922412df4b24c859a2RoboErik * Unless required by applicable law or agreed to in writing, software 1001fe661ae5da3739215d93922412df4b24c859a2RoboErik * distributed under the License is distributed on an "AS IS" BASIS, 1101fe661ae5da3739215d93922412df4b24c859a2RoboErik * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1201fe661ae5da3739215d93922412df4b24c859a2RoboErik * See the License for the specific language governing permissions and 1301fe661ae5da3739215d93922412df4b24c859a2RoboErik * limitations under the License. 1401fe661ae5da3739215d93922412df4b24c859a2RoboErik */ 1501fe661ae5da3739215d93922412df4b24c859a2RoboErik 162f5b057da7d05d5d699a272aa24fd7c97cdda820RoboErikpackage android.media.session; 1701fe661ae5da3739215d93922412df4b24c859a2RoboErik 1801fe661ae5da3739215d93922412df4b24c859a2RoboErikimport android.content.Intent; 19c2045470a343923b0d74ddbd6a6b80fcf6652d66P.Y. Laligandimport android.media.Rating; 20f0593bc17b61c872ae2d7705fb598c5e5056e679Gabriel Pealimport android.net.Uri; 2101fe661ae5da3739215d93922412df4b24c859a2RoboErikimport android.os.Bundle; 228ae0f34db936a649ddaf9cdd086c224f6514efebRoboErikimport android.os.ResultReceiver; 2301fe661ae5da3739215d93922412df4b24c859a2RoboErik 2401fe661ae5da3739215d93922412df4b24c859a2RoboErik/** 2501fe661ae5da3739215d93922412df4b24c859a2RoboErik * @hide 2601fe661ae5da3739215d93922412df4b24c859a2RoboErik */ 2707c7077c54717dbbf2c401ea32d00fa6df6d77c6RoboErikoneway interface ISessionCallback { 28f364f944962c4ec66f5e5b33dafe8480f38f6db6Gabriel Peal void onCommand(String command, in Bundle args, in ResultReceiver cb); 29418c10ca9df1505509afeffd558cd92fc97bc635RoboErik void onMediaButton(in Intent mediaButtonIntent, int sequenceNumber, in ResultReceiver cb); 308ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik 318ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik // These callbacks are for the TransportPerformer 3222188f118754c3b31c13d2f94daf718f111d92afDonghyun Cho void onPrepare(); 3322188f118754c3b31c13d2f94daf718f111d92afDonghyun Cho void onPrepareFromMediaId(String mediaId, in Bundle extras); 3422188f118754c3b31c13d2f94daf718f111d92afDonghyun Cho void onPrepareFromSearch(String query, in Bundle extras); 3522188f118754c3b31c13d2f94daf718f111d92afDonghyun Cho void onPrepareFromUri(in Uri uri, in Bundle extras); 368ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik void onPlay(); 37c2045470a343923b0d74ddbd6a6b80fcf6652d66P.Y. Laligand void onPlayFromMediaId(String mediaId, in Bundle extras); 38f0593bc17b61c872ae2d7705fb598c5e5056e679Gabriel Peal void onPlayFromSearch(String query, in Bundle extras); 39c2045470a343923b0d74ddbd6a6b80fcf6652d66P.Y. Laligand void onPlayFromUri(in Uri uri, in Bundle extras); 40f0593bc17b61c872ae2d7705fb598c5e5056e679Gabriel Peal void onSkipToTrack(long id); 418ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik void onPause(); 428ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik void onStop(); 438ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik void onNext(); 448ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik void onPrevious(); 458ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik void onFastForward(); 468ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik void onRewind(); 478ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik void onSeekTo(long pos); 488ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik void onRate(in Rating rating); 49f364f944962c4ec66f5e5b33dafe8480f38f6db6Gabriel Peal void onCustomAction(String action, in Bundle args); 50b69ffd4dc2c8fa85e0064151141ebeee90de471eRoboErik 51b69ffd4dc2c8fa85e0064151141ebeee90de471eRoboErik // These callbacks are for volume handling 521ff5b1648a051e9650614f0c0f1b3f449777db81RoboErik void onAdjustVolume(int direction); 53b69ffd4dc2c8fa85e0064151141ebeee90de471eRoboErik void onSetVolumeTo(int value); 5401a500ed1c6ae3fff66678144ae637aa8cad0eccJeff Brown} 55