-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
409 additions
and
369 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
app/src/main/java/org/oxycblt/auxio/music/device/ArtistTree.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package org.oxycblt.auxio.music.device | ||
|
||
|
||
interface AlbumTree { | ||
fun register(linkedSong: ArtistTree.LinkedSong): LinkedSong | ||
fun resolve(): Collection<AlbumImpl> | ||
|
||
data class LinkedSong( | ||
val linkedArtistSong: ArtistTree.LinkedSong, | ||
val album: Linked<AlbumImpl, SongImpl> | ||
) | ||
} | ||
|
||
interface ArtistTree { | ||
fun register(preSong: GenreTree.LinkedSong): LinkedSong | ||
fun resolve(): Collection<ArtistImpl> | ||
|
||
data class LinkedSong( | ||
val linkedGenreSong: GenreTree.LinkedSong, | ||
val linkedAlbum: LinkedAlbum, | ||
val artists: Linked<List<ArtistImpl>, SongImpl> | ||
) | ||
|
||
data class LinkedAlbum( | ||
val preAlbum: PreAlbum, | ||
val artists: Linked<List<ArtistImpl>, AlbumImpl> | ||
) | ||
} | ||
|
||
interface GenreTree { | ||
fun register(preSong: PreSong): LinkedSong | ||
fun resolve(): Collection<GenreImpl> | ||
|
||
data class LinkedSong( | ||
val preSong: PreSong, | ||
val genres: Linked<List<GenreImpl>, SongImpl> | ||
) | ||
} | ||
|
||
interface Linked<P, C> { | ||
fun resolve(child: C): P | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.