aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-11-04 20:07:29 -0800
committerScott Jackson <daneren2005@gmail.com>2013-11-04 20:07:29 -0800
commit5471dc1b5e571e76a8f8611b69a4486417649ed0 (patch)
tree14e88453acd2e445c2b2052ca04ffa6623b90d79 /src
parenta2dda7438079997ed04035c78b81f6113b9fb5e3 (diff)
downloaddsub-5471dc1b5e571e76a8f8611b69a4486417649ed0.tar.gz
dsub-5471dc1b5e571e76a8f8611b69a4486417649ed0.tar.bz2
dsub-5471dc1b5e571e76a8f8611b69a4486417649ed0.zip
Created stubs for Bookmarks/Ratings
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/domain/Bookmark.java8
-rw-r--r--src/github/daneren2005/dsub/service/CachedMusicService.java24
-rw-r--r--src/github/daneren2005/dsub/service/MusicService.java10
-rw-r--r--src/github/daneren2005/dsub/service/OfflineMusicService.java21
-rw-r--r--src/github/daneren2005/dsub/service/RESTMusicService.java22
5 files changed, 83 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/domain/Bookmark.java b/src/github/daneren2005/dsub/domain/Bookmark.java
new file mode 100644
index 00000000..df3ac702
--- /dev/null
+++ b/src/github/daneren2005/dsub/domain/Bookmark.java
@@ -0,0 +1,8 @@
+package github.daneren2005.dsub.domain;
+
+/**
+ * Created by Scott on 11/4/13.
+ */
+public class Bookmark {
+
+}
diff --git a/src/github/daneren2005/dsub/service/CachedMusicService.java b/src/github/daneren2005/dsub/service/CachedMusicService.java
index 36506f9c..5a7737de 100644
--- a/src/github/daneren2005/dsub/service/CachedMusicService.java
+++ b/src/github/daneren2005/dsub/service/CachedMusicService.java
@@ -28,6 +28,8 @@ import org.apache.http.HttpResponse;
import android.content.Context;
import android.graphics.Bitmap;
import android.support.v4.util.LruCache;
+
+import github.daneren2005.dsub.domain.Bookmark;
import github.daneren2005.dsub.domain.ChatMessage;
import github.daneren2005.dsub.domain.Genre;
import github.daneren2005.dsub.domain.Indexes;
@@ -402,7 +404,27 @@ public class CachedMusicService implements MusicService {
public void deletePodcastEpisode(String id, Context context, ProgressListener progressListener) throws Exception{
musicService.deletePodcastEpisode(id, context, progressListener);
}
-
+
+ @Override
+ public void setRating(String id, int rating, Context context, ProgressListener progressListener) throws Exception {
+ musicService.setRating(id, rating, context, progressListener);
+ }
+
+ @Override
+ public List<Bookmark> getBookmarks(boolean refresh, Context context, ProgressListener progressListener) throws Exception {
+ return musicService.getBookmarks(refresh, context, progressListener);
+ }
+
+ @Override
+ public void createBookmark(String id, int position, String comment, Context context, ProgressListener progressListener) throws Exception {
+ musicService.createBookmark(id, position, comment, context, progressListener);
+ }
+
+ @Override
+ public void deleteBookmark(String id, Context context, ProgressListener progressListener) throws Exception {
+ musicService.deleteBookmark(id, context, progressListener);
+ }
+
@Override
public int processOfflineSyncs(final Context context, final ProgressListener progressListener) throws Exception{
return musicService.processOfflineSyncs(context, progressListener);
diff --git a/src/github/daneren2005/dsub/service/MusicService.java b/src/github/daneren2005/dsub/service/MusicService.java
index 6db960e6..8d204530 100644
--- a/src/github/daneren2005/dsub/service/MusicService.java
+++ b/src/github/daneren2005/dsub/service/MusicService.java
@@ -24,6 +24,8 @@ import org.apache.http.HttpResponse;
import android.content.Context;
import android.graphics.Bitmap;
+
+import github.daneren2005.dsub.domain.Bookmark;
import github.daneren2005.dsub.domain.ChatMessage;
import github.daneren2005.dsub.domain.Genre;
import github.daneren2005.dsub.domain.Indexes;
@@ -134,6 +136,14 @@ public interface MusicService {
void downloadPodcastEpisode(String id, Context context, ProgressListener progressListener) throws Exception;
void deletePodcastEpisode(String id, Context context, ProgressListener progressListener) throws Exception;
+
+ void setRating(String id, int rating, Context context, ProgressListener progressListener) throws Exception;
+
+ List<Bookmark> getBookmarks(boolean refresh, Context context, ProgressListener progressListener) throws Exception;
+
+ void createBookmark(String id, int position, String comment, Context context, ProgressListener progressListener) throws Exception;
+
+ void deleteBookmark(String id, Context context, ProgressListener progressListener) throws Exception;
int processOfflineSyncs(final Context context, final ProgressListener progressListener) throws Exception;
} \ No newline at end of file
diff --git a/src/github/daneren2005/dsub/service/OfflineMusicService.java b/src/github/daneren2005/dsub/service/OfflineMusicService.java
index 8e604bfa..ba798c09 100644
--- a/src/github/daneren2005/dsub/service/OfflineMusicService.java
+++ b/src/github/daneren2005/dsub/service/OfflineMusicService.java
@@ -34,6 +34,7 @@ import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.util.Log;
import github.daneren2005.dsub.domain.Artist;
+import github.daneren2005.dsub.domain.Bookmark;
import github.daneren2005.dsub.domain.Genre;
import github.daneren2005.dsub.domain.Indexes;
import github.daneren2005.dsub.domain.RemoteStatus;
@@ -634,6 +635,26 @@ public class OfflineMusicService extends RESTMusicService {
public void deletePodcastEpisode(String id, Context context, ProgressListener progressListener) throws Exception{
throw new OfflineException("Getting Podcasts not available in offline mode");
}
+
+ @Override
+ public void setRating(String id, int rating, Context context, ProgressListener progressListener) throws Exception {
+ throw new OfflineException("Setting ratings not available in offline mode");
+ }
+
+ @Override
+ public List<Bookmark> getBookmarks(boolean refresh, Context context, ProgressListener progressListener) throws Exception {
+ throw new OfflineException("Getting bookmarks not available in offline mode");
+ }
+
+ @Override
+ public void createBookmark(String id, int position, String comment, Context context, ProgressListener progressListener) throws Exception {
+ throw new OfflineException("Creating bookmarks not available in offline mode");
+ }
+
+ @Override
+ public void deleteBookmark(String id, Context context, ProgressListener progressListener) throws Exception {
+ throw new OfflineException("Deleting bookmarks not available in offline mode");
+ }
@Override
public int processOfflineSyncs(final Context context, final ProgressListener progressListener) throws Exception{
diff --git a/src/github/daneren2005/dsub/service/RESTMusicService.java b/src/github/daneren2005/dsub/service/RESTMusicService.java
index 77107d01..2e7d1892 100644
--- a/src/github/daneren2005/dsub/service/RESTMusicService.java
+++ b/src/github/daneren2005/dsub/service/RESTMusicService.java
@@ -968,7 +968,27 @@ public class RESTMusicService implements MusicService {
Util.close(reader);
}
}
-
+
+ @Override
+ public void setRating(String id, int rating, Context context, ProgressListener progressListener) throws Exception {
+
+ }
+
+ @Override
+ public List<Bookmark> getBookmarks(boolean refresh, Context context, ProgressListener progressListener) throws Exception {
+ return null;
+ }
+
+ @Override
+ public void createBookmark(String id, int position, String comment, Context context, ProgressListener progressListener) throws Exception {
+
+ }
+
+ @Override
+ public void deleteBookmark(String id, Context context, ProgressListener progressListener) throws Exception {
+
+ }
+
@Override
public int processOfflineSyncs(final Context context, final ProgressListener progressListener) throws Exception{
return processOfflineScrobbles(context, progressListener) + processOfflineStars(context, progressListener);