mucke/lib/domain/repositories/platform_integration_repository.dart

39 lines
754 B
Dart
Raw Normal View History

2021-02-26 22:07:18 +01:00
import '../entities/event.dart';
import '../entities/playback_event.dart';
import '../entities/song.dart';
/*
- position
- controls (playbackState)
*/
abstract class PlatformIntegrationInfoRepository {
Stream<PlatformIntegrationEvent> get eventStream;
}
abstract class PlatformIntegrationRepository extends PlatformIntegrationInfoRepository {
void play();
void pause();
void onStop();
void handlePlaybackEvent(PlaybackEvent playbackEvent);
void setCurrentSong(Song song);
void setQueue(List<Song> queue);
}
class PlatformIntegrationEvent extends Event {
PlatformIntegrationEvent({this.type});
final PlatformIntegrationEventType type;
}
enum PlatformIntegrationEventType {
play,
pause,
stop,
skipNext,
skipPrevious,
}