MediaController2Provider.java revision 661433de8f45b6e6cda5430cb3cc1a286c0f6d23
1/*
2 * Copyright 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.media.update;
18
19import android.annotation.SystemApi;
20import android.app.PendingIntent;
21import android.media.MediaController2.PlaybackInfo;
22import android.media.MediaItem2;
23import android.media.MediaSession2.Command;
24import android.media.MediaSession2.PlaylistParams;
25import android.media.PlaybackState2;
26import android.media.Rating2;
27import android.media.SessionToken2;
28import android.net.Uri;
29import android.os.Bundle;
30import android.os.ResultReceiver;
31
32import java.util.List;
33
34/**
35 * @hide
36 */
37public interface MediaController2Provider extends TransportControlProvider {
38    void close_impl();
39    SessionToken2 getSessionToken_impl();
40    boolean isConnected_impl();
41
42    PendingIntent getSessionActivity_impl();
43    int getRatingType_impl();
44
45    void setVolumeTo_impl(int value, int flags);
46    void adjustVolume_impl(int direction, int flags);
47    PlaybackInfo getPlaybackInfo_impl();
48
49    void prepareFromUri_impl(Uri uri, Bundle extras);
50    void prepareFromSearch_impl(String query, Bundle extras);
51    void prepareMediaId_impl(String mediaId, Bundle extras);
52    void playFromSearch_impl(String query, Bundle extras);
53    void playFromUri_impl(String uri, Bundle extras);
54    void playFromMediaId_impl(String mediaId, Bundle extras);
55
56    void setRating_impl(Rating2 rating);
57    void sendCustomCommand_impl(Command command, Bundle args, ResultReceiver cb);
58    List<MediaItem2> getPlaylist_impl();
59
60    void removePlaylistItem_impl(MediaItem2 index);
61    void addPlaylistItem_impl(int index, MediaItem2 item);
62
63    PlaylistParams getPlaylistParam_impl();
64    void setPlaylistParams_impl(PlaylistParams params);
65    PlaybackState2 getPlaybackState_impl();
66}
67