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