1 /*
2  * Copyright (C) 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 package com.android.tradefed.build;
17 
18 /** Class holding enumeration related to build information queries. */
19 public class BuildInfoKey {
20 
21     /**
22      * Enum describing all the known file types that can be queried through {@link
23      * IBuildInfo#getFile(BuildInfoFileKey)}.
24      */
25     public enum BuildInfoFileKey {
26         DEVICE_IMAGE("device"),
27         USERDATA_IMAGE("userdata"),
28         TESTDIR_IMAGE("testsdir"),
29         BASEBAND_IMAGE("baseband"),
30         BOOTLOADER_IMAGE("bootloader"),
31         OTA_IMAGE("ota"),
32         MKBOOTIMG_IMAGE("mkbootimg"),
33         RAMDISK_IMAGE("ramdisk"),
34 
35         // Externally linked files in the testsdir:
36         // ANDROID_HOST_OUT_TESTCASES and ANDROID_TARGET_OUT_TESTCASES are linked in the tests dir
37         // of the build info.
38         TARGET_LINKED_DIR("target_testcases"),
39         HOST_LINKED_DIR("host_testcases");
40 
41         private final String mFileKey;
42 
BuildInfoFileKey(String fileKey)43         private BuildInfoFileKey(String fileKey) {
44             mFileKey = fileKey;
45         }
46 
getFileKey()47         public String getFileKey() {
48             return mFileKey;
49         }
50 
51         @Override
toString()52         public String toString() {
53             return mFileKey;
54         }
55     }
56 }
57