2020-12-19 12:22:57 +01:00
|
|
|
import '../entities/loop_mode.dart';
|
2020-04-10 20:12:26 +02:00
|
|
|
import '../entities/playback_state.dart';
|
2020-08-24 16:43:22 +02:00
|
|
|
import '../entities/shuffle_mode.dart';
|
2020-04-06 22:33:26 +02:00
|
|
|
import '../entities/song.dart';
|
|
|
|
|
|
|
|
abstract class AudioRepository {
|
2020-04-10 20:12:26 +02:00
|
|
|
Stream<Song> get currentSongStream;
|
|
|
|
Stream<PlaybackState> get playbackStateStream;
|
2020-04-11 20:23:02 +02:00
|
|
|
Stream<int> get currentPositionStream;
|
2020-04-09 17:50:28 +02:00
|
|
|
|
2020-12-30 16:04:20 +01:00
|
|
|
Future<void> playSong(int index, List<Song> songList);
|
|
|
|
Future<void> play();
|
|
|
|
Future<void> pause();
|
|
|
|
Future<void> skipToNext();
|
|
|
|
Future<void> skipToPrevious();
|
2020-12-24 11:20:22 +01:00
|
|
|
Future<void> setIndex(int index);
|
2020-12-19 12:22:57 +01:00
|
|
|
|
2020-12-28 15:45:18 +01:00
|
|
|
Future<void> setShuffleMode(ShuffleMode shuffleMode);
|
2020-12-19 12:22:57 +01:00
|
|
|
Future<void> setLoopMode(LoopMode loopMode);
|
|
|
|
|
2020-12-30 16:04:20 +01:00
|
|
|
Future<void> shuffleAll();
|
|
|
|
Future<void> addToQueue(Song song);
|
|
|
|
Future<void> moveQueueItem(int oldIndex, int newIndex);
|
|
|
|
Future<void> removeQueueIndex(int index);
|
2020-08-24 16:43:22 +02:00
|
|
|
}
|