PageRenderTime 113ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/JUSTPLAYER/src/jp/co/kayo/android/localplayer/consts/MediaConsts.java

https://bitbucket.org/kshark27/just-player
Java | 249 lines | 199 code | 20 blank | 30 comment | 0 complexity | e9b6060e74e5dc6b76636a7b4ea5691c MD5 | raw file
  1. package jp.co.kayo.android.localplayer.consts;
  2. /***
  3. * Copyright (c) 2010-2012 yokmama. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it under
  6. * the terms of the GNU General Public License as published by the Free Software
  7. * Foundation; either version 2 of the License, or (at your option) any later
  8. * version.
  9. *
  10. * This program is distributed in the hope that it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  12. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  13. * details.
  14. *
  15. * You should have received a copy of the GNU General Public License along with
  16. * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
  17. * Place, Suite 330, Boston, MA 02111-1307 USA
  18. *
  19. */
  20. import android.net.Uri;
  21. import android.provider.BaseColumns;
  22. import android.provider.MediaStore;
  23. import android.provider.MediaStore.MediaColumns;
  24. public interface MediaConsts {
  25. public static final String AUTHORITY = "jp.co.kayo.android.localplayer";
  26. public static final String CONTENT_AUTHORITY_SLASH = "content://"
  27. + AUTHORITY + "/";
  28. // MEDIA URI
  29. public static final Uri MEDIA_CONTENT_URI = Uri
  30. .parse(CONTENT_AUTHORITY_SLASH + "audio/media");
  31. public static final Uri ALBUM_CONTENT_URI = Uri
  32. .parse(CONTENT_AUTHORITY_SLASH + "audio/albums");
  33. public static final Uri ARTIST_CONTENT_URI = Uri
  34. .parse(CONTENT_AUTHORITY_SLASH + "audio/artist");
  35. public static final Uri PLAYLIST_CONTENT_URI = Uri
  36. .parse(CONTENT_AUTHORITY_SLASH + "audio/playlist");
  37. public static final Uri PLAYLIST_MEMBER_CONTENT_URI = Uri
  38. .parse(CONTENT_AUTHORITY_SLASH + "audio/playlistmember");
  39. public static final Uri FAVORITE_CONTENT_URI = Uri
  40. .parse(CONTENT_AUTHORITY_SLASH + "audio/favorite");
  41. public static final Uri VIDEO_CONTENT_URI = Uri
  42. .parse(CONTENT_AUTHORITY_SLASH + "video/media");
  43. public static final Uri PLAYBACK_CONTENT_URI = Uri
  44. .parse(CONTENT_AUTHORITY_SLASH + "order/audio");
  45. public static final Uri FOLDER_CONTENT_URI = Uri
  46. .parse(CONTENT_AUTHORITY_SLASH + "audio/file");
  47. // public static final Uri DOWNLOAD_CONTENT_URI =
  48. // Uri.parse(CONTENT_AUTHORITY_SLASH + "download/media");
  49. public static final Uri GENRES_CONTENT_URI = Uri
  50. .parse(CONTENT_AUTHORITY_SLASH + "audio/genres");
  51. public static final Uri GENRES_MEMBER_CONTENT_URI = Uri
  52. .parse(CONTENT_AUTHORITY_SLASH + "audio/genresmember");
  53. public static final Uri AUTH_CONTENT_URI = Uri
  54. .parse(CONTENT_AUTHORITY_SLASH + "config/auth");
  55. public static final Uri URL_CONTENT_URI = Uri.parse(CONTENT_AUTHORITY_SLASH
  56. + "config/url");
  57. public static final Uri PING_CONTENT_URI = Uri
  58. .parse(CONTENT_AUTHORITY_SLASH + "config/ping");
  59. public static final Uri CLEAR_CONTENT_URI = Uri
  60. .parse(CONTENT_AUTHORITY_SLASH + "config/clear");
  61. public static final Uri RESET_CONTENT_URI = Uri
  62. .parse(CONTENT_AUTHORITY_SLASH + "config/reset");
  63. public static final int CODE_MEDIA = 0;
  64. public static final int CODE_MEDIA_ID = 1;
  65. public static final int CODE_ALBUMS = 2;
  66. public static final int CODE_ALBUMS_ID = 3;
  67. public static final int CODE_ARTIST = 4;
  68. public static final int CODE_ARTIST_ID = 5;
  69. public static final int CODE_PLAYLIST = 6;
  70. public static final int CODE_PLAYLIST_ID = 7;
  71. public static final int AUDIO_ALBUMART = 8;
  72. public static final int AUDIO_ALBUMART_ID = 9;
  73. public static final int AUDIO_ALBUMART_FILE_ID = 10;
  74. public static final int CODE_PLAYLISTMEMBER = 11;
  75. public static final int CODE_PLAYLISTMEMBER_ID = 12;
  76. public static final int CODE_FAVORITE = 13;
  77. public static final int CODE_FAVORITE_ID = 14;
  78. public static final int CODE_VIDEO = 15;
  79. public static final int CODE_VIDEO_ID = 16;
  80. public static final int CODE_ORDER_AUDIO = 17;
  81. public static final int CODE_ORDER_AUDIO_ID = 18;
  82. // public static final int CODE_DOWNLOAD = 19;
  83. // public static final int CODE_DOWNLOAD_ID = 20;
  84. public static final int CODE_GENRES = 19;
  85. public static final int CODE_GENRES_ID = 20;
  86. public static final int CODE_GENRESMEMBER = 21;
  87. public static final int CODE_GENRESMEMBER_ID = 22;
  88. public static final int CODE_CLEAR = 23;
  89. public static final int CODE_RESET = 24;
  90. public static final int CODE_AUTH = 25;
  91. public static final int CODE_PING = 26;
  92. public static final int CODE_FILE = 27;
  93. public static final int CODE_FILE_ID = 28;
  94. public static final int CODE_PREF = 30;
  95. public abstract static interface Media {
  96. public static final String _ID = BaseColumns._ID;
  97. public static final String DATA = MediaColumns.DATA;
  98. public static final String SIZE = MediaColumns.SIZE;
  99. public static final String DISPLAY_NAME = MediaColumns.DISPLAY_NAME;
  100. public static final String TITLE = MediaColumns.TITLE;
  101. public static final String DATE_ADDED = MediaColumns.DATE_ADDED;
  102. public static final String DATE_MODIFIED = MediaColumns.DATE_MODIFIED;
  103. public static final String MIME_TYPE = MediaColumns.MIME_TYPE;
  104. public static final String ENCODING = "encoding";
  105. }
  106. // Media
  107. public static interface AudioMedia extends Media {
  108. public static final String TITLE = MediaStore.Audio.Media.TITLE;
  109. public static final String MEDIA_KEY = "media_key";
  110. public static final String TITLE_KEY = MediaStore.Audio.Media.TITLE_KEY;
  111. public static final String DURATION = MediaStore.Audio.Media.DURATION;
  112. // public static final String BOOKMARK =
  113. // MediaStore.Audio.Media.BOOKMARK;
  114. public static final String ARTIST_ID = MediaStore.Audio.Media.ARTIST_ID;
  115. public static final String ARTIST = MediaStore.Audio.Media.ARTIST;
  116. public static final String ARTIST_KEY = MediaStore.Audio.Media.ARTIST_KEY;
  117. public static final String COMPOSER = MediaStore.Audio.Media.COMPOSER;
  118. public static final String ALBUM_ID = MediaStore.Audio.Media.ALBUM_ID;
  119. public static final String ALBUM = MediaStore.Audio.Media.ALBUM;
  120. public static final String ALBUM_KEY = MediaStore.Audio.Media.ALBUM_KEY;
  121. // public static final String ALBUM_ART =
  122. // MediaStore.Audio.Media.ALBUM_ART;
  123. public static final String TRACK = MediaStore.Audio.Media.TRACK;
  124. public static final String YEAR = MediaStore.Audio.Media.YEAR;
  125. public static final String IS_MUSIC = MediaStore.Audio.Media.IS_MUSIC;
  126. // public static final String IS_PODCAST =
  127. // MediaStore.Audio.Media.IS_PODCAST;
  128. public static final String IS_RINGTONE = MediaStore.Audio.Media.IS_RINGTONE;
  129. public static final String IS_ALARM = MediaStore.Audio.Media.IS_ALARM;
  130. public static final String IS_NOTIFICATION = MediaStore.Audio.Media.IS_NOTIFICATION;
  131. public static final String FAVORITE_POINT = TableConsts.FAVORITE_POINT;
  132. public static final String AUDIO_CACHE_FILE = TableConsts.AUDIO_CACHE_FILE;
  133. }
  134. public static interface AudioAlbum extends Media {
  135. public static final String ALBUM_ID = MediaStore.Audio.Albums.ALBUM_ID;
  136. public static final String ALBUM = MediaStore.Audio.Albums.ALBUM;
  137. public static final String ARTIST = MediaStore.Audio.Albums.ARTIST;
  138. public static final String ARTIST_KEY = MediaStore.Audio.Artists.ARTIST_KEY;
  139. public static final String NUMBER_OF_SONGS = MediaStore.Audio.Albums.NUMBER_OF_SONGS;
  140. public static final String NUMBER_OF_SONGS_FOR_ARTIST = MediaStore.Audio.Albums.NUMBER_OF_SONGS_FOR_ARTIST;
  141. public static final String FIRST_YEAR = MediaStore.Audio.Albums.FIRST_YEAR;
  142. public static final String LAST_YEAR = MediaStore.Audio.Albums.LAST_YEAR;
  143. public static final String ALBUM_KEY = MediaStore.Audio.Albums.ALBUM_KEY;
  144. public static final String ALBUM_ART = MediaStore.Audio.Albums.ALBUM_ART;
  145. public static final String FAVORITE_POINT = TableConsts.FAVORITE_POINT;
  146. public static final String ALBUM_INIT_FLG = TableConsts.ALBUM_INIT_FLG;
  147. }
  148. public static interface AudioArtist extends Media {
  149. public static final String ARTIST = MediaStore.Audio.Artists.ARTIST;
  150. public static final String ARTIST_KEY = MediaStore.Audio.Artists.ARTIST_KEY;
  151. public static final String NUMBER_OF_ALBUMS = MediaStore.Audio.Artists.NUMBER_OF_ALBUMS;
  152. public static final String NUMBER_OF_TRACKS = MediaStore.Audio.Artists.NUMBER_OF_TRACKS;
  153. public static final String FAVORITE_POINT = TableConsts.FAVORITE_POINT;
  154. }
  155. public static interface AudioPlaylist extends Media {
  156. public static final String NAME = MediaStore.Audio.Playlists.NAME;
  157. public static final String PLAYLIST_KEY = "playlist_key";
  158. public static final String DATA = MediaStore.Audio.Playlists.DATA;
  159. public static final String DATE_ADDED = MediaStore.Audio.Playlists.DATE_ADDED;
  160. public static final String DATE_MODIFIED = MediaStore.Audio.Playlists.DATE_MODIFIED;
  161. }
  162. public static interface AudioPlaylistMember extends AudioMedia {
  163. public static final String CONTENT_DIRECTORY = MediaStore.Audio.Playlists.Members.CONTENT_DIRECTORY;
  164. public static final String AUDIO_ID = MediaStore.Audio.Playlists.Members.AUDIO_ID;
  165. public static final String PLAYLIST_ID = MediaStore.Audio.Playlists.Members.PLAYLIST_ID;
  166. public static final String PLAY_ORDER = MediaStore.Audio.Playlists.Members.PLAY_ORDER;
  167. }
  168. public static interface AudioFavorite {
  169. public static final String _ID = BaseColumns._ID;
  170. public static final String MEDIA_ID = TableConsts.FAVORITE_ID;
  171. public static final String TYPE = TableConsts.FAVORITE_TYPE;
  172. public static final String POINT = TableConsts.FAVORITE_POINT;
  173. }
  174. public static interface AudioGenres extends Media {
  175. public static final String NAME = MediaStore.Audio.Genres.NAME;
  176. public static final String GENRES_KEY = "genres_key";
  177. }
  178. public static interface AudioGenresMember extends AudioMedia {
  179. public static final String CONTENT_DIRECTORY = MediaStore.Audio.Genres.Members.CONTENT_DIRECTORY;
  180. public static final String AUDIO_ID = MediaStore.Audio.Genres.Members.AUDIO_ID;
  181. public static final String GENRE_ID = MediaStore.Audio.Genres.Members.GENRE_ID;
  182. public static final String DEFAULT_SORT_ORDER = MediaStore.Audio.Genres.Members.DEFAULT_SORT_ORDER;
  183. }
  184. public static interface VideoMedia {
  185. public static final String _ID = BaseColumns._ID;
  186. public static final String MEDIA_KEY = "media_key";
  187. public static final String TITLE = MediaStore.Video.Media.TITLE;
  188. public static final String MIME_TYPE = MediaStore.Video.Media.MIME_TYPE;
  189. public static final String RESOLUTION = MediaStore.Video.Media.RESOLUTION;
  190. public static final String SIZE = MediaStore.Video.Media.SIZE;
  191. public static final String DURATION = MediaStore.Video.Media.DURATION;
  192. public static final String DATE_ADDED = MediaStore.Video.Media.DATE_ADDED;
  193. public static final String DATE_MODIFIED = MediaStore.Video.Media.DATE_MODIFIED;
  194. public static final String DATA = MediaStore.Video.Media.DATA;
  195. }
  196. public static interface FileMedia {
  197. public static final String _ID = BaseColumns._ID;
  198. public static final String TITLE = "title";
  199. public static final String TYPE = "type";
  200. public static final String DATE_MODIFIED = "date_modified";
  201. public static final String SIZE = "size";
  202. public static final String DATA = "data";
  203. public static final String KEEPPATH = "keep_path";
  204. }
  205. public static interface FileType {
  206. public static final String FOLDER = "folder";
  207. public static final String AUDIO = "audio";
  208. public static final String VIDEO = "video";
  209. public static final String ZIP = "zip";
  210. public static final String ZIPENTRY = "zipentry";
  211. }
  212. public static interface Auth {
  213. public static final String _ID = BaseColumns._ID;
  214. public static final String AUTH_KEY = "authkey";
  215. public static final String AUTH_URL = "authurl";
  216. public static final String PARAM1 = "param1";
  217. public static final String PARAM2 = "param2";
  218. public static final String PARAM3 = "param3";
  219. public static final String PARAM4 = "param4";
  220. }
  221. public static interface Session {
  222. public static final String _ID = BaseColumns._ID;
  223. public static final String SESSION_KEY = "session_key";
  224. }
  225. public static interface Url {
  226. public static final String _ID = BaseColumns._ID;
  227. public static final String PATH = "path";
  228. }
  229. }