• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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 #ifndef ANDROID_VINTF_LEVEL_H
18 #define ANDROID_VINTF_LEVEL_H
19 
20 #include <stddef.h>
21 #include <stdint.h>
22 
23 namespace android {
24 namespace vintf {
25 
26 // Manifest and Compatibility Matrix Level, a.k.a FCM Version, is a number assigned to each
27 // manifest / matrix.
28 // - For manifest, the FCM Version that it implements
29 // - For matrix, the single FCM Version that this matrix file details.
30 // This is not a strong-typed enum because Level can be any integer value. Listed are some
31 // special values.
32 enum Level : size_t {
33     // Non-Treble devices.
34     LEGACY = 0,
35     // Actual values starts from 1.
36     O = 1,
37     O_MR1 = 2,
38     P = 3,
39     Q = 4,
40     R = 5,
41     S = 6,
42     T = 7,
43     U = 8,
44     // To add new values: (1) add above this line.  (2) edit if needed:
45     // - RuntimeInfo::gkiAndroidReleaseToLevel
46     // - analyze_matrix.cpp, GetDescription()
47 
48     // The maximum of all specified Levels + 1.
49     LAST_PLUS_ONE,
50 
51     // For older manifests and compatibility matrices, "level" is not specified.
52     UNSPECIFIED = SIZE_MAX,
53 };
54 
55 std::string GetDescription(Level level);
56 
57 }  // namespace vintf
58 }  // namespace android
59 
60 #endif  // ANDROID_VINTF_LEVEL_H
61