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 17 package android.media.update; 18 19 import android.media.DataSourceDesc; 20 import android.media.MediaItem2; 21 import android.media.MediaMetadata2; 22 import android.media.MediaPlaylistAgent.PlaylistEventCallback; 23 24 import java.util.List; 25 import java.util.concurrent.Executor; 26 27 /** 28 * @hide 29 */ 30 public interface MediaPlaylistAgentProvider { 31 // final methods of MediaPlaylistAgent 32 void registerPlaylistEventCallback_impl(Executor executor, PlaylistEventCallback callback); 33 void unregisterPlaylistEventCallback_impl(PlaylistEventCallback callback); 34 void notifyPlaylistChanged_impl(); 35 void notifyPlaylistMetadataChanged_impl(); 36 void notifyShuffleModeChanged_impl(); 37 void notifyRepeatModeChanged_impl(); 38 39 // public methods of MediaPlaylistAgent 40 List<MediaItem2> getPlaylist_impl(); 41 void setPlaylist_impl(List<MediaItem2> list, MediaMetadata2 metadata); 42 MediaMetadata2 getPlaylistMetadata_impl(); 43 void updatePlaylistMetadata_impl(MediaMetadata2 metadata); 44 void addPlaylistItem_impl(int index, MediaItem2 item); 45 void removePlaylistItem_impl(MediaItem2 item); 46 void replacePlaylistItem_impl(int index, MediaItem2 item); 47 void skipToPlaylistItem_impl(MediaItem2 item); 48 void skipToPreviousItem_impl(); 49 void skipToNextItem_impl(); 50 int getRepeatMode_impl(); 51 void setRepeatMode_impl(int repeatMode); 52 int getShuffleMode_impl(); 53 void setShuffleMode_impl(int shuffleMode); 54 MediaItem2 getMediaItem_impl(DataSourceDesc dsd); 55 } 56