1 /***
2 * Ambient - A music player for the Android platform
3 Copyright (C) 2007 Martin Vysny
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 package sk.baka.ambient.activity.search;
20
21 import sk.baka.ambient.collection.ICollection;
22 import sk.baka.ambient.collection.TrackMetadataBean;
23
24 /***
25 * Enumerates search types.
26 *
27 * @author Martin Vysny
28 */
29 public enum SearchType {
30 /***
31 * Searches for tracks present in the collection. The model is a list of
32 * {@link TrackMetadataBean}.
33 */
34 Library(true),
35 /***
36 * Searches for stored playlists. The model is <code>null</code> and
37 * {@link SearchActivity#INTENTKEY_STRING} is the name of the selected
38 * playlist.
39 */
40 StoredPlaylists(false),
41 /***
42 * Searches for tracks present in the Magnatune collection. The model is a
43 * list of {@link TrackMetadataBean}.
44 */
45 Magnatune(true),
46 /***
47 * Searches for shoutcast genres. The model is <code>null</code> and
48 * {@link SearchActivity#INTENTKEY_STRING} is the name of the selected
49 * genre.
50 */
51 ShoutcastGenres(false),
52 /***
53 * Searches for tracks using SkreemR. The model is a list of
54 * {@link TrackMetadataBean}.
55 */
56 SkreemR(true),
57 /***
58 * Searches for tracks using Ampache. The model is a list of
59 * {@link TrackMetadataBean}.
60 */
61 Ampache(true),
62 /***
63 * Searches for tracks using an arbitrary {@link ICollection}. The model is
64 * a list of {@link TrackMetadataBean}.
65 */
66 Collection(true);
67 /***
68 * If <code>true</code> then this search returns a list of tracks.
69 */
70 public final boolean returnsTrackList;
71
72 private SearchType(final boolean returnsTrackList) {
73 this.returnsTrackList = returnsTrackList;
74 }
75 }