OSDN Git Service

a1f25c9ab0ff1260632b522bffd90b54f354b9ea
[android-x86/packages-apps-Eleven.git] / src / com / andrew / apollo / utils / SortOrder.java
1 /*
2  * Copyright (C) 2012 Andrew Neal Licensed under the Apache License, Version 2.0
3  * (the "License"); you may not use this file except in compliance with the
4  * License. You may obtain a copy of the License at
5  * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
6  * or agreed to in writing, software distributed under the License is
7  * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8  * KIND, either express or implied. See the License for the specific language
9  * governing permissions and limitations under the License.
10  */
11
12 package com.andrew.apollo.utils;
13
14 import android.provider.MediaStore;
15
16 /**
17  * Holds all of the sort orders for each list type.
18  * 
19  * @author Andrew Neal (andrewdneal@gmail.com)
20  */
21 public final class SortOrder {
22
23     /** This class is never instantiated */
24     public SortOrder() {
25     }
26
27     /**
28      * Artist sort order entries.
29      */
30     public static interface ArtistSortOrder {
31         /* Artist sort order A-Z */
32         public final static String ARTIST_A_Z = MediaStore.Audio.Artists.DEFAULT_SORT_ORDER;
33
34         /* Artist sort order Z-A */
35         public final static String ARTIST_Z_A = ARTIST_A_Z + " DESC";
36
37         /* Artist sort order number of songs */
38         public final static String ARTIST_NUMBER_OF_SONGS = MediaStore.Audio.Artists.NUMBER_OF_TRACKS
39                 + " DESC";
40
41         /* Artist sort order number of albums */
42         public final static String ARTIST_NUMBER_OF_ALBUMS = MediaStore.Audio.Artists.NUMBER_OF_ALBUMS
43                 + " DESC";
44     }
45
46     /**
47      * Album sort order entries.
48      */
49     public static interface AlbumSortOrder {
50         /* Album sort order A-Z */
51         public final static String ALBUM_A_Z = MediaStore.Audio.Albums.DEFAULT_SORT_ORDER;
52
53         /* Album sort order Z-A */
54         public final static String ALBUM_Z_A = ALBUM_A_Z + " DESC";
55
56         /* Album sort order songs */
57         public final static String ALBUM_NUMBER_OF_SONGS = MediaStore.Audio.Albums.NUMBER_OF_SONGS
58                 + " DESC";
59
60         /* Album sort order artist */
61         public final static String ALBUM_ARTIST = MediaStore.Audio.Albums.ARTIST;
62
63         /* Album sort order year */
64         public final static String ALBUM_YEAR = MediaStore.Audio.Albums.FIRST_YEAR + " DESC";
65
66     }
67
68     /**
69      * Song sort order entries.
70      */
71     public static interface SongSortOrder {
72         /* Song sort order A-Z */
73         public final static String SONG_A_Z = MediaStore.Audio.Media.DEFAULT_SORT_ORDER;
74
75         /* Song sort order Z-A */
76         public final static String SONG_Z_A = SONG_A_Z + " DESC";
77
78         /* Song sort order artist */
79         public final static String SONG_ARTIST = MediaStore.Audio.Media.ARTIST;
80
81         /* Song sort order album */
82         public final static String SONG_ALBUM = MediaStore.Audio.Media.ALBUM;
83
84         /* Song sort order year */
85         public final static String SONG_YEAR = MediaStore.Audio.Media.YEAR + " DESC";
86
87         /* Song sort order duration */
88         public final static String SONG_DURATION = MediaStore.Audio.Media.DURATION + " DESC";
89
90         /* Song sort order date */
91         public final static String SONG_DATE = MediaStore.Audio.Media.DATE_ADDED + " DESC";
92
93         /* Song sort order filename */
94         public final static String SONG_FILENAME = MediaStore.Audio.Media.DATA;
95     }
96
97     /**
98      * Album song sort order entries.
99      */
100     public static interface AlbumSongSortOrder {
101         /* Album song sort order A-Z */
102         public final static String SONG_A_Z = MediaStore.Audio.Media.DEFAULT_SORT_ORDER;
103
104         /* Album song sort order Z-A */
105         public final static String SONG_Z_A = SONG_A_Z + " DESC";
106
107         /* Album song sort order track list */
108         public final static String SONG_TRACK_LIST = MediaStore.Audio.Media.TRACK + ", "
109                 + MediaStore.Audio.Media.DEFAULT_SORT_ORDER;
110
111         /* Album song sort order duration */
112         public final static String SONG_DURATION = SongSortOrder.SONG_DURATION;
113
114         /* Album song sort order filename */
115         public final static String SONG_FILENAME = SongSortOrder.SONG_FILENAME;
116     }
117
118     /**
119      * Artist song sort order entries.
120      */
121     public static interface ArtistSongSortOrder {
122         /* Artist song sort order A-Z */
123         public final static String SONG_A_Z = MediaStore.Audio.Media.DEFAULT_SORT_ORDER;
124
125         /* Artist song sort order Z-A */
126         public final static String SONG_Z_A = SONG_A_Z + " DESC";
127
128         /* Artist song sort order album */
129         public final static String SONG_ALBUM = MediaStore.Audio.Media.ALBUM;
130
131         /* Artist song sort order year */
132         public final static String SONG_YEAR = MediaStore.Audio.Media.YEAR + " DESC";
133
134         /* Artist song sort order duration */
135         public final static String SONG_DURATION = MediaStore.Audio.Media.DURATION + " DESC";
136
137         /* Artist song sort order date */
138         public final static String SONG_DATE = MediaStore.Audio.Media.DATE_ADDED + " DESC";
139
140         /* Artist song sort order filename */
141         public final static String SONG_FILENAME = SongSortOrder.SONG_FILENAME;
142     }
143
144     /**
145      * Artist album sort order entries.
146      */
147     public static interface ArtistAlbumSortOrder {
148         /* Artist album sort order A-Z */
149         public final static String ALBUM_A_Z = MediaStore.Audio.Albums.DEFAULT_SORT_ORDER;
150
151         /* Artist album sort order Z-A */
152         public final static String ALBUM_Z_A = ALBUM_A_Z + " DESC";
153
154         /* Artist album sort order songs */
155         public final static String ALBUM_NUMBER_OF_SONGS = MediaStore.Audio.Artists.Albums.NUMBER_OF_SONGS
156                 + " DESC";
157
158         /* Artist album sort order year */
159         public final static String ALBUM_YEAR = MediaStore.Audio.Artists.Albums.FIRST_YEAR
160                 + " DESC";
161     }
162
163 }