1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
package net.sourceforge.subsonic.androidapp.service; |
20 |
|
|
21 |
|
import java.util.List; |
22 |
|
|
23 |
|
import org.apache.http.HttpResponse; |
24 |
|
|
25 |
|
import android.content.Context; |
26 |
|
import android.graphics.Bitmap; |
27 |
|
import net.sourceforge.subsonic.androidapp.domain.Indexes; |
28 |
|
import net.sourceforge.subsonic.androidapp.domain.JukeboxStatus; |
29 |
|
import net.sourceforge.subsonic.androidapp.domain.Lyrics; |
30 |
|
import net.sourceforge.subsonic.androidapp.domain.MusicDirectory; |
31 |
|
import net.sourceforge.subsonic.androidapp.domain.MusicFolder; |
32 |
|
import net.sourceforge.subsonic.androidapp.domain.Playlist; |
33 |
|
import net.sourceforge.subsonic.androidapp.domain.SearchCritera; |
34 |
|
import net.sourceforge.subsonic.androidapp.domain.SearchResult; |
35 |
|
import net.sourceforge.subsonic.androidapp.domain.Version; |
36 |
|
import net.sourceforge.subsonic.androidapp.util.CancellableTask; |
37 |
|
import net.sourceforge.subsonic.androidapp.util.ProgressListener; |
38 |
|
|
39 |
|
|
40 |
|
@author |
41 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
42 |
|
public interface MusicService { |
43 |
|
|
44 |
|
void ping(Context context, ProgressListener progressListener) throws Exception; |
45 |
|
|
46 |
|
boolean isLicenseValid(Context context, ProgressListener progressListener) throws Exception; |
47 |
|
|
48 |
|
List<MusicFolder> getMusicFolders(Context context, ProgressListener progressListener) throws Exception; |
49 |
|
|
50 |
|
Indexes getIndexes(String musicFolderId, boolean refresh, Context context, ProgressListener progressListener) throws Exception; |
51 |
|
|
52 |
|
MusicDirectory getMusicDirectory(String id, boolean refresh, Context context, ProgressListener progressListener) throws Exception; |
53 |
|
|
54 |
|
SearchResult search(SearchCritera criteria, Context context, ProgressListener progressListener) throws Exception; |
55 |
|
|
56 |
|
MusicDirectory getPlaylist(String id, Context context, ProgressListener progressListener) throws Exception; |
57 |
|
|
58 |
|
List<Playlist> getPlaylists(boolean refresh, Context context, ProgressListener progressListener) throws Exception; |
59 |
|
|
60 |
|
void createPlaylist(String id, String name, List<MusicDirectory.Entry> entries, Context context, ProgressListener progressListener) throws Exception; |
61 |
|
|
62 |
|
Lyrics getLyrics(String artist, String title, Context context, ProgressListener progressListener) throws Exception; |
63 |
|
|
64 |
|
void scrobble(String id, boolean submission, Context context, ProgressListener progressListener) throws Exception; |
65 |
|
|
66 |
|
MusicDirectory getAlbumList(String type, int size, int offset, Context context, ProgressListener progressListener) throws Exception; |
67 |
|
|
68 |
|
MusicDirectory getRandomSongs(int size, Context context, ProgressListener progressListener) throws Exception; |
69 |
|
|
70 |
|
Bitmap getCoverArt(Context context, MusicDirectory.Entry entry, int size, boolean saveToFile, ProgressListener progressListener) throws Exception; |
71 |
|
|
72 |
|
HttpResponse getDownloadInputStream(Context context, MusicDirectory.Entry song, long offset, int maxBitrate, CancellableTask task) throws Exception; |
73 |
|
|
74 |
|
Version getLocalVersion(Context context) throws Exception; |
75 |
|
|
76 |
|
Version getLatestVersion(Context context, ProgressListener progressListener) throws Exception; |
77 |
|
|
78 |
|
String getVideoUrl(Context context, String id); |
79 |
|
|
80 |
|
JukeboxStatus updateJukeboxPlaylist(List<String> ids, Context context, ProgressListener progressListener) throws Exception; |
81 |
|
|
82 |
|
JukeboxStatus skipJukebox(int index, int offsetSeconds, Context context, ProgressListener progressListener) throws Exception; |
83 |
|
|
84 |
|
JukeboxStatus stopJukebox(Context context, ProgressListener progressListener) throws Exception; |
85 |
|
|
86 |
|
JukeboxStatus startJukebox(Context context, ProgressListener progressListener) throws Exception; |
87 |
|
|
88 |
|
JukeboxStatus getJukeboxStatus(Context context, ProgressListener progressListener) throws Exception; |
89 |
|
|
90 |
|
JukeboxStatus setJukeboxGain(float gain, Context context, ProgressListener progressListener) throws Exception; |
91 |
|
} |