ultrasonic-app-subsonic-and.../ultrasonic/src/main/java/com/thejoshwa/ultrasonic/androidapp/service/DownloadService.java

148 lines
3.1 KiB
Java
Raw Normal View History

2013-04-06 21:47:24 +02:00
/*
This file is part of Subsonic.
Subsonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Subsonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Subsonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2009 (C) Sindre Mehus
*/
package com.thejoshwa.ultrasonic.androidapp.service;
import com.thejoshwa.ultrasonic.androidapp.audiofx.EqualizerController;
import com.thejoshwa.ultrasonic.androidapp.audiofx.VisualizerController;
import com.thejoshwa.ultrasonic.androidapp.domain.MusicDirectory.Entry;
2013-04-06 21:47:24 +02:00
import com.thejoshwa.ultrasonic.androidapp.domain.PlayerState;
import com.thejoshwa.ultrasonic.androidapp.domain.RepeatMode;
import java.util.List;
2013-04-06 21:47:24 +02:00
/**
* @author Sindre Mehus
* @version $Id$
*/
public interface DownloadService
{
2013-04-06 21:47:24 +02:00
void download(List<Entry> songs, boolean save, boolean autoplay, boolean playNext, boolean shuffle, boolean newPlaylist);
2013-04-06 21:47:24 +02:00
void downloadBackground(List<Entry> songs, boolean save);
2013-04-06 21:47:24 +02:00
void setShufflePlayEnabled(boolean enabled);
2013-04-06 21:47:24 +02:00
boolean isShufflePlayEnabled();
2013-04-06 21:47:24 +02:00
void shuffle();
2013-04-06 21:47:24 +02:00
RepeatMode getRepeatMode();
2013-04-06 21:47:24 +02:00
void setRepeatMode(RepeatMode repeatMode);
2013-04-06 21:47:24 +02:00
boolean getKeepScreenOn();
2013-04-06 21:47:24 +02:00
void setKeepScreenOn(boolean screenOn);
2013-04-06 21:47:24 +02:00
boolean getShowVisualization();
2013-04-06 21:47:24 +02:00
boolean getEqualizerAvailable();
boolean getVisualizerAvailable();
void setShowVisualization(boolean showVisualization);
void clear();
2013-04-06 21:47:24 +02:00
void clearBackground();
void clearIncomplete();
int size();
2013-04-06 21:47:24 +02:00
void remove(int which);
2013-04-06 21:47:24 +02:00
void remove(DownloadFile downloadFile);
long getDownloadListDuration();
List<DownloadFile> getSongs();
2013-04-06 21:47:24 +02:00
List<DownloadFile> getDownloads();
List<DownloadFile> getBackgroundDownloads();
2013-04-06 21:47:24 +02:00
int getCurrentPlayingIndex();
DownloadFile getCurrentPlaying();
DownloadFile getCurrentDownloading();
void play(int index);
void seekTo(int position);
void previous();
2013-04-06 21:47:24 +02:00
void next();
2013-04-06 21:47:24 +02:00
void pause();
2013-04-06 21:47:24 +02:00
void stop();
2013-04-06 21:47:24 +02:00
void start();
2013-04-06 21:47:24 +02:00
void reset();
2013-04-06 21:47:24 +02:00
PlayerState getPlayerState();
2013-04-06 21:47:24 +02:00
int getPlayerPosition();
2013-04-06 21:47:24 +02:00
int getPlayerDuration();
2013-04-06 21:47:24 +02:00
void delete(List<Entry> songs);
2013-04-06 21:47:24 +02:00
void unpin(List<Entry> songs);
2013-04-06 21:47:24 +02:00
DownloadFile forSong(Entry song);
2013-04-06 21:47:24 +02:00
long getDownloadListUpdateRevision();
2013-04-06 21:47:24 +02:00
void setSuggestedPlaylistName(String name);
2013-04-06 21:47:24 +02:00
String getSuggestedPlaylistName();
2013-04-06 21:47:24 +02:00
EqualizerController getEqualizerController();
2013-04-06 21:47:24 +02:00
VisualizerController getVisualizerController();
2013-04-06 21:47:24 +02:00
boolean isJukeboxEnabled();
2013-04-06 21:47:24 +02:00
boolean isJukeboxAvailable();
boolean isSharingAvailable();
void setJukeboxEnabled(boolean b);
2013-04-06 21:47:24 +02:00
void adjustJukeboxVolume(boolean up);
2013-04-06 21:47:24 +02:00
void togglePlayPause();
2013-04-06 21:47:24 +02:00
void setVolume(float volume);
2013-04-06 21:47:24 +02:00
void swap(boolean mainList, int from, int to);
2013-04-06 21:47:24 +02:00
void restore(List<Entry> songs, int currentPlayingIndex, int currentPlayingPosition, boolean autoPlay, boolean newPlaylist);
void stopJukeboxService();
void startJukeboxService();
2013-04-06 21:47:24 +02:00
}