1 /* 2 * Copyright 2018 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package androidx.media; 18 19 class MediaConstants2 { 20 21 static final int CONNECT_RESULT_CONNECTED = 0; 22 static final int CONNECT_RESULT_DISCONNECTED = -1; 23 24 // Event string used by IMediaControllerCallback.onEvent() 25 static final String SESSION_EVENT_ON_PLAYER_STATE_CHANGED = 26 "androidx.media.session.event.ON_PLAYER_STATE_CHANGED"; 27 static final String SESSION_EVENT_ON_CURRENT_MEDIA_ITEM_CHANGED = 28 "androidx.media.session.event.ON_CURRENT_MEDIA_ITEM_CHANGED"; 29 static final String SESSION_EVENT_ON_ERROR = "androidx.media.session.event.ON_ERROR"; 30 static final String SESSION_EVENT_ON_ROUTES_INFO_CHANGED = 31 "androidx.media.session.event.ON_ROUTES_INFO_CHANGED"; 32 static final String SESSION_EVENT_ON_PLAYBACK_INFO_CHANGED = 33 "androidx.media.session.event.ON_PLAYBACK_INFO_CHANGED"; 34 static final String SESSION_EVENT_ON_PLAYBACK_SPEED_CHANGED = 35 "androidx.media.session.event.ON_PLAYBACK_SPEED_CHANGED"; 36 static final String SESSION_EVENT_ON_BUFFERING_STATE_CHANGED = 37 "androidx.media.session.event.ON_BUFFERING_STATE_CHANGED"; 38 static final String SESSION_EVENT_ON_SEEK_COMPLETED = 39 "androidx.media.session.event.ON_SEEK_COMPLETED"; 40 static final String SESSION_EVENT_ON_REPEAT_MODE_CHANGED = 41 "androidx.media.session.event.ON_REPEAT_MODE_CHANGED"; 42 static final String SESSION_EVENT_ON_SHUFFLE_MODE_CHANGED = 43 "androidx.media.session.event.ON_SHUFFLE_MODE_CHANGED"; 44 static final String SESSION_EVENT_ON_PLAYLIST_CHANGED = 45 "androidx.media.session.event.ON_PLAYLIST_CHANGED"; 46 static final String SESSION_EVENT_ON_PLAYLIST_METADATA_CHANGED = 47 "androidx.media.session.event.ON_PLAYLIST_METADATA_CHANGED"; 48 static final String SESSION_EVENT_ON_ALLOWED_COMMANDS_CHANGED = 49 "androidx.media.session.event.ON_ALLOWED_COMMANDS_CHANGED"; 50 static final String SESSION_EVENT_ON_CHILDREN_CHANGED = 51 "androidx.media.session.event.ON_CHILDREN_CHANGED"; 52 static final String SESSION_EVENT_ON_SEARCH_RESULT_CHANGED = 53 "androidx.media.session.event.ON_SEARCH_RESULT_CHANGED"; 54 static final String SESSION_EVENT_SEND_CUSTOM_COMMAND = 55 "androidx.media.session.event.SEND_CUSTOM_COMMAND"; 56 static final String SESSION_EVENT_SET_CUSTOM_LAYOUT = 57 "androidx.media.session.event.SET_CUSTOM_LAYOUT"; 58 59 // Command string used by MediaControllerCompat.sendCommand() 60 static final String CONTROLLER_COMMAND_CONNECT = "androidx.media.controller.command.CONNECT"; 61 static final String CONTROLLER_COMMAND_DISCONNECT = 62 "androidx.media.controller.command.DISCONNECT"; 63 static final String CONTROLLER_COMMAND_BY_COMMAND_CODE = 64 "androidx.media.controller.command.BY_COMMAND_CODE"; 65 static final String CONTROLLER_COMMAND_BY_CUSTOM_COMMAND = 66 "androidx.media.controller.command.BY_CUSTOM_COMMAND"; 67 68 69 static final String ARGUMENT_COMMAND_CODE = "androidx.media.argument.COMMAND_CODE"; 70 static final String ARGUMENT_CUSTOM_COMMAND = "androidx.media.argument.CUSTOM_COMMAND"; 71 static final String ARGUMENT_ALLOWED_COMMANDS = "androidx.media.argument.ALLOWED_COMMANDS"; 72 static final String ARGUMENT_SEEK_POSITION = "androidx.media.argument.SEEK_POSITION"; 73 static final String ARGUMENT_PLAYER_STATE = "androidx.media.argument.PLAYER_STATE"; 74 static final String ARGUMENT_PLAYBACK_SPEED = "androidx.media.argument.PLAYBACK_SPEED"; 75 static final String ARGUMENT_BUFFERING_STATE = "androidx.media.argument.BUFFERING_STATE"; 76 static final String ARGUMENT_ERROR_CODE = "androidx.media.argument.ERROR_CODE"; 77 static final String ARGUMENT_REPEAT_MODE = "androidx.media.argument.REPEAT_MODE"; 78 static final String ARGUMENT_SHUFFLE_MODE = "androidx.media.argument.SHUFFLE_MODE"; 79 static final String ARGUMENT_PLAYLIST = "androidx.media.argument.PLAYLIST"; 80 static final String ARGUMENT_PLAYLIST_INDEX = "androidx.media.argument.PLAYLIST_INDEX"; 81 static final String ARGUMENT_PLAYLIST_METADATA = "androidx.media.argument.PLAYLIST_METADATA"; 82 static final String ARGUMENT_RATING = "androidx.media.argument.RATING"; 83 static final String ARGUMENT_MEDIA_ITEM = "androidx.media.argument.MEDIA_ITEM"; 84 static final String ARGUMENT_MEDIA_ID = "androidx.media.argument.MEDIA_ID"; 85 static final String ARGUMENT_QUERY = "androidx.media.argument.QUERY"; 86 static final String ARGUMENT_URI = "androidx.media.argument.URI"; 87 static final String ARGUMENT_PLAYBACK_STATE_COMPAT = 88 "androidx.media.argument.PLAYBACK_STATE_COMPAT"; 89 static final String ARGUMENT_VOLUME = "androidx.media.argument.VOLUME"; 90 static final String ARGUMENT_VOLUME_DIRECTION = "androidx.media.argument.VOLUME_DIRECTION"; 91 static final String ARGUMENT_VOLUME_FLAGS = "androidx.media.argument.VOLUME_FLAGS"; 92 static final String ARGUMENT_EXTRAS = "androidx.media.argument.EXTRAS"; 93 static final String ARGUMENT_ARGUMENTS = "androidx.media.argument.ARGUMENTS"; 94 static final String ARGUMENT_RESULT_RECEIVER = "androidx.media.argument.RESULT_RECEIVER"; 95 static final String ARGUMENT_COMMAND_BUTTONS = "androidx.media.argument.COMMAND_BUTTONS"; 96 static final String ARGUMENT_ROUTE_BUNDLE = "androidx.media.argument.ROUTE_BUNDLE"; 97 static final String ARGUMENT_PLAYBACK_INFO = "androidx.media.argument.PLAYBACK_INFO"; 98 static final String ARGUMENT_ITEM_COUNT = "androidx.media.argument.ITEM_COUNT"; 99 static final String ARGUMENT_PAGE = "androidx.media.argument.PAGE"; 100 static final String ARGUMENT_PAGE_SIZE = "androidx.media.argument.PAGE_SIZE"; 101 102 static final String ARGUMENT_ICONTROLLER_CALLBACK = 103 "androidx.media.argument.ICONTROLLER_CALLBACK"; 104 static final String ARGUMENT_UID = "androidx.media.argument.UID"; 105 static final String ARGUMENT_PID = "androidx.media.argument.PID"; 106 static final String ARGUMENT_PACKAGE_NAME = "androidx.media.argument.PACKAGE_NAME"; 107 108 static final String ROOT_EXTRA_DEFAULT = "androidx.media.root_default_root"; 109 110 private MediaConstants2() { 111 } 112 } 113