Moved MPRIS to a new project
[stereo.git] / DAAPLib / src / util / command / Databases.java
blob89c27da184753734fa7265d7d7bef648e2a3b9d4
1 package util.command;
3 import interfaces.Constants;
4 import interfaces.DJInterface;
6 import java.util.Map;
8 import util.command.databases.Browse;
9 import util.command.databases.Containers;
10 import util.command.databases.Edit;
11 import util.command.databases.Groups;
12 import api.Response;
14 public class Databases extends PathNode implements Command {
16 public void init(Map<String, String> args) {
17 // no parameters expected
20 public Response run(DJInterface dj) {
21 int items = dj.library().size();
22 int containers = dj.library().numCollections();
24 util.response.Databases databases =
25 new util.response.Databases(1, 0xf35226b7c8ee14d3l,
26 "Memphis Stereo", items, containers);
28 return databases;
31 public Command browse(int db) {
32 return this;
35 public Command groups(int db) {
36 return new Groups();
39 public Command containers(int db) {
40 return new Containers();
43 public Command edit(int db) {
44 return new Edit();
47 public Command artists() {
48 return new Browse(1, Constants.daap_browseartistlisting, Constants.daap_songartist);
51 public Command albums() {
52 return new Browse(1, Constants.daap_browsealbumlisting, Constants.daap_songalbum);
55 public Command genres() {
56 return new Browse(1, Constants.daap_browsegenrelisting, Constants.daap_songgenre);