1/* 2 * Copyright (C) 2023 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 17syntax = "proto2"; 18 19package android.photopicker; 20 21option java_outer_classname = "PhotopickerProtoEnums"; 22option java_multiple_files = true; 23 24/* 25 Number of items allowed to be picked 26 */ 27enum PickerPermittedSelection { 28 SINGLE = 0; 29 MULTIPLE = 1; 30 UNSET_PICKER_PERMITTED_SELECTION = 2; 31} 32 33/* 34 The user profile the picker is currently opened in 35 */ 36enum UserProfile { 37 WORK = 0; 38 PERSONAL = 1; 39 PRIVATE_SPACE = 2; 40 UNKNOWN = 3; 41 UNSET_USER_PROFILE = 4; 42} 43 44/* 45 Holds the picker state at the moment 46 */ 47enum PickerStatus { 48 OPENED = 0; 49 CANCELED = 1; 50 CONFIRMED = 2; 51 UNSET_PICKER_STATUS = 3; 52} 53 54/* 55 Defines the kind of picker that was opened 56 */ 57enum PickerMode { 58 REGULAR_PICKER = 0; 59 EMBEDDED_PICKER = 1; 60 PERMISSION_MODE_PICKER = 2; 61 UNSET_PICKER_MODE = 3; 62} 63 64/* 65 Captures how the picker was closed 66 */ 67enum PickerCloseMethod { 68 SWIPE_DOWN = 0; 69 CROSS_BUTTON =1; 70 BACK_BUTTON = 2; 71 PICKER_SELECTION_CONFIRMED = 3; 72 UNSET_PICKER_CLOSE_METHOD = 4; 73} 74 75/* 76 The size of the picker on the screen 77 */ 78enum PickerSize { 79 COLLAPSED = 0; 80 EXPANDED = 1; 81 UNSET_PICKER_SIZE = 2; 82} 83 84/* 85 The intent action that launches the picker 86 */ 87enum PickerIntentAction { 88 ACTION_PICK_IMAGES = 0; 89 ACTION_GET_CONTENT = 1; 90 ACTION_USER_SELECT = 2; 91 UNSET_PICKER_INTENT_ACTION = 3; 92} 93 94/* 95 Different media item types in the picker 96 */ 97enum MediaType { 98 PHOTO = 0; 99 VIDEO = 1; 100 PHOTO_VIDEO = 2; 101 GIF = 3; 102 LIVE_PHOTO = 4; 103 OTHER = 5; 104 UNSET_MEDIA_TYPE = 6; 105} 106 107/* 108 Different picker tabs 109 */ 110enum SelectedTab { 111 PHOTOS = 0; 112 ALBUMS = 1; 113 COLLECTIONS = 2; 114 UNSET_SELECTED_TAB = 3; 115} 116 117/* 118 Different picker albums 119 */ 120enum SelectedAlbum { 121 FAVORITES = 0; 122 CAMERA = 1; 123 DOWNLOADS = 2; 124 SCREENSHOTS = 3; 125 VIDEOS = 4; 126 UNDEFINED_LOCAL = 5; 127 UNDEFINED_CLOUD = 6; 128 UNSET_SELECTED_ALBUM = 7; 129} 130 131/* 132 Holds multiple user interactions with the picker 133 */ 134enum UiEvent { 135 PICKER_MENU_CLICKED = 0; 136 ENTER_PICKER_PREVIEW_MODE = 1; 137 SWITCH_PICKER_TAB = 2; 138 SWITCH_USER_PROFILE = 3; 139 PICKER_MAIN_GRID_INTERACTION = 4; 140 PICKER_ALBUMS_INTERACTION = 5; 141 PICKER_CLICK_ADD_BUTTON = 6; 142 PICKER_CLICK_VIEW_SELECTED = 7; 143 PICKER_LONG_SELECT_MEDIA_ITEM = 8; 144 EXPAND_PICKER = 9; 145 COLLAPSE_PICKER = 10; 146 PROFILE_SWITCH_BUTTON_CLICK = 11; 147 ACTION_BAR_HOME_BUTTON_CLICK = 12; 148 PICKER_BACK_GESTURE_CLICK = 13; 149 PICKER_MENU_CLICK = 14; 150 MAIN_GRID_OPEN = 15; 151 ALBUM_FAVOURITES_OPEN = 16; 152 ALBUM_CAMERA_OPEN = 17; 153 ALBUM_DOWNLOADS_OPEN = 18; 154 ALBUM_SCREENSHOTS_OPEN = 19; 155 ALBUM_VIDEOS_OPEM = 20; 156 ALBUM_FROM_CLOUD_OPEN = 21; 157 UI_LOADED_PHOTOS = 22; 158 UI_LOADED_ALBUMS = 23; 159 UI_LOADED_ALBUM_CONTENTS = 24; 160 CREATE_SURFACE_CONTROLLER_START = 25; 161 CREATE_SURFACE_CONTROLLER_END = 26; 162 PICKER_PRELOADING_START = 27; 163 PICKER_PRELOADING_FINISHED = 28; 164 PICKER_PRELOADING_FAILED = 29; 165 PICKER_PRELOADING_CANCELLED = 30; 166 PICKER_BROWSE_DOCUMENTS_UI = 31; 167 ENTER_PICKER_SEARCH = 32; 168 SELECT_SEARCH_CATEGORY = 33; 169 UNSET_UI_EVENT = 34; 170} 171 172/* 173 Holds the selection status of the media items 174 */ 175enum MediaStatus { 176 SELECTED = 0; 177 UNSELECTED = 1; 178 UNSET_MEDIA_STATUS = 2; 179} 180 181/* 182 Holds the location of the media item 183 */ 184enum MediaLocation { 185 MAIN_GRID = 0; 186 ALBUM = 1; 187 GROUP = 2 [deprecated = true]; 188 UNSET_MEDIA_LOCATION = 3; 189 CATEGORY = 4; 190 SEARCH_GRID = 5; 191} 192 193/* 194 Defines how the user entered the preview mode 195 */ 196enum PreviewModeEntry { 197 VIEW_SELECTED = 0; 198 LONG_PRESS = 1; 199 UNSET_PREVIEW_MODE_ENTRY = 2; 200} 201 202/* 203 Defines different video playback user interactions 204 */ 205enum VideoPlayBackInteractions { 206 PLAY = 0; 207 PAUSE = 1; 208 MUTE = 2; 209 UNSET_VIDEO_PLAYBACK_INTERACTION = 3; 210} 211 212/* 213 Picker menu item options 214 */ 215enum MenuItemSelected { 216 BROWSE = 0; 217 CLOUD_SETTINGS = 1; 218 UNSET_MENU_ITEM_SELECTED = 2; 219} 220 221/* 222 Holds the different kind of banners displayed in the picker 223 */ 224enum BannerType { 225 CLOUD_MEDIA_AVAILABLE = 0; 226 ACCOUNT_UPDATED = 1; 227 CHOOSE_ACCOUNT = 2; 228 CHOOSE_APP = 3; 229 UNSET_BANNER_TYPE = 4; 230} 231 232/* 233 Different user interactions with the above defined banners 234 */ 235enum UserBannerInteraction { 236 CLICK_BANNER_ACTION_BUTTON = 0; 237 CLICK_BANNER_DISMISS_BUTTON = 1; 238 CLICK_BANNER = 2; 239 UNSET_USER_BANNER_INTERACTION = 3; 240} 241 242/* 243 Different ways of searching in the picker 244 */ 245enum SearchMethod { 246 SEARCH_QUERY = 0; 247 COLLECTION = 1 [deprecated = true]; 248 SUGGESTED_SEARCHES = 2; 249 UNSET_SEARCH_METHOD = 3; 250 CATEGORY_SEARCH = 4; 251} 252